|
From: Andre R. <and...@us...> - 2004-10-31 16:38:38
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25786 Modified Files: timedate.c player.c process.c uisharing.c zoom.c Log Message: Fixed GCC compiler warnings. Index: timedate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/timedate.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** timedate.c 23 Oct 2004 23:05:38 -0000 1.2 --- timedate.c 31 Oct 2004 16:38:27 -0000 1.3 *************** *** 116,121 **** ! static tyinternationalinfo globalII; ! static tyinternationalinfoptr globalIIptr = NULL; typedef struct tydaterec { --- 116,123 ---- ! #ifdef WIN95VERSION ! static tyinternationalinfo globalII; ! static tyinternationalinfoptr globalIIptr = NULL; ! #endif typedef struct tydaterec { *************** *** 138,141 **** --- 140,144 ---- #ifdef WIN95VERSION + boolean ValidDate ( unsigned char * strIn, *************** *** 153,269 **** unsigned long * validUnits, tyvalidationerrorptr err); - #endif static boolean getNewLocaleString (unsigned long lc, char ** foo, char * defValue) { - #ifdef MACVERSION - return (false); - #endif ! #ifdef WIN95VERSION ! char buf[300]; ! short len; ! len = GetLocaleInfo (LOCALE_USER_DEFAULT, lc, buf, 300); ! if (len != 0) { ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (buf, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len-1); ! nullterminate ((*foo)); ! return (true); ! } } ! else { ! len = strlen (defValue); ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (defValue, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); ! } } ! return (false); ! #endif } /*getNewLocaleString*/ static boolean getNewLocalePatternString (unsigned long lc, char ** foo, char * defValue) { - #ifdef MACVERSION - return (false); - #endif ! #ifdef WIN95VERSION ! char buf[256]; ! char buf2[256]; ! short i, j, cnt, len; ! char c; ! len = GetLocaleInfo (LOCALE_USER_DEFAULT, lc, buf, 256); ! --len; ! if (len != 0) { ! i = 0; ! j = 0; ! while (len > i) { ! c = buf[i++]; ! switch (c) { ! case 'M': ! case 'd': ! case 'y': ! case 'h': ! case 'm': ! case 's': ! case 't': ! cnt = 1; ! while (buf[i] == c) { ! ++cnt; ! ++i; ! } ! buf2[j++] = '%'; ! buf2[j++] = '%'; ! buf2[j++] = toupper(c); ! if (cnt > 2) ! buf2[j++] = 'N'; ! else ! buf2[j++] = '#'; ! break; ! default: ! buf2[j++] = c; ! break; ! } } ! len = j; ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (buf2, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); ! } } ! else { ! len = strlen (defValue); ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (defValue, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); ! } } ! return (false); ! #endif } --- 156,261 ---- unsigned long * validUnits, tyvalidationerrorptr err); static boolean getNewLocaleString (unsigned long lc, char ** foo, char * defValue) { ! char buf[300]; ! short len; ! len = GetLocaleInfo (LOCALE_USER_DEFAULT, lc, buf, 300); ! if (len != 0) { ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (buf, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len-1); ! nullterminate ((*foo)); ! return (true); } ! } ! else { ! len = strlen (defValue); ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (defValue, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); } + } ! return (false); } /*getNewLocaleString*/ static boolean getNewLocalePatternString (unsigned long lc, char ** foo, char * defValue) { ! char buf[256]; ! char buf2[256]; ! short i, j, cnt, len; ! char c; ! len = GetLocaleInfo (LOCALE_USER_DEFAULT, lc, buf, 256); ! --len; ! if (len != 0) { ! i = 0; ! j = 0; ! while (len > i) { ! c = buf[i++]; ! switch (c) { ! case 'M': ! case 'd': ! case 'y': ! case 'h': ! case 'm': ! case 's': ! case 't': ! cnt = 1; ! while (buf[i] == c) { ! ++cnt; ! ++i; ! } ! buf2[j++] = '%'; ! buf2[j++] = '%'; ! buf2[j++] = toupper(c); ! if (cnt > 2) ! buf2[j++] = 'N'; ! else ! buf2[j++] = '#'; ! break; ! default: ! buf2[j++] = c; ! break; } + } ! len = j; ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (buf2, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); } ! } ! else { ! len = strlen (defValue); ! *foo = malloc (len + 2); ! if (*foo != NULL) { ! moveleft (defValue, stringbaseaddress((*foo)), len); ! setstringlength ((*foo), len); ! nullterminate ((*foo)); ! return (true); } + } ! return (false); } *************** *** 271,365 **** static boolean initInternationalInfo() { ! #ifdef MACVERSION ! boolean res = false; ! #endif ! ! #ifdef WIN95VERSION ! short i; ! boolean res = true; ! res = res && getNewLocaleString (LOCALE_SDAYNAME7, &globalII.longDaysOfWeek[0], "Sunday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME1, &globalII.longDaysOfWeek[1], "Monday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME2, &globalII.longDaysOfWeek[2], "Tuesday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME3, &globalII.longDaysOfWeek[3], "Wednesday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME4, &globalII.longDaysOfWeek[4], "Thursday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME5, &globalII.longDaysOfWeek[5], "Friday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME6, &globalII.longDaysOfWeek[6], "Saturday"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[7], "Yesterday"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[8], "Today"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[9], "Tomorrow"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME7, &globalII.shortDaysOfWeek[0], "Sun"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME1, &globalII.shortDaysOfWeek[1], "Mon"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME2, &globalII.shortDaysOfWeek[2], "Tue"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME3, &globalII.shortDaysOfWeek[3], "Wed"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME4, &globalII.shortDaysOfWeek[4], "Thu"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME5, &globalII.shortDaysOfWeek[5], "Fri"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME6, &globalII.shortDaysOfWeek[6], "Sat"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[7], "Yest"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[8], "Tod"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[9], "Tom"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME1, &globalII.longMonths[0], "January"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME2, &globalII.longMonths[1], "February"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME3, &globalII.longMonths[2], "March"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME4, &globalII.longMonths[3], "April"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME5, &globalII.longMonths[4], "May"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME6, &globalII.longMonths[5], "June"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME7, &globalII.longMonths[6], "July"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME8, &globalII.longMonths[7], "August"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME9, &globalII.longMonths[8], "September"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME10, &globalII.longMonths[9], "October"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME11, &globalII.longMonths[10], "November"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME12, &globalII.longMonths[11], "December"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME13, &globalII.longMonths[12], ""); ! ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME1, &globalII.shortMonths[0], "Jan"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME2, &globalII.shortMonths[1], "Feb"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME3, &globalII.shortMonths[2], "Mar"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME4, &globalII.shortMonths[3], "Apr"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME5, &globalII.shortMonths[4], "May"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME6, &globalII.shortMonths[5], "Jun"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME7, &globalII.shortMonths[6], "Jul"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME8, &globalII.shortMonths[7], "Aug"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME9, &globalII.shortMonths[8], "Sep"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME10, &globalII.shortMonths[9], "Oct"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME11, &globalII.shortMonths[10], "Nov"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME12, &globalII.shortMonths[11], "Dec"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME13, &globalII.shortMonths[12], ""); ! ! res = res && getNewLocaleString (LOCALE_S1159, &globalII.morning, "AM"); ! res = res && getNewLocaleString (LOCALE_S2359, &globalII.evening, "PM"); ! res = res && getNewLocaleString (999999, &globalII.military, "hours"); ! ! res = res && getNewLocaleString (LOCALE_SCURRENCY, &globalII.currency, "$"); ! res = res && getNewLocaleString (LOCALE_SINTLSYMBOL, &globalII.intlCurrency, "USD"); ! res = res && getNewLocaleString (LOCALE_SDECIMAL, &globalII.decimal, "."); ! res = res && getNewLocaleString (LOCALE_STHOUSAND, &globalII.thousands, ","); ! res = res && getNewLocaleString (LOCALE_SLIST, &globalII.list, ","); ! res = res && getNewLocaleString (LOCALE_STIME, &globalII.timesep, ":"); ! res = res && getNewLocaleString (LOCALE_SDATE, &globalII.datesep, "/"); ! res = res && getNewLocalePatternString (LOCALE_SSHORTDATE, &globalII.shortDateFormatPattern, "M#/D#/Y#"); ! res = res && getNewLocalePatternString (LOCALE_SLONGDATE, &globalII.longDateFormatPattern, "DN, MN D#, YN"); ! globalII.numberOfDays = 7; //Make this 10 to use yesterday, today, tommorrow - dave wanted them removed. ! globalII.numberOfMonths = 12; ! globalII.numberOfYears = 0; ! globalII.defaultTimeFormat = false; ! for (i = 0; i < globalII.numberOfMonths; i++) { ! globalII.daysInMonth[i] = daysInMonthsArray[i]; ! } ! for (i = globalII.numberOfMonths; i < 13; i++) { ! globalII.daysInMonth[i] = 0; ! } ! if (res) ! globalIIptr = &globalII; ! #endif return (res); --- 263,351 ---- static boolean initInternationalInfo() { ! short i; ! boolean res = true; ! res = res && getNewLocaleString (LOCALE_SDAYNAME7, &globalII.longDaysOfWeek[0], "Sunday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME1, &globalII.longDaysOfWeek[1], "Monday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME2, &globalII.longDaysOfWeek[2], "Tuesday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME3, &globalII.longDaysOfWeek[3], "Wednesday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME4, &globalII.longDaysOfWeek[4], "Thursday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME5, &globalII.longDaysOfWeek[5], "Friday"); ! res = res && getNewLocaleString (LOCALE_SDAYNAME6, &globalII.longDaysOfWeek[6], "Saturday"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[7], "Yesterday"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[8], "Today"); ! res = res && getNewLocaleString (999999, &globalII.longDaysOfWeek[9], "Tomorrow"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME7, &globalII.shortDaysOfWeek[0], "Sun"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME1, &globalII.shortDaysOfWeek[1], "Mon"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME2, &globalII.shortDaysOfWeek[2], "Tue"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME3, &globalII.shortDaysOfWeek[3], "Wed"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME4, &globalII.shortDaysOfWeek[4], "Thu"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME5, &globalII.shortDaysOfWeek[5], "Fri"); ! res = res && getNewLocaleString (LOCALE_SABBREVDAYNAME6, &globalII.shortDaysOfWeek[6], "Sat"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[7], "Yest"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[8], "Tod"); ! res = res && getNewLocaleString (999999, &globalII.shortDaysOfWeek[9], "Tom"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME1, &globalII.longMonths[0], "January"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME2, &globalII.longMonths[1], "February"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME3, &globalII.longMonths[2], "March"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME4, &globalII.longMonths[3], "April"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME5, &globalII.longMonths[4], "May"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME6, &globalII.longMonths[5], "June"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME7, &globalII.longMonths[6], "July"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME8, &globalII.longMonths[7], "August"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME9, &globalII.longMonths[8], "September"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME10, &globalII.longMonths[9], "October"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME11, &globalII.longMonths[10], "November"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME12, &globalII.longMonths[11], "December"); ! res = res && getNewLocaleString (LOCALE_SMONTHNAME13, &globalII.longMonths[12], ""); ! ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME1, &globalII.shortMonths[0], "Jan"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME2, &globalII.shortMonths[1], "Feb"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME3, &globalII.shortMonths[2], "Mar"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME4, &globalII.shortMonths[3], "Apr"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME5, &globalII.shortMonths[4], "May"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME6, &globalII.shortMonths[5], "Jun"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME7, &globalII.shortMonths[6], "Jul"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME8, &globalII.shortMonths[7], "Aug"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME9, &globalII.shortMonths[8], "Sep"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME10, &globalII.shortMonths[9], "Oct"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME11, &globalII.shortMonths[10], "Nov"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME12, &globalII.shortMonths[11], "Dec"); ! res = res && getNewLocaleString (LOCALE_SABBREVMONTHNAME13, &globalII.shortMonths[12], ""); ! ! res = res && getNewLocaleString (LOCALE_S1159, &globalII.morning, "AM"); ! res = res && getNewLocaleString (LOCALE_S2359, &globalII.evening, "PM"); ! res = res && getNewLocaleString (999999, &globalII.military, "hours"); ! ! res = res && getNewLocaleString (LOCALE_SCURRENCY, &globalII.currency, "$"); ! res = res && getNewLocaleString (LOCALE_SINTLSYMBOL, &globalII.intlCurrency, "USD"); ! res = res && getNewLocaleString (LOCALE_SDECIMAL, &globalII.decimal, "."); ! res = res && getNewLocaleString (LOCALE_STHOUSAND, &globalII.thousands, ","); ! res = res && getNewLocaleString (LOCALE_SLIST, &globalII.list, ","); ! res = res && getNewLocaleString (LOCALE_STIME, &globalII.timesep, ":"); ! res = res && getNewLocaleString (LOCALE_SDATE, &globalII.datesep, "/"); ! res = res && getNewLocalePatternString (LOCALE_SSHORTDATE, &globalII.shortDateFormatPattern, "M#/D#/Y#"); ! res = res && getNewLocalePatternString (LOCALE_SLONGDATE, &globalII.longDateFormatPattern, "DN, MN D#, YN"); ! globalII.numberOfDays = 7; //Make this 10 to use yesterday, today, tommorrow - dave wanted them removed. ! globalII.numberOfMonths = 12; ! globalII.numberOfYears = 0; ! globalII.defaultTimeFormat = false; ! for (i = 0; i < globalII.numberOfMonths; i++) { ! globalII.daysInMonth[i] = daysInMonthsArray[i]; ! } ! for (i = globalII.numberOfMonths; i < 13; i++) { ! globalII.daysInMonth[i] = 0; ! } ! if (res) ! globalIIptr = &globalII; return (res); *************** *** 367,371 **** ! tyinternationalinfoptr getIntlInfo () { if (globalIIptr == NULL) { if (initInternationalInfo()) { --- 353,357 ---- ! tyinternationalinfoptr getIntlInfo (void) { if (globalIIptr == NULL) { if (initInternationalInfo()) { *************** *** 395,399 **** - #ifdef WIN95VERSION static void getDateTime (tydaterecptr dt) { SYSTEMTIME sysdt; --- 381,384 ---- *************** *** 1496,1500 **** } /*getdaystring*/ ! long getcurrenttimezonebias() { #ifdef MACVERSION MachineLocation ml; --- 1481,1485 ---- } /*getdaystring*/ ! long getcurrenttimezonebias(void) { #ifdef MACVERSION MachineLocation ml; Index: zoom.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/zoom.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zoom.c 23 Oct 2004 23:07:56 -0000 1.2 --- zoom.c 31 Oct 2004 16:38:27 -0000 1.3 *************** *** 63,67 **** void middlerect (Rect rorig, Rect *rmiddle) { ! /* compute a rectangle which is at or near the center of rorig of minimum dimensions. --- 63,67 ---- void middlerect (Rect rorig, Rect *rmiddle) { ! /% compute a rectangle which is at or near the center of rorig of minimum dimensions. *************** *** 74,79 **** r.top = r.bottom = rorig.top + ((rorig.bottom - rorig.top) / 2); ! *rmiddle = r; /*return value%/ ! } /*middlerect*/ --- 74,80 ---- r.top = r.bottom = rorig.top + ((rorig.bottom - rorig.top) / 2); ! *rmiddle = r; /%return value%/ ! } /%middlerect%/ ! */ *************** *** 215,220 **** zoomrect (&rmiddle, &r, true); ! } /*zoomfrommiddle*/ ! void zoomport (Rect rsource, WindowPtr w, boolean flzoomup) { --- 216,221 ---- zoomrect (&rmiddle, &r, true); ! } /%zoomfrommiddle%/ ! */ void zoomport (Rect rsource, WindowPtr w, boolean flzoomup) { *************** *** 398,402 **** boolean zoomtempwindow (boolean flzoom, short height, short width, WindowPtr *w) { ! /* a temp window is like the one used in the About... command. --- 399,403 ---- boolean zoomtempwindow (boolean flzoom, short height, short width, WindowPtr *w) { ! /% a temp window is like the one used in the About... command. *************** *** 407,411 **** Rect r, rsource; ! /* SetRect (&r, 0, 0, width, height); --- 408,412 ---- Rect r, rsource; ! /% SetRect (&r, 0, 0, width, height); *************** *** 422,431 **** if (!newcolorwindow (height, width, w)) { ! sysbeep (); /*instead of showing window%/ return (false); } ! x = *w; /*copy into register%/ pushport (x); --- 423,432 ---- if (!newcolorwindow (height, width, w)) { ! sysbeep (); /%instead of showing window%/ return (false); } ! x = *w; /%copy into register%/ pushport (x); *************** *** 442,449 **** ShowWindow (x); ! *w = x; /*return pointer to window record%/ return (true); ! } /*zoomtempwindow%/ --- 443,450 ---- ShowWindow (x); ! *w = x; /%return pointer to window record%/ return (true); ! } /%zoomtempwindow%/ *************** *** 466,470 **** popport (); } ! } /*closetempwindow%/ --- 467,471 ---- popport (); } ! } /%closetempwindow%/ *************** *** 488,492 **** return; ! case updateEvt: /*handle updates, he might be using Pyro!%/ if ((WindowPtr) (ev.message) == x) { --- 489,493 ---- return; ! case updateEvt: /%handle updates, he might be using Pyro!%/ if ((WindowPtr) (ev.message) == x) { *************** *** 504,510 **** break; ! } /*switch%/ ! } /*while%/ ! } /*modaltempwindow*/ --- 505,512 ---- break; ! } /%switch%/ ! } /%while%/ ! } /%modaltempwindow%/ ! */ Index: process.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/process.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** process.c 23 Oct 2004 22:49:31 -0000 1.2 --- process.c 31 Oct 2004 16:38:27 -0000 1.3 *************** *** 532,536 **** #ifdef landinclude ! if (landvisitsleepingthreads (visit, refcon)) return (true); #endif --- 532,536 ---- #ifdef landinclude ! if (landvisitsleepingthreads ((landqueuepopcallback) visit, refcon)) return (true); #endif *************** *** 754,758 **** /* ! assert (!(**x).flrunning); /*if this can happen, maybe generate langerror?%/ deletefromprocesslist (x); --- 754,758 ---- /* ! assert (!(**x).flrunning); /%if this can happen, maybe generate langerror?%/ deletefromprocesslist (x); *************** *** 2044,2048 **** register hdlprocessrecord hp = (hdlprocessrecord) (**hg).hprocess; ! /***if ((hp != nil) && ((**hg).hccglobals != nil)) { /*a living process*/ if ((hp != nil) && (**hp).floneshot && !(**hg).flthreadkilled) { /*a living 1shot process*/ --- 2044,2048 ---- register hdlprocessrecord hp = (hdlprocessrecord) (**hg).hprocess; ! //if ((hp != nil) && ((**hg).hccglobals != nil)) { /*a living process*/ if ((hp != nil) && (**hp).floneshot && !(**hg).flthreadkilled) { /*a living 1shot process*/ *************** *** 2062,2075 **** ! #if flruntime ! ! boolean abort1shotprocess (void) ! ! #else ! ! static boolean abort1shotprocess (void) - #endif - { /* kill the most recently sharted 1-shot process we find. maybe there's a --- 2062,2067 ---- ! boolean abort1shotprocess (void) { /* kill the most recently sharted 1-shot process we find. maybe there's a *************** *** 2260,2264 **** register short i; ThreadID idthread; ! boolean flrecycle = false; /*default%/ GetCurrentThread (&idthread); --- 2252,2256 ---- register short i; ThreadID idthread; ! boolean flrecycle = false; /%default%/ GetCurrentThread (&idthread); *************** *** 2266,2274 **** for (i = 0; i < threadpoolsize; ++i) { ! if (threadpool [i] == idthread) { /*came from the pool...%/ threadpool [i] = kNoThread; ! flrecycle = true; /*...return to the pool%/ break; --- 2258,2266 ---- for (i = 0; i < threadpoolsize; ++i) { ! if (threadpool [i] == idthread) { /%came from the pool...%/ threadpool [i] = kNoThread; ! flrecycle = true; /%...return to the pool%/ break; *************** *** 2277,2281 **** DisposeThread (kCurrentThread, result, flrecycle) ! } /*exitprocessthread*/ --- 2269,2274 ---- DisposeThread (kCurrentThread, result, flrecycle) ! } /%exitprocessthread%/ ! */ *************** *** 2319,2325 **** ! static void disposeprocessthread (hdlthreadglobals hglobals) { ! disposethreadglobals (hglobals); --ctprocessthreads; --- 2312,2318 ---- ! static void disposeprocessthread (hdlthreadglobals htread) { ! disposethreadglobals (htread); --ctprocessthreads; *************** *** 2372,2378 **** for (i = 0; i < threadpoolsize; ++i) { ! if (threadpool [i] == kNoThread) { /*must have come from the pool...%/ ! threadpool [i] = idthread; /*...keep track of who owns this slot%/ break; --- 2365,2371 ---- for (i = 0; i < threadpoolsize; ++i) { ! if (threadpool [i] == kNoThread) { /%must have come from the pool...%/ ! threadpool [i] = idthread; /%...keep track of who owns this slot%/ break; *************** *** 2441,2445 **** ! static pascal boolean wakeupvisit (hdlthreadglobals hthread, long refcon) { /* --- 2434,2438 ---- ! static pascal boolean wakeupvisit (Handle hthread, long refcon) { /* *************** *** 2543,2551 **** } ! threadcallbacks.disposecallback = disposeprocessthread; ! threadcallbacks.swapincallback = swapinthreadglobals; ! threadcallbacks.swapoutcallback = copythreadglobals; initmainthread (hglobals); --- 2536,2544 ---- } ! threadcallbacks.disposecallback = (tythreadglobalscallback) &disposeprocessthread; ! threadcallbacks.swapincallback = (tythreadglobalscallback) &swapinthreadglobals; ! threadcallbacks.swapoutcallback = (tythreadglobalscallback) ©threadglobals; initmainthread (hglobals); *************** *** 2776,2780 **** //Changed this to wored in OSX kCurrentThread wasn't working //for some reason. ! OSErr anErr = GetCurrentThread(¤tThread); if (ThreadCurrentStackSpace (currentThread, &space) == noErr) return (space); --- 2769,2773 ---- //Changed this to wored in OSX kCurrentThread wasn't working //for some reason. ! GetCurrentThread(¤tThread); if (ThreadCurrentStackSpace (currentThread, &space) == noErr) return (space); *************** *** 3124,3132 **** continue; */ ! /* ! /* ! (**hp).sleepuntil++; //6.1b8 AR: old rescheduling code by dmb -- commented out ! */ ! (**hp).sleepuntil = x + 1; /*6.1b8 AR: reschedule for a second later*/ --- 3117,3123 ---- continue; */ ! ! //(**hp).sleepuntil++; //6.1b8 AR: old rescheduling code by dmb -- commented out ! (**hp).sleepuntil = x + 1; /*6.1b8 AR: reschedule for a second later*/ *************** *** 3241,3245 **** /* ! if (globalsstack.top > 1) { /*can't keep things clean if more than 1 window pushed%/ return; --- 3232,3236 ---- /* ! if (globalsstack.top > 1) { /%can't keep things clean if more than 1 window pushed%/ return; Index: uisharing.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/uisharing.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** uisharing.c 26 Oct 2004 10:27:39 -0000 1.3 --- uisharing.c 31 Oct 2004 16:38:27 -0000 1.4 *************** *** 60,63 **** --- 60,65 ---- + #ifndef isFrontier + static Boolean isFrontProcess () { *************** *** 73,76 **** --- 75,80 ---- return (fl); } /*isFrontProcess*/ + + #endif *************** *** 113,117 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 117,121 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 141,145 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 145,149 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 169,173 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 173,177 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 197,201 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 201,205 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 229,233 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 233,237 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 257,261 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 261,265 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 283,287 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 287,291 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 311,315 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 315,319 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 337,341 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 341,345 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 367,371 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 371,375 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 395,399 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 399,403 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 453,457 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 457,461 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 479,483 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 483,487 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 517,521 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 521,525 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 553,557 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 557,561 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 560,563 **** --- 564,569 ---- + #ifndef isFrontier + glue setobjectvalueGlue (ComponentInstance comp, Handle hcard, Str255 name, Handle value) { *************** *** 585,589 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 591,595 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 617,621 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 623,627 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 649,653 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 655,659 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 677,681 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 683,687 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 683,686 **** --- 689,694 ---- } /*recalcGlue*/ + #endif + glue editGlue (ComponentInstance comp, short editcommand) { *************** *** 705,709 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 713,717 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *)&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 712,715 **** --- 720,725 ---- + #ifndef isFrontier + glue updateGlue (ComponentInstance comp, Handle h) { *************** *** 733,737 **** #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch(&pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); --- 743,747 ---- #if TARGET_API_MAC_CARBON == 1 ! return CallComponentDispatch((ComponentParameters *) &pb); #else return CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &pb); *************** *** 739,742 **** --- 749,755 ---- } /*updateGlue*/ + #endif + + #pragma options align=reset *************** *** 1498,1506 **** return (true); ! error: uisClose (); return (false); } /*uisInit*/ --- 1511,1521 ---- return (true); ! #ifndef isFrontier ! error: uisClose (); return (false); + #endif } /*uisInit*/ Index: player.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/player.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** player.c 23 Oct 2004 22:49:02 -0000 1.2 --- player.c 31 Oct 2004 16:38:27 -0000 1.3 *************** *** 282,285 **** --- 282,287 ---- + #if 0 + static boolean playersave (ptrfilespec fs, hdlfilenum fnum, short rnum, boolean flsaveas, boolean flrunnable) { *************** *** 300,303 **** --- 302,307 ---- } /*playersave*/ + #endif + static boolean playerdisposerecord (void) { *************** *** 333,337 **** --- 337,343 ---- return (id == -1); /*true if target type is generic -- a shell verb*/ } /*playergettargetdata*/ + + #if 0 static boolean playersetsuperglobals (void) { *************** *** 417,420 **** --- 423,428 ---- } /*playeropenmoviefile*/ + #endif + static void playerdisposecurrentmovie (void) { *************** *** 440,444 **** ! boolean isplayerevent () { /* --- 448,452 ---- ! boolean isplayerevent (void) { /* *************** *** 634,640 **** ! static boolean playeractivate (void) { ! return (true); } /*playeractivate*/ --- 642,650 ---- ! static void playeractivate (boolean fl) { ! #pragma unused (fl) ! ! return; } /*playeractivate*/ *************** *** 646,651 **** */ - boolean fl =false; - if (currentcontroller != nil) { --- 656,659 ---- |