Fix MSVC "fileno" warnings in fluid
This commit is contained in:
parent
1a8b94162d
commit
c8c1f51db7
@ -764,8 +764,7 @@ Default is on.} xywh {245 366 100 25} down_box BORDER_BOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Fl_Group {} {
|
||||
Fl_Group {} {
|
||||
label {Scaling Factor Options} open
|
||||
xywh {10 421 380 66} box GTK_DOWN_BOX labelfont 2 align 21
|
||||
} {
|
||||
@ -797,7 +796,6 @@ Default is on.} xywh {245 442 100 25} down_box BORDER_BOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Fl_Choice wUserOrSystem {
|
||||
callback {refreshUI();} open
|
||||
tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 496 141 25} down_box BORDER_BOX
|
||||
|
||||
@ -1347,9 +1347,20 @@ public:
|
||||
//not necessary here: FILE * fl_fopen (const char *file, const char *mode="r");
|
||||
int close();
|
||||
|
||||
FILE * desc() const { return _fpt;} // non null if file is open
|
||||
FILE * desc() const { return _fpt;} // non-null if file is open
|
||||
char * get_line(char * line, size_t s) const {return _fpt ? fgets(line, (int)s, _fpt) : NULL;}
|
||||
|
||||
// returns fileno(FILE*):
|
||||
// (file must be open, i.e. _fpt must be non-null)
|
||||
// *FIXME* we should find a better solution for the 'fileno' issue
|
||||
int fileno() const {
|
||||
#ifdef _MSC_VER
|
||||
return _fileno(_fpt); // suppress MSVC warning
|
||||
#else
|
||||
return ::fileno(_fpt);
|
||||
#endif
|
||||
} // non null if file is open
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
protected:
|
||||
HANDLE pin[2], pout[2], perr[2];
|
||||
@ -1490,7 +1501,7 @@ shell_pipe_cb(FL_SOCKET, void*) {
|
||||
shell_run_terminal->append(line);
|
||||
} else {
|
||||
// End of file; tell the parent...
|
||||
Fl::remove_fd(fileno(s_proc.desc()));
|
||||
Fl::remove_fd(s_proc.fileno());
|
||||
s_proc.close();
|
||||
shell_run_terminal->append("... END SHELL COMMAND ...\n");
|
||||
}
|
||||
@ -1526,7 +1537,7 @@ do_shell_command(Fl_Return_Button*, void*) {
|
||||
}
|
||||
shell_run_window->show();
|
||||
|
||||
Fl::add_fd(fileno(s_proc.desc()), shell_pipe_cb);
|
||||
Fl::add_fd(s_proc.fileno(), shell_pipe_cb);
|
||||
|
||||
while (s_proc.desc()) Fl::wait();
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
|
||||
} {
|
||||
MenuItem {} {
|
||||
label { Image Alignment }
|
||||
user_data (fl_intptr_t)0xFFFFFFFF
|
||||
user_data {(fl_intptr_t)0xFFFFFFFF}
|
||||
xywh {145 145 100 20} labelfont 2 labelsize 11 deactivate
|
||||
}
|
||||
MenuItem {} {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user