Mercurial > dwindows
comparison os2/dw.c @ 1692:6e26c9ead2fe
Fixed a variety of warnings in different compiler/linker combinations on OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 01 May 2012 23:12:02 +0000 |
parents | 0bf394615372 |
children | b2311922a4de |
comparison
equal
deleted
inserted
replaced
1691:0bf394615372 | 1692:6e26c9ead2fe |
---|---|
1511 WinQueryPresParam(hWnd, PP_BACKGROUNDCOLORINDEX, 0, NULL, sizeof(bcolor), &bcolor, QPF_NOINHERIT)) | 1511 WinQueryPresParam(hWnd, PP_BACKGROUNDCOLORINDEX, 0, NULL, sizeof(bcolor), &bcolor, QPF_NOINHERIT)) |
1512 GpiSetBackColor(hpsPaint, bcolor); | 1512 GpiSetBackColor(hpsPaint, bcolor); |
1513 if(WinQueryPresParam(hWnd, PP_FOREGROUNDCOLOR, 0, NULL, sizeof(fcolor), &fcolor, QPF_NOINHERIT) || | 1513 if(WinQueryPresParam(hWnd, PP_FOREGROUNDCOLOR, 0, NULL, sizeof(fcolor), &fcolor, QPF_NOINHERIT) || |
1514 WinQueryPresParam(hWnd, PP_FOREGROUNDCOLORINDEX, 0, NULL, sizeof(fcolor), &fcolor, QPF_NOINHERIT)) | 1514 WinQueryPresParam(hWnd, PP_FOREGROUNDCOLORINDEX, 0, NULL, sizeof(fcolor), &fcolor, QPF_NOINHERIT)) |
1515 GpiSetColor(hpsPaint, fcolor); | 1515 GpiSetColor(hpsPaint, fcolor); |
1516 WinDrawText(hpsPaint, -1, tempbuf, &rclPaint, DT_TEXTATTRS, DT_TEXTATTRS, style | DT_TEXTATTRS | DT_ERASERECT); | 1516 WinDrawText(hpsPaint, -1, (PCH)tempbuf, &rclPaint, DT_TEXTATTRS, DT_TEXTATTRS, style | DT_TEXTATTRS | DT_ERASERECT); |
1517 } | 1517 } |
1518 | 1518 |
1519 /* Function: BubbleProc | 1519 /* Function: BubbleProc |
1520 * Abstract: Subclass procedure for bubble help | 1520 * Abstract: Subclass procedure for bubble help |
1521 */ | 1521 */ |
11636 * -1 on error. | 11636 * -1 on error. |
11637 */ | 11637 */ |
11638 int API dw_exec(char *program, int type, char **params) | 11638 int API dw_exec(char *program, int type, char **params) |
11639 { | 11639 { |
11640 type = type; /* keep compiler happy */ | 11640 type = type; /* keep compiler happy */ |
11641 #ifdef __EMX__ | |
11641 return spawnvp(P_NOWAIT, program, (char * const *)params); | 11642 return spawnvp(P_NOWAIT, program, (char * const *)params); |
11643 #else | |
11644 return spawnvp(P_NOWAIT, program, (const char * const *)params); | |
11645 #endif | |
11642 } | 11646 } |
11643 | 11647 |
11644 /* | 11648 /* |
11645 * Loads a web browser pointed at the given URL. | 11649 * Loads a web browser pointed at the given URL. |
11646 * Parameters: | 11650 * Parameters: |
11762 | 11766 |
11763 typedef struct _dwprint | 11767 typedef struct _dwprint |
11764 { | 11768 { |
11765 HDC hdc; | 11769 HDC hdc; |
11766 char *printername; | 11770 char *printername; |
11767 int (* API drawfunc)(HPRINT, HPIXMAP, int, void *); | 11771 int (API_FUNC drawfunc)(HPRINT, HPIXMAP, int, void *); |
11768 void *drawdata; | 11772 void *drawdata; |
11769 unsigned long flags; | 11773 unsigned long flags; |
11770 unsigned int startpage, endpage; | 11774 unsigned int startpage, endpage; |
11771 char *jobname; | 11775 char *jobname; |
11772 } DWPrint; | 11776 } DWPrint; |
11879 int cb = PrfQueryProfileString(HINI_PROFILE, (PSZ)"PM_SPOOLER", (PSZ)"PRINTER", (PSZ)"", printername, 32); | 11883 int cb = PrfQueryProfileString(HINI_PROFILE, (PSZ)"PM_SPOOLER", (PSZ)"PRINTER", (PSZ)"", printername, 32); |
11880 | 11884 |
11881 if(!drawfunc || !(print = calloc(1, sizeof(DWPrint)))) | 11885 if(!drawfunc || !(print = calloc(1, sizeof(DWPrint)))) |
11882 return NULL; | 11886 return NULL; |
11883 | 11887 |
11884 print->drawfunc = drawfunc; | 11888 print->drawfunc = (int (API_FUNC)(HPRINT, HPIXMAP, int, void *))drawfunc; |
11885 print->drawdata = drawdata; | 11889 print->drawdata = drawdata; |
11886 print->jobname = jobname ? jobname : "Dynamic Windows Print Job"; | 11890 print->jobname = jobname ? jobname : "Dynamic Windows Print Job"; |
11887 print->startpage = 1; | 11891 print->startpage = 1; |
11888 print->endpage = pages; | 11892 print->endpage = pages; |
11889 print->flags = flags; | 11893 print->flags = flags; |