Missing header files and FL_EXTERNs that prevented DLL's from compiling

under BCC.
Fluid will output A::B::C names for nested classes.
Fl_Browser::lineposition(n, BOTTOM) will align the bottom of the line
rather than the top with the bottom of the browser.
The connect program does wait() so that it does not leave a zombie for
every one of your ppp connections.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak 1999-05-11 09:39:31 +00:00
parent d4bcbf5be3
commit 4e66f93769
7 changed files with 49 additions and 26 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_draw.H,v 1.9 1999/02/18 13:12:50 mike Exp $"
// "$Id: fl_draw.H,v 1.9.2.1 1999/05/11 09:39:27 bill Exp $"
//
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
//
@ -137,7 +137,7 @@ FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color);
// images:
FL_EXPORT void fl_draw_image(const uchar*, int,int,int,int, int delta=3, int ldelta=0);
FL_EXPORT void fl_draw_image_mono(const uchar*, int,int,int,int, int delta=1, int ld=0);
FL_EXPORT typedef void (*Fl_Draw_Image_Cb)(void*,int,int,int,uchar*);
typedef void (*Fl_Draw_Image_Cb)(void*,int,int,int,uchar*);
FL_EXPORT void fl_draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=3);
FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=1);
FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b);
@ -161,5 +161,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
#endif
//
// End of "$Id: fl_draw.H,v 1.9 1999/02/18 13:12:50 mike Exp $".
// End of "$Id: fl_draw.H,v 1.9.2.1 1999/05/11 09:39:27 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: forms.H,v 1.7 1999/03/10 08:17:40 bill Exp $"
// "$Id: forms.H,v 1.7.2.1 1999/05/11 09:39:27 bill Exp $"
//
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
//
@ -813,7 +813,7 @@ inline void fl_set_slider_precision(Fl_Widget* o, int i) {
// meaning of FL_ALIGN_INSIDE. Implementation in forms.C
class Fl_FormsText : public Fl_Widget {
protected:
void draw();
FL_EXPORT void draw();
public:
Fl_FormsText(Fl_Boxtype b, int x, int y, int w, int h, const char* l=0)
: Fl_Widget(x,y,w,h,l) {box(b); align(FL_ALIGN_LEFT);}
@ -841,5 +841,5 @@ inline void fl_draw() {Fl::flush();}
#endif /* define __FORMS_H__ */
//
// End of "$Id: forms.H,v 1.7 1999/03/10 08:17:40 bill Exp $".
// End of "$Id: forms.H,v 1.7.2.1 1999/05/11 09:39:27 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Function_Type.cxx,v 1.15.2.2 1999/04/30 16:29:40 gustavo Exp $"
// "$Id: Fl_Function_Type.cxx,v 1.15.2.3 1999/05/11 09:39:28 bill Exp $"
//
// C function type code for the Fast Light Tool Kit (FLTK).
//
@ -543,7 +543,22 @@ void Fl_DeclBlock_Type::write_code2() {
const char* Fl_Type::class_name() const {
Fl_Type* p = parent;
while (p) {if (p->is_class()) return p->name(); p = p->parent;}
while (p) {
if (p->is_class()) {
// see if we are nested in another class, we must fully-qualify name:
// this is lame but works...
const char* q = p->class_name();
if (q) {
static char buffer[256];
if (q != buffer) strcpy(buffer, q);
strcat(buffer, "::");
strcat(buffer, p->name());
return buffer;
}
return p->name();
}
p = p->parent;
}
return 0;
}
@ -638,5 +653,5 @@ void Fl_Class_Type::write_code2() {
}
//
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.2 1999/04/30 16:29:40 gustavo Exp $".
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.3 1999/05/11 09:39:28 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Browser.cxx,v 1.9.2.5 1999/05/01 15:08:21 mike Exp $"
// "$Id: Fl_Browser.cxx,v 1.9.2.6 1999/05/11 09:39:29 bill Exp $"
//
// Browser widget for the Fast Light Tool Kit (FLTK).
//
@ -394,9 +394,12 @@ void Fl_Browser::lineposition(int line, Fl_Line_Position pos) {
if (line<1) line = 1;
if (line>lines) line = lines;
int p = 0;
for (FL_BLINE* l=first; l&& line>1; l = l->next) {
FL_BLINE* l;
for (l=first; l && line>1; l = l->next) {
line--; p += item_height(l);
}
if (l && (pos == BOTTOM)) p += item_height (l);
int final = p, X, Y, W, H;
bbox(X, Y, W, H);
@ -485,5 +488,5 @@ int Fl_Browser::value() const {
}
//
// End of "$Id: Fl_Browser.cxx,v 1.9.2.5 1999/05/01 15:08:21 mike Exp $".
// End of "$Id: Fl_Browser.cxx,v 1.9.2.6 1999/05/11 09:39:29 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_win32.cxx,v 1.33.2.9 1999/05/09 14:49:14 mike Exp $"
// "$Id: Fl_win32.cxx,v 1.33.2.10 1999/05/11 09:39:30 bill Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@ -132,7 +132,6 @@ double fl_wait(int timeout_flag, double time) {
int have_message = 0;
int timerid;
if (nfds) {
// For WIN32 we need to poll for socket input FIRST, since
// the event queue is not something we can select() on...
@ -148,8 +147,8 @@ double fl_wait(int timeout_flag, double time) {
if (::select(0,&fdt[0],&fdt[1],&fdt[2],&t)) {
// We got something - do the callback!
for (int i = 0; i < nfds; i ++) {
int f = fd[i].fd;
short revents = 0;
int f = fd[i].fd;
short revents = 0;
if (FD_ISSET(f,&fdt[0])) revents |= POLLIN;
if (FD_ISSET(f,&fdt[1])) revents |= POLLOUT;
if (FD_ISSET(f,&fdt[2])) revents |= POLLERR;
@ -166,15 +165,15 @@ double fl_wait(int timeout_flag, double time) {
// First see if there is a message waiting...
have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE);
if (!have_message) {
// If not then set a 1ms timer...
// If not then set a 1ms timer...
timerid = SetTimer(NULL, 0, 1, NULL);
GetMessage(&fl_msg, NULL, 0, 0);
KillTimer(NULL, timerid);
GetMessage(&fl_msg, NULL, 0, 0);
KillTimer(NULL, timerid);
}
} else
} else {
// Wait for a message...
GetMessage(&fl_msg, NULL, 0, 0);
}
have_message = 1;
} else {
// Perform the requested timeout...
@ -854,6 +853,8 @@ void Fl_X::set_minmax(LPMINMAXINFO minmax)
////////////////////////////////////////////////////////////////
#include <FL/filename.H> // need so FL_EXPORT filename_name works
// returns pointer to the filename, or null if name ends with '/'
const char *filename_name(const char *name) {
const char *p,*q;
@ -939,5 +940,5 @@ void Fl_Window::make_current() {
}
//
// End of "$Id: Fl_win32.cxx,v 1.33.2.9 1999/05/09 14:49:14 mike Exp $".
// End of "$Id: Fl_win32.cxx,v 1.33.2.10 1999/05/11 09:39:30 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_shortcut.cxx,v 1.4 1999/01/07 19:17:43 mike Exp $"
// "$Id: fl_shortcut.cxx,v 1.4.2.1 1999/05/11 09:39:31 bill Exp $"
//
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
//
@ -41,6 +41,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include <ctype.h>
#include <string.h>
#ifndef WIN32
@ -123,5 +124,5 @@ int Fl_Widget::test_shortcut() {
}
//
// End of "$Id: fl_shortcut.cxx,v 1.4 1999/01/07 19:17:43 mike Exp $".
// End of "$Id: fl_shortcut.cxx,v 1.4.2.1 1999/05/11 09:39:31 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: connect.cxx,v 1.4 1999/01/07 19:17:51 mike Exp $"
// "$Id: connect.cxx,v 1.4.2.1 1999/05/11 09:39:31 bill Exp $"
//
// PPP example program for the Fast Light Tool Kit (FLTK).
//
@ -31,6 +31,7 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
@ -40,6 +41,7 @@ int running; // actually the pid
Fl_Toggle_Button *Button;
void sigchld(int) {
waitpid(running, 0, 0);
running = 0;
Button->value(0);
}
@ -53,6 +55,7 @@ void cb(Fl_Widget *o, void *) {
} else {
if (!running) return;
kill(running, SIGINT);
waitpid(running, 0, 0);
running = 0;
}
}
@ -68,5 +71,5 @@ int main(int argc, char ** argv) {
}
//
// End of "$Id: connect.cxx,v 1.4 1999/01/07 19:17:51 mike Exp $".
// End of "$Id: connect.cxx,v 1.4.2.1 1999/05/11 09:39:31 bill Exp $".
//