Fixes STR# 2973: collection of Sun compiler fixes.

Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano
2013-09-21 16:41:23 +00:00
parent 2fc6c3a39b
commit 2082d7e197
14 changed files with 320 additions and 290 deletions
+11 -1
View File
@@ -52,6 +52,12 @@
<br> All other unicode characters or all other fonts (FL_FREE_FONT and above) are output as a bitmap. <br> All other unicode characters or all other fonts (FL_FREE_FONT and above) are output as a bitmap.
<br> FLTK standard fonts are output using the corresponding PostScript standard fonts. <br> FLTK standard fonts are output using the corresponding PostScript standard fonts.
*/ */
/** Signature of Fl_PostScript::close_command() functions passed as parameters. */
extern "C" {
typedef int (Fl_PostScript_Close_Command)(FILE *);
}
class FL_EXPORT Fl_PostScript_Graphics_Driver : public Fl_Graphics_Driver { class FL_EXPORT Fl_PostScript_Graphics_Driver : public Fl_Graphics_Driver {
public: public:
static const char *class_id; static const char *class_id;
@@ -89,7 +95,7 @@ class Clip {
int mx; // width of mask; int mx; // width of mask;
int my; // mask lines int my; // mask lines
//Fl_Color bg_; //Fl_Color bg_;
int (*close_cmd_)(FILE *); Fl_PostScript_Close_Command* close_cmd_;
int page_policy_; int page_policy_;
int nPages; int nPages;
int orientation_; int orientation_;
@@ -116,7 +122,11 @@ class Clip {
void page_policy(int p); void page_policy(int p);
int page_policy(){return page_policy_;}; int page_policy(){return page_policy_;};
#if FLTK_ABI_VERSION < 10303
void close_command( int (*cmd)(FILE *)){close_cmd_=cmd;}; void close_command( int (*cmd)(FILE *)){close_cmd_=cmd;};
#else
void close_command(Fl_PostScript_Close_Command* cmd){close_cmd_=cmd;};
#endif
FILE * file() {return output;}; FILE * file() {return output;};
//void orientation (int o); //void orientation (int o);
//Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor
+4 -2
View File
@@ -126,8 +126,10 @@ void CodeEditor::textsize(Fl_Fontsize s) {
// 'compare_keywords()' - Compare two keywords... // 'compare_keywords()' - Compare two keywords...
int CodeEditor::compare_keywords(const void *a, const void *b) { extern "C" {
return (strcmp(*((const char **)a), *((const char **)b))); static int compare_keywords(const void *a, const void *b) {
return strcmp(*((const char **)a), *((const char **)b));
}
} }
// 'style_parse()' - Parse text and produce style data. // 'style_parse()' - Parse text and produce style data.
-3
View File
@@ -38,9 +38,6 @@ class CodeEditor : public Fl_Text_Editor {
static const char * const code_types[]; static const char * const code_types[];
// 'compare_keywords()' - Compare two keywords...
static int compare_keywords(const void *a, const void *b);
// 'style_parse()' - Parse text and produce style data. // 'style_parse()' - Parse text and produce style data.
static void style_parse(const char *text, char *style, int length); static void style_parse(const char *text, char *style, int length);
+31 -27
View File
@@ -212,35 +212,39 @@ typedef struct {
typedef my_source_mgr *my_src_ptr; typedef my_source_mgr *my_src_ptr;
void init_source (j_decompress_ptr cinfo) { extern "C" {
my_src_ptr src = (my_src_ptr)cinfo->src;
src->s = src->data;
}
boolean fill_input_buffer(j_decompress_ptr cinfo) { static void init_source(j_decompress_ptr cinfo) {
my_src_ptr src = (my_src_ptr)cinfo->src; my_src_ptr src = (my_src_ptr)cinfo->src;
size_t nbytes = 4096; src->s = src->data;
src->pub.next_input_byte = src->s;
src->pub.bytes_in_buffer = nbytes;
src->s += nbytes;
return TRUE;
}
void term_source(j_decompress_ptr cinfo)
{
}
void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
my_src_ptr src = (my_src_ptr)cinfo->src;
if (num_bytes > 0) {
while (num_bytes > (long)src->pub.bytes_in_buffer) {
num_bytes -= (long)src->pub.bytes_in_buffer;
fill_input_buffer(cinfo);
}
src->pub.next_input_byte += (size_t) num_bytes;
src->pub.bytes_in_buffer -= (size_t) num_bytes;
} }
}
static boolean fill_input_buffer(j_decompress_ptr cinfo) {
my_src_ptr src = (my_src_ptr)cinfo->src;
size_t nbytes = 4096;
src->pub.next_input_byte = src->s;
src->pub.bytes_in_buffer = nbytes;
src->s += nbytes;
return TRUE;
}
static void term_source(j_decompress_ptr cinfo)
{
}
static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
my_src_ptr src = (my_src_ptr)cinfo->src;
if (num_bytes > 0) {
while (num_bytes > (long)src->pub.bytes_in_buffer) {
num_bytes -= (long)src->pub.bytes_in_buffer;
fill_input_buffer(cinfo);
}
src->pub.next_input_byte += (size_t) num_bytes;
src->pub.bytes_in_buffer -= (size_t) num_bytes;
}
}
} // extern "C"
static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data) static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data)
{ {
+15 -13
View File
@@ -51,20 +51,22 @@ typedef struct {
const unsigned char *last; const unsigned char *last;
} fl_png_memory; } fl_png_memory;
static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data extern "C" {
png_bytep data, // where to copy the image data for libpng computing static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data
png_size_t length) // length of data to copy png_bytep data, // where to copy the image data for libpng computing
{ png_size_t length) // length of data to copy
fl_png_memory *png_mem_data = (fl_png_memory*)png_get_io_ptr(png_ptr); // get the pointer to our struct {
if (png_mem_data->current + length > png_mem_data->last) { fl_png_memory *png_mem_data = (fl_png_memory*)png_get_io_ptr(png_ptr); // get the pointer to our struct
png_error(png_mem_data->pp, "Invalid attempt to read row data"); if (png_mem_data->current + length > png_mem_data->last) {
return; png_error(png_mem_data->pp, "Invalid attempt to read row data");
return;
}
/* copy data from image buffer */
memcpy (data, png_mem_data->current, length);
/* advance in the memory data */
png_mem_data->current += length;
} }
/* copy data from image buffer */ } // extern "C"
memcpy (data, png_mem_data->current, length);
/* advance in the memory data */
png_mem_data->current += length;
}
#endif // HAVE_LIBPNG && HAVE_LIBZ #endif // HAVE_LIBPNG && HAVE_LIBZ
+5 -3
View File
@@ -102,9 +102,11 @@ int Fl_PostScript_File_Device::start_job (int pagecount, enum Fl_Paged_Device::P
return 0; return 0;
} }
static int dont_close(FILE *f) extern "C" {
{ static int dont_close(FILE *f)
return 0; {
return 0;
}
} }
/** /**
+32 -32
View File
@@ -1134,8 +1134,8 @@ int fl_handle(const XEvent& thisevent)
return 0; return 0;
case SelectionNotify: { case SelectionNotify: {
static unsigned char* buffer = 0; static unsigned char* sn_buffer = 0;
if (buffer) {XFree(buffer); buffer = 0;} if (sn_buffer) {XFree(sn_buffer); sn_buffer = 0;}
long bytesread = 0; long bytesread = 0;
if (fl_xevent->xselection.property) for (;;) { if (fl_xevent->xselection.property) for (;;) {
// The Xdnd code pastes 64K chunks together, possibly to avoid // The Xdnd code pastes 64K chunks together, possibly to avoid
@@ -1191,22 +1191,22 @@ int fl_handle(const XEvent& thisevent)
if (portion) { XFree(portion); portion = 0; } if (portion) { XFree(portion); portion = 0; }
return true; return true;
} }
buffer = (unsigned char*)realloc(buffer, bytesread+count+remaining+1); sn_buffer = (unsigned char*)realloc(sn_buffer, bytesread+count+remaining+1);
memcpy(buffer+bytesread, portion, count); memcpy(sn_buffer+bytesread, portion, count);
if (portion) { XFree(portion); portion = 0; } if (portion) { XFree(portion); portion = 0; }
bytesread += count; bytesread += count;
// Cannot trust data to be null terminated // Cannot trust data to be null terminated
buffer[bytesread] = '\0'; sn_buffer[bytesread] = '\0';
if (!remaining) break; if (!remaining) break;
} }
if (buffer) { if (sn_buffer) {
buffer[bytesread] = 0; sn_buffer[bytesread] = 0;
convert_crlf(buffer, bytesread); convert_crlf(sn_buffer, bytesread);
} }
if (!fl_selection_requestor) return 0; if (!fl_selection_requestor) return 0;
Fl::e_text = buffer ? (char*)buffer : (char *)""; Fl::e_text = sn_buffer ? (char*)sn_buffer : (char *)"";
Fl::e_length = bytesread; Fl::e_length = bytesread;
int old_event = Fl::e_number; int old_event = Fl::e_number;
fl_selection_requestor->handle(Fl::e_number = FL_PASTE); fl_selection_requestor->handle(Fl::e_number = FL_PASTE);
@@ -1316,21 +1316,21 @@ int fl_handle(const XEvent& thisevent)
if (data[1]&1) { if (data[1]&1) {
// get list of data types: // get list of data types:
Atom actual; int format; unsigned long count, remaining; Atom actual; int format; unsigned long count, remaining;
unsigned char *buffer = 0; unsigned char *cm_buffer = 0;
XGetWindowProperty(fl_display, fl_dnd_source_window, fl_XdndTypeList, XGetWindowProperty(fl_display, fl_dnd_source_window, fl_XdndTypeList,
0, 0x8000000L, False, XA_ATOM, &actual, &format, 0, 0x8000000L, False, XA_ATOM, &actual, &format,
&count, &remaining, &buffer); &count, &remaining, &cm_buffer);
if (actual != XA_ATOM || format != 32 || count<4 || !buffer) { if (actual != XA_ATOM || format != 32 || count<4 || !cm_buffer) {
if ( buffer ) { XFree(buffer); buffer = 0; } if ( cm_buffer ) { XFree(cm_buffer); cm_buffer = 0; }
goto FAILED; goto FAILED;
} }
delete [] fl_dnd_source_types; delete [] fl_dnd_source_types;
fl_dnd_source_types = new Atom[count+1]; fl_dnd_source_types = new Atom[count+1];
for (unsigned i = 0; i < count; i++) { for (unsigned i = 0; i < count; i++) {
fl_dnd_source_types[i] = ((Atom*)buffer)[i]; fl_dnd_source_types[i] = ((Atom*)cm_buffer)[i];
} }
fl_dnd_source_types[count] = 0; fl_dnd_source_types[count] = 0;
XFree(buffer); buffer = 0; XFree(cm_buffer); cm_buffer = 0;
} else { } else {
FAILED: FAILED:
// less than four data types, or if the above messes up: // less than four data types, or if the above messes up:
@@ -1459,13 +1459,13 @@ int fl_handle(const XEvent& thisevent)
KEYPRESS: KEYPRESS:
int keycode = xevent.xkey.keycode; int keycode = xevent.xkey.keycode;
fl_key_vector[keycode/8] |= (1 << (keycode%8)); fl_key_vector[keycode/8] |= (1 << (keycode%8));
static char *buffer = NULL; static char *kp_buffer = NULL;
static int buffer_len = 0; static int kp_buffer_len = 0;
int len=0; int len=0;
KeySym keysym; KeySym keysym;
if (buffer_len == 0) { if (kp_buffer_len == 0) {
buffer_len = 4096; kp_buffer_len = 4096;
buffer = (char*) malloc(buffer_len); kp_buffer = (char*) malloc(kp_buffer_len);
} }
if (xevent.type == KeyPress) { if (xevent.type == KeyPress) {
event = FL_KEYDOWN; event = FL_KEYDOWN;
@@ -1474,23 +1474,23 @@ int fl_handle(const XEvent& thisevent)
if (fl_xim_ic) { if (fl_xim_ic) {
Status status; Status status;
len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey, len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
buffer, buffer_len, &keysym, &status); kp_buffer, kp_buffer_len, &keysym, &status);
while (status == XBufferOverflow && buffer_len < 50000) { while (status == XBufferOverflow && kp_buffer_len < 50000) {
buffer_len = buffer_len * 5 + 1; kp_buffer_len = kp_buffer_len * 5 + 1;
buffer = (char*)realloc(buffer, buffer_len); kp_buffer = (char*)realloc(kp_buffer, kp_buffer_len);
len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey, len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
buffer, buffer_len, &keysym, &status); kp_buffer, kp_buffer_len, &keysym, &status);
} }
keysym = XKeycodeToKeysym(fl_display, keycode, 0); keysym = XKeycodeToKeysym(fl_display, keycode, 0);
} else { } else {
//static XComposeStatus compose; //static XComposeStatus compose;
len = XLookupString((XKeyEvent*)&(xevent.xkey), len = XLookupString((XKeyEvent*)&(xevent.xkey),
buffer, buffer_len, &keysym, 0/*&compose*/); kp_buffer, kp_buffer_len, &keysym, 0/*&compose*/);
if (keysym && keysym < 0x400) { // a character in latin-1,2,3,4 sets if (keysym && keysym < 0x400) { // a character in latin-1,2,3,4 sets
// force it to type a character (not sure if this ever is needed): // force it to type a character (not sure if this ever is needed):
// if (!len) {buffer[0] = char(keysym); len = 1;} // if (!len) {kp_buffer[0] = char(keysym); len = 1;}
len = fl_utf8encode(XKeysymToUcs(keysym), buffer); len = fl_utf8encode(XKeysymToUcs(keysym), kp_buffer);
if (len < 1) len = 1; if (len < 1) len = 1;
// ignore all effects of shift on the keysyms, which makes it a lot // ignore all effects of shift on the keysyms, which makes it a lot
// easier to program shortcuts and is Windoze-compatible: // easier to program shortcuts and is Windoze-compatible:
@@ -1499,9 +1499,9 @@ int fl_handle(const XEvent& thisevent)
} }
// MRS: Can't use Fl::event_state(FL_CTRL) since the state is not // MRS: Can't use Fl::event_state(FL_CTRL) since the state is not
// set until set_event_xy() is called later... // set until set_event_xy() is called later...
if ((xevent.xkey.state & ControlMask) && keysym == '-') buffer[0] = 0x1f; // ^_ if ((xevent.xkey.state & ControlMask) && keysym == '-') kp_buffer[0] = 0x1f; // ^_
buffer[len] = 0; kp_buffer[len] = 0;
Fl::e_text = buffer; Fl::e_text = kp_buffer;
Fl::e_length = len; Fl::e_length = len;
} else { } else {
// Stupid X sends fake key-up events when a repeating key is held // Stupid X sends fake key-up events when a repeating key is held
@@ -1640,7 +1640,7 @@ int fl_handle(const XEvent& thisevent)
(keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))) { (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))) {
// Store ASCII numeric keypad value... // Store ASCII numeric keypad value...
keysym = keysym1 | FL_KP; keysym = keysym1 | FL_KP;
buffer[0] = char(keysym1) & 0x7F; kp_buffer[0] = char(keysym1) & 0x7F;
len = 1; len = 1;
} else { } else {
// Map keypad to special key... // Map keypad to special key...
+3
View File
@@ -126,6 +126,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#elif defined(__hpux) #elif defined(__hpux)
/* This code to prevent "empty translation unit" or similar warnings... */ /* This code to prevent "empty translation unit" or similar warnings... */
static void dummy(void) {} static void dummy(void) {}
#else
/* This is perhaps a better code for general cases than 'static void dummy() {}' to avoid "empty translation unit" (e.g. Sun) */
typedef int dummy;
#endif /* WIN32 && !FL_DLL && !__GNUC__ */ #endif /* WIN32 && !FL_DLL && !__GNUC__ */
/* /*
+4 -2
View File
@@ -70,8 +70,10 @@ fl_subimage_offsets(int a, int aw, int b, int bw, int &obw)
// this handler will catch and ignore exceptions during XGetImage // this handler will catch and ignore exceptions during XGetImage
// to avoid an application crash // to avoid an application crash
static int xgetimageerrhandler(Display *display, XErrorEvent *error) { extern "C" {
return 0; static int xgetimageerrhandler(Display *display, XErrorEvent *error) {
return 0;
}
} }
// //
+107 -107
View File
@@ -133,23 +133,23 @@ static const char unicode_to_dingbats_1b_0020[] = {
}; };
static const char unicode_to_dingbats_1b_2192[] = { static const char unicode_to_dingbats_1b_2192[] = {
/* U+2192 */ 0xD5, /* U+2192 */ (char)0xD5,
0x00, 0x00,
/* U+2194 */ 0xD6, /* U+2194 */ (char)0xD6,
/* U+2195 */ 0xD7, /* U+2195 */ (char)0xD7,
}; };
static const char unicode_to_dingbats_1b_2460[] = { static const char unicode_to_dingbats_1b_2460[] = {
/* U+2460 */ 0xAC, /* U+2460 */ (char)0xAC,
/* U+2461 */ 0xAD, /* U+2461 */ (char)0xAD,
/* U+2462 */ 0xAE, /* U+2462 */ (char)0xAE,
/* U+2463 */ 0xAF, /* U+2463 */ (char)0xAF,
/* U+2464 */ 0xB0, /* U+2464 */ (char)0xB0,
/* U+2465 */ 0xB1, /* U+2465 */ (char)0xB1,
/* U+2466 */ 0xB2, /* U+2466 */ (char)0xB2,
/* U+2467 */ 0xB3, /* U+2467 */ (char)0xB3,
/* U+2468 */ 0xB4, /* U+2468 */ (char)0xB4,
/* U+2469 */ 0xB5, /* U+2469 */ (char)0xB5,
}; };
static const char unicode_to_dingbats_1b_25A0[] = { static const char unicode_to_dingbats_1b_25A0[] = {
@@ -345,13 +345,13 @@ static const char unicode_to_dingbats_1b_25A0[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2660 */ 0xAB, /* U+2660 */ (char)0xAB,
0x00, 0x00,
0x00, 0x00,
/* U+2663 */ 0xA8, /* U+2663 */ (char)0xA8,
0x00, 0x00,
/* U+2665 */ 0xAA, /* U+2665 */ (char)0xAA,
/* U+2666 */ 0xA9, /* U+2666 */ (char)0xA9,
}; };
static const char unicode_to_dingbats_1b_2701[] = { static const char unicode_to_dingbats_1b_2701[] = {
@@ -451,13 +451,13 @@ static const char unicode_to_dingbats_1b_2701[] = {
/* U+275E */ 0x7E, /* U+275E */ 0x7E,
0x00, 0x00,
0x00, 0x00,
/* U+2761 */ 0xA1, /* U+2761 */ (char)0xA1,
/* U+2762 */ 0xA2, /* U+2762 */ (char)0xA2,
/* U+2763 */ 0xA3, /* U+2763 */ (char)0xA3,
/* U+2764 */ 0xA4, /* U+2764 */ (char)0xA4,
/* U+2765 */ 0xA5, /* U+2765 */ (char)0xA5,
/* U+2766 */ 0xA6, /* U+2766 */ (char)0xA6,
/* U+2767 */ 0xA7, /* U+2767 */ (char)0xA7,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -472,94 +472,94 @@ static const char unicode_to_dingbats_1b_2701[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2776 */ 0xB6, /* U+2776 */ (char)0xB6,
/* U+2777 */ 0xB7, /* U+2777 */ (char)0xB7,
/* U+2778 */ 0xB8, /* U+2778 */ (char)0xB8,
/* U+2779 */ 0xB9, /* U+2779 */ (char)0xB9,
/* U+277A */ 0xBA, /* U+277A */ (char)0xBA,
/* U+277B */ 0xBB, /* U+277B */ (char)0xBB,
/* U+277C */ 0xBC, /* U+277C */ (char)0xBC,
/* U+277D */ 0xBD, /* U+277D */ (char)0xBD,
/* U+277E */ 0xBE, /* U+277E */ (char)0xBE,
/* U+277F */ 0xBF, /* U+277F */ (char)0xBF,
/* U+2780 */ 0xC0, /* U+2780 */ (char)0xC0,
/* U+2781 */ 0xC1, /* U+2781 */ (char)0xC1,
/* U+2782 */ 0xC2, /* U+2782 */ (char)0xC2,
/* U+2783 */ 0xC3, /* U+2783 */ (char)0xC3,
/* U+2784 */ 0xC4, /* U+2784 */ (char)0xC4,
/* U+2785 */ 0xC5, /* U+2785 */ (char)0xC5,
/* U+2786 */ 0xC6, /* U+2786 */ (char)0xC6,
/* U+2787 */ 0xC7, /* U+2787 */ (char)0xC7,
/* U+2788 */ 0xC8, /* U+2788 */ (char)0xC8,
/* U+2789 */ 0xC9, /* U+2789 */ (char)0xC9,
/* U+278A */ 0xCA, /* U+278A */ (char)0xCA,
/* U+278B */ 0xCB, /* U+278B */ (char)0xCB,
/* U+278C */ 0xCC, /* U+278C */ (char)0xCC,
/* U+278D */ 0xCD, /* U+278D */ (char)0xCD,
/* U+278E */ 0xCE, /* U+278E */ (char)0xCE,
/* U+278F */ 0xCF, /* U+278F */ (char)0xCF,
/* U+2790 */ 0xD0, /* U+2790 */ (char)0xD0,
/* U+2791 */ 0xD1, /* U+2791 */ (char)0xD1,
/* U+2792 */ 0xD2, /* U+2792 */ (char)0xD2,
/* U+2793 */ 0xD3, /* U+2793 */ (char)0xD3,
/* U+2794 */ 0xD4, /* U+2794 */ (char)0xD4,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2798 */ 0xD8, /* U+2798 */ (char)0xD8,
/* U+2799 */ 0xD9, /* U+2799 */ (char)0xD9,
/* U+279A */ 0xDA, /* U+279A */ (char)0xDA,
/* U+279B */ 0xDB, /* U+279B */ (char)0xDB,
/* U+279C */ 0xDC, /* U+279C */ (char)0xDC,
/* U+279D */ 0xDD, /* U+279D */ (char)0xDD,
/* U+279E */ 0xDE, /* U+279E */ (char)0xDE,
/* U+279F */ 0xDF, /* U+279F */ (char)0xDF,
/* U+27A0 */ 0xE0, /* U+27A0 */ (char)0xE0,
/* U+27A1 */ 0xE1, /* U+27A1 */ (char)0xE1,
/* U+27A2 */ 0xE2, /* U+27A2 */ (char)0xE2,
/* U+27A3 */ 0xE3, /* U+27A3 */ (char)0xE3,
/* U+27A4 */ 0xE4, /* U+27A4 */ (char)0xE4,
/* U+27A5 */ 0xE5, /* U+27A5 */ (char)0xE5,
/* U+27A6 */ 0xE6, /* U+27A6 */ (char)0xE6,
/* U+27A7 */ 0xE7, /* U+27A7 */ (char)0xE7,
/* U+27A8 */ 0xE8, /* U+27A8 */ (char)0xE8,
/* U+27A9 */ 0xE9, /* U+27A9 */ (char)0xE9,
/* U+27AA */ 0xEA, /* U+27AA */ (char)0xEA,
/* U+27AB */ 0xEB, /* U+27AB */ (char)0xEB,
/* U+27AC */ 0xEC, /* U+27AC */ (char)0xEC,
/* U+27AD */ 0xED, /* U+27AD */ (char)0xED,
/* U+27AE */ 0xEE, /* U+27AE */ (char)0xEE,
/* U+27AF */ 0xEF, /* U+27AF */ (char)0xEF,
0x00, 0x00,
/* U+27B1 */ 0xF1, /* U+27B1 */ (char)0xF1,
/* U+27B2 */ 0xF2, /* U+27B2 */ (char)0xF2,
/* U+27B3 */ 0xF3, /* U+27B3 */ (char)0xF3,
/* U+27B4 */ 0xF4, /* U+27B4 */ (char)0xF4,
/* U+27B5 */ 0xF5, /* U+27B5 */ (char)0xF5,
/* U+27B6 */ 0xF6, /* U+27B6 */ (char)0xF6,
/* U+27B7 */ 0xF7, /* U+27B7 */ (char)0xF7,
/* U+27B8 */ 0xF8, /* U+27B8 */ (char)0xF8,
/* U+27B9 */ 0xF9, /* U+27B9 */ (char)0xF9,
/* U+27BA */ 0xFA, /* U+27BA */ (char)0xFA,
/* U+27BB */ 0xFB, /* U+27BB */ (char)0xFB,
/* U+27BC */ 0xFC, /* U+27BC */ (char)0xFC,
/* U+27BD */ 0xFD, /* U+27BD */ (char)0xFD,
/* U+27BE */ 0xFE, /* U+27BE */ (char)0xFE,
}; };
static const char unicode_to_dingbats_1b_F8D7[] = { static const char unicode_to_dingbats_1b_F8D7[] = {
/* U+F8D7 */ 0x80, /* U+F8D7 */ (char)0x80,
/* U+F8D8 */ 0x81, /* U+F8D8 */ (char)0x81,
/* U+F8D9 */ 0x82, /* U+F8D9 */ (char)0x82,
/* U+F8DA */ 0x83, /* U+F8DA */ (char)0x83,
/* U+F8DB */ 0x84, /* U+F8DB */ (char)0x84,
/* U+F8DC */ 0x85, /* U+F8DC */ (char)0x85,
/* U+F8DD */ 0x86, /* U+F8DD */ (char)0x86,
/* U+F8DE */ 0x87, /* U+F8DE */ (char)0x87,
/* U+F8DF */ 0x88, /* U+F8DF */ (char)0x88,
/* U+F8E0 */ 0x89, /* U+F8E0 */ (char)0x89,
/* U+F8E1 */ 0x8A, /* U+F8E1 */ (char)0x8A,
/* U+F8E2 */ 0x8B, /* U+F8E2 */ (char)0x8B,
/* U+F8E3 */ 0x8C, /* U+F8E3 */ (char)0x8C,
/* U+F8E4 */ 0x8D, /* U+F8E4 */ (char)0x8D,
}; };
+95 -95
View File
@@ -141,12 +141,12 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+00AC */ 0xD8, /* U+00AC */ (char)0xD8,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+00B0 */ 0xB0, /* U+00B0 */ (char)0xB0,
/* U+00B1 */ 0xB1, /* U+00B1 */ (char)0xB1,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -184,7 +184,7 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+00D7 */ 0xB4, /* U+00D7 */ (char)0xB4,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -216,11 +216,11 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+00F7 */ 0xB8, /* U+00F7 */ (char)0xB8,
}; };
static const char unicode_to_symbol_1b_0192[] = { static const char unicode_to_symbol_1b_0192[] = {
/* U+0192 */ 0xA6, /* U+0192 */ (char)0xA6,
}; };
static const char unicode_to_symbol_1b_0391[] = { static const char unicode_to_symbol_1b_0391[] = {
@@ -289,7 +289,7 @@ static const char unicode_to_symbol_1b_0391[] = {
0x00, 0x00,
0x00, 0x00,
/* U+03D1 */ 0x4A, /* U+03D1 */ 0x4A,
/* U+03D2 */ 0xA1, /* U+03D2 */ (char)0xA1,
0x00, 0x00,
0x00, 0x00,
/* U+03D5 */ 0x6A, /* U+03D5 */ 0x6A,
@@ -297,11 +297,11 @@ static const char unicode_to_symbol_1b_0391[] = {
}; };
static const char unicode_to_symbol_1b_2022[] = { static const char unicode_to_symbol_1b_2022[] = {
/* U+2022 */ 0xB7, /* U+2022 */ (char)0xB7,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2026 */ 0xBC, /* U+2026 */ (char)0xBC,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -313,8 +313,8 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2032 */ 0xA2, /* U+2032 */ (char)0xA2,
/* U+2033 */ 0xB2, /* U+2033 */ (char)0xB2,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -331,7 +331,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2044 */ 0xA4, /* U+2044 */ (char)0xA4,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -435,7 +435,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+20AC */ 0xA0, /* U+20AC */ (char)0xA0,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -536,18 +536,18 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2111 */ 0xC1, /* U+2111 */ (char)0xC1,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2118 */ 0xC3, /* U+2118 */ (char)0xC3,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+211C */ 0xC2, /* U+211C */ (char)0xC2,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -572,7 +572,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2135 */ 0xC0, /* U+2135 */ (char)0xC0,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -663,11 +663,11 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2190 */ 0xAC, /* U+2190 */ (char)0xAC,
/* U+2191 */ 0xAD, /* U+2191 */ (char)0xAD,
/* U+2192 */ 0xAE, /* U+2192 */ (char)0xAE,
/* U+2193 */ 0xAF, /* U+2193 */ (char)0xAF,
/* U+2194 */ 0xAB, /* U+2194 */ (char)0xAB,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -700,7 +700,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+21B5 */ 0xBF, /* U+21B5 */ (char)0xBF,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -727,11 +727,11 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+21D0 */ 0xDC, /* U+21D0 */ (char)0xDC,
/* U+21D1 */ 0xDD, /* U+21D1 */ (char)0xDD,
/* U+21D2 */ 0xDE, /* U+21D2 */ (char)0xDE,
/* U+21D3 */ 0xDF, /* U+21D3 */ (char)0xDF,
/* U+21D4 */ 0xDB, /* U+21D4 */ (char)0xDB,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -777,48 +777,48 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
/* U+2200 */ 0x22, /* U+2200 */ 0x22,
0x00, 0x00,
/* U+2202 */ 0xB6, /* U+2202 */ (char)0xB6,
/* U+2203 */ 0x24, /* U+2203 */ 0x24,
0x00, 0x00,
/* U+2205 */ 0xC6, /* U+2205 */ (char)0xC6,
/* U+2206 */ 0x44, /* U+2206 */ 0x44,
/* U+2207 */ 0xD1, /* U+2207 */ (char)0xD1,
/* U+2208 */ 0xCE, /* U+2208 */ (char)0xCE,
/* U+2209 */ 0xCF, /* U+2209 */ (char)0xCF,
0x00, 0x00,
/* U+220B */ 0x27, /* U+220B */ 0x27,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+220F */ 0xD5, /* U+220F */ (char)0xD5,
0x00, 0x00,
/* U+2211 */ 0xE5, /* U+2211 */ (char)0xE5,
/* U+2212 */ 0x2D, /* U+2212 */ 0x2D,
0x00, 0x00,
0x00, 0x00,
/* U+2215 */ 0xA4, /* U+2215 */ (char)0xA4,
0x00, 0x00,
/* U+2217 */ 0x2A, /* U+2217 */ 0x2A,
0x00, 0x00,
0x00, 0x00,
/* U+221A */ 0xD6, /* U+221A */ (char)0xD6,
0x00, 0x00,
0x00, 0x00,
/* U+221D */ 0xB5, /* U+221D */ (char)0xB5,
/* U+221E */ 0xA5, /* U+221E */ (char)0xA5,
0x00, 0x00,
/* U+2220 */ 0xD0, /* U+2220 */ (char)0xD0,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2227 */ 0xD9, /* U+2227 */ (char)0xD9,
/* U+2228 */ 0xDA, /* U+2228 */ (char)0xDA,
/* U+2229 */ 0xC7, /* U+2229 */ (char)0xC7,
/* U+222A */ 0xC8, /* U+222A */ (char)0xC8,
/* U+222B */ 0xF2, /* U+222B */ (char)0xF2,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -847,7 +847,7 @@ static const char unicode_to_symbol_1b_2022[] = {
/* U+2245 */ 0x40, /* U+2245 */ 0x40,
0x00, 0x00,
0x00, 0x00,
/* U+2248 */ 0xBB, /* U+2248 */ (char)0xBB,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -871,12 +871,12 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2260 */ 0xB9, /* U+2260 */ (char)0xB9,
/* U+2261 */ 0xBA, /* U+2261 */ (char)0xBA,
0x00, 0x00,
0x00, 0x00,
/* U+2264 */ 0xA3, /* U+2264 */ (char)0xA3,
/* U+2265 */ 0xB3, /* U+2265 */ (char)0xB3,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -905,12 +905,12 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2282 */ 0xCC, /* U+2282 */ (char)0xCC,
/* U+2283 */ 0xC9, /* U+2283 */ (char)0xC9,
/* U+2284 */ 0xCB, /* U+2284 */ (char)0xCB,
0x00, 0x00,
/* U+2286 */ 0xCD, /* U+2286 */ (char)0xCD,
/* U+2287 */ 0xCA, /* U+2287 */ (char)0xCA,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -924,9 +924,9 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2295 */ 0xC5, /* U+2295 */ (char)0xC5,
0x00, 0x00,
/* U+2297 */ 0xC4, /* U+2297 */ (char)0xC4,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -972,7 +972,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+22C5 */ 0xD7, /* U+22C5 */ (char)0xD7,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -1063,8 +1063,8 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2320 */ 0xF3, /* U+2320 */ (char)0xF3,
/* U+2321 */ 0xF5, /* U+2321 */ (char)0xF5,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -1072,55 +1072,55 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
/* U+2329 */ 0xE1, /* U+2329 */ (char)0xE1,
/* U+232A */ 0xF1, /* U+232A */ (char)0xF1,
}; };
static const char unicode_to_symbol_1b_25CA[] = { static const char unicode_to_symbol_1b_25CA[] = {
/* U+25CA */ 0xE0, /* U+25CA */ (char)0xE0,
}; };
static const char unicode_to_symbol_1b_2660[] = { static const char unicode_to_symbol_1b_2660[] = {
/* U+2660 */ 0xAA, /* U+2660 */ (char)0xAA,
0x00, 0x00,
0x00, 0x00,
/* U+2663 */ 0xA7, /* U+2663 */ (char)0xA7,
0x00, 0x00,
/* U+2665 */ 0xA9, /* U+2665 */ (char)0xA9,
/* U+2666 */ 0xA8, /* U+2666 */ (char)0xA8,
}; };
static const char unicode_to_symbol_1b_F6D9[] = { static const char unicode_to_symbol_1b_F6D9[] = {
/* U+F6D9 */ 0xD3, /* U+F6D9 */ (char)0xD3,
/* U+F6DA */ 0xD2, /* U+F6DA */ (char)0xD2,
/* U+F6DB */ 0xD4, /* U+F6DB */ (char)0xD4,
}; };
static const char unicode_to_symbol_1b_F8E5[] = { static const char unicode_to_symbol_1b_F8E5[] = {
/* U+F8E5 */ 0x60, /* U+F8E5 */ 0x60,
/* U+F8E6 */ 0xBD, /* U+F8E6 */ (char)0xBD,
/* U+F8E7 */ 0xBE, /* U+F8E7 */ (char)0xBE,
/* U+F8E8 */ 0xE2, /* U+F8E8 */ (char)0xE2,
/* U+F8E9 */ 0xE3, /* U+F8E9 */ (char)0xE3,
/* U+F8EA */ 0xE4, /* U+F8EA */ (char)0xE4,
/* U+F8EB */ 0xE6, /* U+F8EB */ (char)0xE6,
/* U+F8EC */ 0xE7, /* U+F8EC */ (char)0xE7,
/* U+F8ED */ 0xE8, /* U+F8ED */ (char)0xE8,
/* U+F8EE */ 0xE9, /* U+F8EE */ (char)0xE9,
/* U+F8EF */ 0xEA, /* U+F8EF */ (char)0xEA,
/* U+F8F0 */ 0xEB, /* U+F8F0 */ (char)0xEB,
/* U+F8F1 */ 0xEC, /* U+F8F1 */ (char)0xEC,
/* U+F8F2 */ 0xED, /* U+F8F2 */ (char)0xED,
/* U+F8F3 */ 0xEE, /* U+F8F3 */ (char)0xEE,
/* U+F8F4 */ 0xEF, /* U+F8F4 */ (char)0xEF,
/* U+F8F5 */ 0xF4, /* U+F8F5 */ (char)0xF4,
/* U+F8F6 */ 0xF6, /* U+F8F6 */ (char)0xF6,
/* U+F8F7 */ 0xF7, /* U+F8F7 */ (char)0xF7,
/* U+F8F8 */ 0xF8, /* U+F8F8 */ (char)0xF8,
/* U+F8F9 */ 0xF9, /* U+F8F9 */ (char)0xF9,
/* U+F8FA */ 0xFA, /* U+F8FA */ (char)0xFA,
/* U+F8FB */ 0xFB, /* U+F8FB */ (char)0xFB,
/* U+F8FC */ 0xFC, /* U+F8FC */ (char)0xFC,
/* U+F8FD */ 0xFD, /* U+F8FD */ (char)0xFD,
/* U+F8FE */ 0xFE, /* U+F8FE */ (char)0xFE,
}; };
-1
View File
@@ -63,7 +63,6 @@ int ucs2fontmap(char *s, unsigned int ucs, int enc) {
s[0] = (char) ((ucs & 0xFF00) >> 8); s[0] = (char) ((ucs & 0xFF00) >> 8);
s[1] = (char) (ucs & 0xFF); s[1] = (char) (ucs & 0xFF);
return 0; return 0;
break;
case 1: /* iso8859-1 */ case 1: /* iso8859-1 */
if (ucs <= 0x00FF) { if (ucs <= 0x00FF) {
if (ucs >= 0x0001) { if (ucs >= 0x0001) {
+1 -1
View File
@@ -41,7 +41,7 @@ void magic_number_cb(void *p)
w->redraw_label(); w->redraw_label();
} }
void* prime_func(void* p) extern "C" void* prime_func(void* p)
{ {
Fl_Browser* browser = (Fl_Browser*) p; Fl_Browser* browser = (Fl_Browser*) p;
Fl_Value_Output *value; Fl_Value_Output *value;
+12 -3
View File
@@ -40,8 +40,11 @@
# include <pthread.h> # include <pthread.h>
typedef pthread_t Fl_Thread; typedef pthread_t Fl_Thread;
extern "C" {
typedef void *(Fl_Thread_Func)(void *);
}
static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return pthread_create((pthread_t*)&t, 0, f, p); return pthread_create((pthread_t*)&t, 0, f, p);
} }
@@ -51,8 +54,11 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
# include <process.h> # include <process.h>
typedef unsigned long Fl_Thread; typedef unsigned long Fl_Thread;
extern "C" {
typedef void *(__cdecl Fl_Thread_Func)(void *);
}
static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p); return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p);
} }
@@ -60,8 +66,11 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
# include <process.h> # include <process.h>
typedef unsigned long Fl_Thread; typedef unsigned long Fl_Thread;
extern "C" {
typedef void *(__cdecl Fl_Thread_Func)(void *);
}
static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return t = (Fl_Thread)_beginthread((void(* )( void * ))f, 32000, p); return t = (Fl_Thread)_beginthread((void(* )( void * ))f, 32000, p);
} }
# endif // !HAVE_PTHREAD_H # endif // !HAVE_PTHREAD_H