Changeset 238 for trunk/src/helpers
- Timestamp:
- Dec 24, 2002, 8:44:35 AM (23 years ago)
- Location:
- trunk/src/helpers
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/_call_filedlg.c
r233 r238 52 52 pfd); 53 53 54 return (hwndReturn);54 return hwndReturn; 55 55 } 56 56 … … 323 323 WinTerminate(hab); 324 324 325 return (0);325 return 0; 326 326 } 327 327 -
trunk/src/helpers/_test_dialog.c
r232 r238 753 753 WinTerminate(hab); 754 754 755 return (0);755 return 0; 756 756 } -
trunk/src/helpers/animate.c
r232 r238 496 496 WinTerminate(hab); 497 497 498 return (0);498 return 0; 499 499 } */ -
trunk/src/helpers/cctl_checkcnr.c
r229 r238 820 820 if (DosCreateMutexSem(NULL, 821 821 &G_hmtxCnrOwnersList, 0, FALSE) != NO_ERROR) 822 return (FALSE);822 return FALSE; 823 823 824 824 if (G_pllCnrOwners == NULL) -
trunk/src/helpers/cctl_progbar.c
r222 r238 412 412 413 413 WinSetWindowULong(hwndChart, QWL_USER, (ULONG)pData); 414 return (TRUE);415 } 416 417 return (FALSE);414 return TRUE; 415 } 416 417 return FALSE; 418 418 } 419 419 -
trunk/src/helpers/cctl_tooltip.c
r232 r238 146 146 147 147 // create mutex and request it right away 148 return (!DosCreateMutexSem(NULL,149 150 151 TRUE)); // request!148 return !DosCreateMutexSem(NULL, 149 &G_hmtxSubclassedTools, 150 0, 151 TRUE); // request! 152 152 } 153 153 … … 855 855 { 856 856 PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1); 857 857 858 switch ((ULONG)mp1) 858 859 { … … 867 868 } 868 869 869 return (0);870 return 0; 870 871 } 871 872 … … 1023 1024 } 1024 1025 1025 return ( (MPARAM)FALSE);1026 return (MRESULT)FALSE; 1026 1027 } 1027 1028 -
trunk/src/helpers/comctl.c
r233 r238 1182 1182 // switch static to icon mode 1183 1183 pa->ulFlags = ANF_ICON; 1184 return (pa);1184 return pa; 1185 1185 } 1186 1186 … … 1301 1301 BOOL ctlStopAnimation(HWND hwndStatic) 1302 1302 { 1303 return (WinStopTimer(WinQueryAnchorBlock(hwndStatic), hwndStatic, 1));1303 return WinStopTimer(WinQueryAnchorBlock(hwndStatic), hwndStatic, 1); 1304 1304 } 1305 1305 … … 1376 1376 if (fPreserveProportions) 1377 1377 pa->ulFlags |= ANF_PROPORTIONAL; 1378 return (pa);1378 return pa; 1379 1379 } 1380 1380 -
trunk/src/helpers/configsys.c
r196 r238 1181 1181 doshQueryPathSize(G_szSwapperFilename, &ulrc); 1182 1182 1183 return (ulrc);1183 return ulrc; 1184 1184 } 1185 1185 … … 1200 1200 } 1201 1201 1202 return (0);1202 return 0; 1203 1203 } */ -
trunk/src/helpers/datetime.c
r184 r238 248 248 long dtYears2Days (unsigned yr) 249 249 { 250 return ( yr * 365L251 + yr / 4252 - yr / 100253 + yr / 400);250 return ( yr * 365L 251 + yr / 4 252 - yr / 100 253 + yr / 400); 254 254 } 255 255 … … 326 326 case 12 : 327 327 if (day <= 31) 328 return (TRUE);328 return TRUE; 329 329 break; 330 330 … … 334 334 case 11 : 335 335 if (day <= 30) 336 return (TRUE);336 return TRUE; 337 337 break; 338 338 339 339 case 2 : 340 340 if (day < 29) 341 return (TRUE);341 return TRUE; 342 342 else 343 343 if (day == 29) -
trunk/src/helpers/debug.c
r229 r238 645 645 { 646 646 fprintf(LogFile, "Error %u seeking CodeView table in %s\n", errno, FileName); 647 return (18);647 return 18; 648 648 } 649 649 … … 653 653 { 654 654 fprintf(LogFile, "Error %u reading debug info from %s\n", errno, FileName); 655 return (19);655 return 19; 656 656 } 657 657 if (G_eodbug.dbug != DBUGSIG) 658 658 { 659 659 // fprintf(LogFile,"\nNo CodeView information stored.\n"); 660 return (100);660 return 100; 661 661 } 662 662 … … 667 667 { 668 668 fprintf(LogFile, "Error %u seeking base codeview data in %s\n", errno, FileName); 669 return (20);669 return 20; 670 670 } 671 671 … … 675 675 { 676 676 fprintf(LogFile, "Error %u reading base codeview data in %s\n", errno, FileName); 677 return (21);677 return 21; 678 678 } 679 679 … … 684 684 { 685 685 fprintf(LogFile, "Error %u seeking dir codeview data in %s\n", errno, FileName); 686 return (22);686 return 22; 687 687 } 688 688 … … 692 692 { 693 693 fprintf(LogFile, "Error %u reading dir codeview data in %s\n", errno, FileName); 694 return (23);694 return 23; 695 695 } 696 696 … … 701 701 { 702 702 fprintf(LogFile, "Out of memory!"); 703 return (-1);703 return -1; 704 704 } 705 705 … … 711 711 fprintf(LogFile, "Error %u reading codeview dir table from %s\n", errno, FileName); 712 712 free(pxdi->pDirTab32); 713 return (24);713 return 24; 714 714 } 715 715 … … 1040 1040 } // end while modindex 1041 1041 } // End While i < numdir 1042 1042 1043 free(pxdi->pDirTab32); 1043 return (0); 1044 1045 return 0; 1044 1046 } 1045 1047 … … 1070 1072 { 1071 1073 fprintf(LogFile, "Error %u seeking CodeView table in %s\n", errno, FileName); 1072 return (18);1074 return 18; 1073 1075 } 1074 1076 … … 1076 1078 { 1077 1079 fprintf(LogFile, "Error %u reading debug info from %s\n", errno, FileName); 1078 return (19);1080 return 19; 1079 1081 } 1080 1082 if (G_eodbug.dbug != DBUGSIG) 1081 1083 { 1082 1084 // fprintf(LogFile,"\nNo CodeView information stored.\n"); 1083 return (100);1085 return 100; 1084 1086 } 1085 1087 … … 1087 1089 { 1088 1090 fprintf(LogFile, "Error %u seeking base codeview data in %s\n", errno, FileName); 1089 return (20);1091 return 20; 1090 1092 } 1091 1093 … … 1093 1095 { 1094 1096 fprintf(LogFile, "Error %u reading base codeview data in %s\n", errno, FileName); 1095 return (21);1097 return 21; 1096 1098 } 1097 1099 … … 1099 1101 { 1100 1102 fprintf(LogFile, "Error %u seeking dir codeview data in %s\n", errno, FileName); 1101 return (22);1103 return 22; 1102 1104 } 1103 1105 … … 1105 1107 { 1106 1108 fprintf(LogFile, "Error %u reading dir codeview data in %s\n", errno, FileName); 1107 return (23);1109 return 23; 1108 1110 } 1109 1111 … … 1112 1114 { 1113 1115 fprintf(LogFile, "Out of memory!"); 1114 return (-1);1116 return -1; 1115 1117 } 1116 1118 … … 1119 1121 fprintf(LogFile, "Error %u reading codeview dir table from %s\n", errno, FileName); 1120 1122 free(pxdi->pDirTab); 1121 return (24);1123 return 24; 1122 1124 } 1123 1125 … … 1197 1199 } // end while modindex 1198 1200 } // End While i < numdir 1201 1199 1202 free(pxdi->pDirTab); 1200 return (0); 1203 1204 return 0; 1201 1205 } 1202 1206 … … 1542 1546 SymFile = fopen(SymFileName, "rb"); 1543 1547 if (SymFile == 0) 1544 return (2);1548 return 2; 1545 1549 1546 1550 // read in first map definition … … 1568 1572 if (fseek(SymFile, SegOffset, SEEK_SET)) 1569 1573 // seek error 1570 return (3);1574 return 3; 1571 1575 1572 1576 // read in segment definition … … 1662 1666 SegOffset = NEXTSEGDEFOFFSET(SegDef); 1663 1667 } // endwhile 1668 1664 1669 fclose(SymFile); 1665 return (0); // no error 1670 1671 return 0; // no error 1666 1672 } 1667 1673 … … 1785 1791 } 1786 1792 1787 return (arc == NO_ERROR);1793 return !arc; 1788 1794 } 1789 1795 -
trunk/src/helpers/dosh.c
r234 r238 196 196 0); 197 197 198 return (kki.chChar);198 return kki.chChar; 199 199 } 200 200 … … 286 286 } 287 287 288 return (s_ulrc);288 return s_ulrc; 289 289 } 290 290 … … 353 353 &ulms, 354 354 sizeof(ulms)); 355 return (ulms);355 return ulms; 356 356 } 357 357 … … 375 375 ULONG cbData) 376 376 { 377 return (DosDevIOCtl(hf,378 379 380 381 pvData, cbData, &cbData));377 return DosDevIOCtl(hf, 378 ulCategory, 379 ulFunction, 380 pvParams, cbParams, &cbParams, 381 pvData, cbData, &cbData); 382 382 } 383 383 … … 409 409 *parc = ERROR_NOT_ENOUGH_MEMORY; 410 410 411 return (pv);411 return pv; 412 412 } 413 413 … … 467 467 { 468 468 PVOID pvrc = NULL; 469 APIRET arc = DosAllocSharedMem((PVOID*)&pvrc, 470 (PSZ)pcszName,471 ulSize,472 PAG_COMMIT | PAG_READ | PAG_WRITE);473 if (arc == NO_ERROR)474 return (pvrc);469 470 if (!DosAllocSharedMem((PVOID*)&pvrc, 471 (PSZ)pcszName, 472 ulSize, 473 PAG_COMMIT | PAG_READ | PAG_WRITE)) 474 return pvrc; 475 475 476 476 return NULL; … … 494 494 { 495 495 PVOID pvrc = NULL; 496 APIRET arc = DosGetNamedSharedMem((PVOID*)pvrc, 497 (PSZ)pcszName,498 PAG_READ | PAG_WRITE);499 if (arc == NO_ERROR)500 return (pvrc);496 497 if (!DosGetNamedSharedMem((PVOID*)pvrc, 498 (PSZ)pcszName, 499 PAG_READ | PAG_WRITE)) 500 return pvrc; 501 501 502 502 return NULL; … … 1977 1977 strcpy(FSInfoBuf.szVolLabel, pszNewLabel); 1978 1978 1979 return (DosSetFSInfo(ulLogicalDrive,1980 1981 1982 sizeof(FSInfoBuf)));1983 } 1984 else 1985 return (ERROR_LABEL_TOO_LONG);1979 return DosSetFSInfo(ulLogicalDrive, 1980 FSIL_VOLSER, 1981 &FSInfoBuf, 1982 sizeof(FSInfoBuf)); 1983 } 1984 1985 return ERROR_LABEL_TOO_LONG; 1986 1986 } 1987 1987 … … 2169 2169 } 2170 2170 2171 return (pReturn);2171 return pReturn; 2172 2172 } 2173 2173 … … 3300 3300 } while (!doshQueryPathSize(szFilename, &ulDummy)); 3301 3301 3302 return (strdup(szFilename));3302 return strdup(szFilename); 3303 3303 } 3304 3304 … … 3573 3573 // file found: 3574 3574 return ((fs3.attrFile & FILE_DIRECTORY) != 0); 3575 else 3576 3575 3576 return FALSE; 3577 3577 } 3578 3578 … … 3636 3636 } 3637 3637 3638 return (arc0);3638 return arc0; 3639 3639 } 3640 3640 … … 3785 3785 arcReturn = DosDeleteDir((PSZ)pcszDir); 3786 3786 3787 return (arcReturn);3787 return arcReturn; 3788 3788 } 3789 3789 … … 4324 4324 4325 4325 // PID is at offset 0 in the local info seg 4326 return (*(PUSHORT)G_pvLocalInfoSeg);4326 return *(PUSHORT)G_pvLocalInfoSeg; 4327 4327 } 4328 4328 … … 4344 4344 4345 4345 // TID is at offset 6 in the local info seg 4346 return (*(PUSHORT)((PBYTE)G_pvLocalInfoSeg + 6));4346 return *(PUSHORT)((PBYTE)G_pvLocalInfoSeg + 6); 4347 4347 } 4348 4348 -
trunk/src/helpers/dosh2.c
r229 r238 196 196 lAfterDot = 0; 197 197 if (ul > 7) 198 return (ERROR_FILENAME_EXCED_RANGE);198 return ERROR_FILENAME_EXCED_RANGE; 199 199 } 200 200 } 201 201 // and check for invalid characters 202 202 if (strchr(pszInvalid, *pSource) != NULL) 203 return (ERROR_INVALID_NAME);203 return ERROR_INVALID_NAME; 204 204 205 205 pSource++; … … 211 211 lAfterDot++; 212 212 if (lAfterDot > 3) 213 return (ERROR_FILENAME_EXCED_RANGE);213 return ERROR_FILENAME_EXCED_RANGE; 214 214 } 215 215 } … … 221 221 if (lDotOfs == -1) // dot not found: 222 222 if (cbFile > 8) 223 return (ERROR_FILENAME_EXCED_RANGE);223 return ERROR_FILENAME_EXCED_RANGE; 224 224 } 225 225 … … 333 333 { 334 334 APIRET arc = NO_ERROR; 335 if (!pcszDir) 336 return (ERROR_INVALID_PARAMETER); 337 { 338 if (*pcszDir != 0) 339 if (*(pcszDir+1) == ':') 340 { 341 // drive given: 342 CHAR cDrive = toupper(*(pcszDir)); 343 // change drive 344 arc = DosSetDefaultDisk( (ULONG)(cDrive - 'A' + 1) ); 345 // 1 = A:, 2 = B:, ... 346 } 347 335 336 if ( (!pcszDir) 337 || (!(*pcszDir)) 338 ) 339 return ERROR_INVALID_PARAMETER; 340 341 if (pcszDir[1] == ':') 342 { 343 // drive given: 344 CHAR cDrive = toupper(*(pcszDir)); 345 // change drive 346 arc = DosSetDefaultDisk( (ULONG)(cDrive - 'A' + 1) ); 347 // 1 = A:, 2 = B:, ... 348 } 349 350 if (!arc) 348 351 arc = DosSetCurrentDir((PSZ)pcszDir); 349 }350 352 351 353 return arc; // V0.9.9 (2001-04-04) [umoeller] … … 658 660 USHORT usCount = 0; 659 661 DosPhysicalDisk(INFO_COUNT_PARTITIONABLE_DISKS, &usCount, 2, 0, 0); 660 return (usCount);662 return usCount; 661 663 } 662 664 … … 923 925 STATIC USHORT GetCyl(USHORT rBeginSecCyl) 924 926 { 925 return ((rBeginSecCyl & 0x00C0) << 2)926 927 return ((rBeginSecCyl & 0x00C0) << 2) 928 + ((rBeginSecCyl & 0xFF00) >> 8); 927 929 } 928 930 … … 1005 1007 } 1006 1008 1007 return (ERROR_NOT_SUPPORTED);1009 return ERROR_NOT_SUPPORTED; 1008 1010 } 1009 1011 … … 1392 1394 1393 1395 if (!ppList) 1394 return (ERROR_INVALID_PARAMETER);1396 return ERROR_INVALID_PARAMETER; 1395 1397 1396 1398 if (!(arc = doshQueryLVMInfo(&pLVMInfo))) … … 1459 1461 { 1460 1462 if (!ppList) 1461 return (ERROR_INVALID_PARAMETER); 1462 else 1463 { 1464 CleanPartitionInfos(ppList->pPartitionInfo); 1465 doshFreeLVMInfo(ppList->pLVMInfo); 1466 free(ppList); 1467 } 1463 return ERROR_INVALID_PARAMETER; 1464 1465 CleanPartitionInfos(ppList->pPartitionInfo); 1466 doshFreeLVMInfo(ppList->pLVMInfo); 1467 free(ppList); 1468 1468 1469 1469 return NO_ERROR; … … 1859 1859 1860 1860 if (!pLVMInfo) 1861 return (ERROR_INVALID_PARAMETER);1861 return ERROR_INVALID_PARAMETER; 1862 1862 1863 1863 // initialize LVM engine -
trunk/src/helpers/eah.c
r222 r238 242 242 } 243 243 244 return (ulTotalEASize);244 return ulTotalEASize; 245 245 } 246 246 … … 254 254 PEALIST eaPathReadAll(const char *pcszPath) 255 255 { 256 return (ReadEAList(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath));256 return ReadEAList(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath); 257 257 } 258 258 … … 264 264 PEALIST eaHFileReadAll(HFILE hfile) 265 265 { 266 return (ReadEAList(ENUMEA_REFTYPE_FHANDLE, (&hfile)));266 return ReadEAList(ENUMEA_REFTYPE_FHANDLE, (&hfile)); 267 267 } 268 268 … … 278 278 PEABINDING eaPathReadOneByIndex(const char *pcszPath, ULONG index) 279 279 { 280 return (ReadEAByIndex(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, index));280 return ReadEAByIndex(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, index); 281 281 } 282 282 … … 288 288 PEABINDING eaHFileReadOneByIndex(HFILE hfile, ULONG index) 289 289 { 290 return (ReadEAByIndex(ENUMEA_REFTYPE_FHANDLE, (&hfile), index));290 return ReadEAByIndex(ENUMEA_REFTYPE_FHANDLE, (&hfile), index); 291 291 } 292 292 … … 300 300 PEABINDING eaPathReadOneByName(const char *pcszPath, const char *pcszEAName) 301 301 { 302 return (ReadEAByName(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, (PSZ)pcszEAName));302 return ReadEAByName(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, (PSZ)pcszEAName); 303 303 } 304 304 … … 310 310 PEABINDING eaHFileReadOneByName(HFILE hfile, const char *pcszEAName) 311 311 { 312 return (ReadEAByName(ENUMEA_REFTYPE_FHANDLE, (&hfile), (PSZ)pcszEAName));312 return ReadEAByName(ENUMEA_REFTYPE_FHANDLE, (&hfile), (PSZ)pcszEAName); 313 313 } 314 314 … … 334 334 APIRET eaPathWriteAll(const char *pcszPath, PEALIST list) 335 335 { 336 return (WriteEAList(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, list));336 return WriteEAList(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, list); 337 337 } 338 338 … … 346 346 APIRET eaHFileWriteAll(HFILE hfile, PEALIST list) 347 347 { 348 return (WriteEAList(ENUMEA_REFTYPE_FHANDLE, (&hfile), list));348 return WriteEAList(ENUMEA_REFTYPE_FHANDLE, (&hfile), list); 349 349 } 350 350 … … 365 365 APIRET eaPathWriteOne(const char *pcszPath, PEABINDING peab) 366 366 { 367 return (WriteEA(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, peab));367 return WriteEA(ENUMEA_REFTYPE_PATH, (PSZ)pcszPath, peab); 368 368 } 369 369 … … 377 377 APIRET eaHFileWriteOne(HFILE hfile, PEABINDING peab) 378 378 { 379 return (WriteEA(ENUMEA_REFTYPE_FHANDLE, (&hfile), peab));379 return WriteEA(ENUMEA_REFTYPE_FHANDLE, (&hfile), peab); 380 380 } 381 381 … … 398 398 eab.usValueLength = 0; 399 399 eab.pszValue = 0; 400 return (eaPathWriteOne(pcszPath, &eab));400 return eaPathWriteOne(pcszPath, &eab); 401 401 } 402 402 … … 431 431 // first USHORT always has EAT_* flag 432 432 usReturn = *((PUSHORT)(peab->pszValue)); 433 return (usReturn);433 return usReturn; 434 434 } 435 435 … … 465 465 } 466 466 467 return (pszReturn);467 return pszReturn; 468 468 } 469 469 … … 533 533 } 534 534 535 return (peab);535 return peab; 536 536 } 537 537 … … 583 583 } 584 584 585 return (usReturn);585 return usReturn; 586 586 } 587 587 … … 722 722 } // end if (usEAType == EAT_MVMT) 723 723 724 return (pszReturn);724 return pszReturn; 725 725 } 726 726 … … 819 819 } 820 820 821 return (pszTotal);821 return pszTotal; 822 822 } 823 823 … … 933 933 } // end if (pszInput) 934 934 935 return (peab);935 return peab; 936 936 } 937 937 … … 976 976 index += 1; 977 977 } 978 return (head);978 return head; 979 979 } 980 980 … … 1010 1010 return NULL; 1011 1011 if ((strcmp(name, (dena->szName))) == 0) 1012 return (GetEAValue(type, pfile, dena));1012 return GetEAValue(type, pfile, dena); 1013 1013 free(dena); 1014 1014 index += 1; … … 1057 1057 { 1058 1058 free(dena); 1059 return (0);1059 return 0; 1060 1060 } 1061 else 1062 return (dena);1061 1062 return dena; 1063 1063 } 1064 1064 … … 1086 1086 free(eaop.fpGEA2List); 1087 1087 if (arc == NO_ERROR) 1088 return (ConvertFeal2Binding(eaop.fpFEA2List));1089 else 1090 1088 return ConvertFeal2Binding(eaop.fpFEA2List); 1089 1090 return NULL; 1091 1091 } 1092 1092 … … 1142 1142 free(feal); 1143 1143 } 1144 return (binding); 1144 1145 return binding; 1145 1146 } 1146 1147 … … 1216 1217 (EA_BINDING_VALUE (binding)), 1217 1218 (fea->cbValue)); 1218 return (feal);1219 return feal; 1219 1220 } 1220 1221 -
trunk/src/helpers/gpih.c
r232 r238 1092 1092 if (!G_hmtxLCIDs) 1093 1093 // first call: create 1094 return (!DosCreateMutexSem(NULL,1095 1096 1097 TRUE)); // request!1094 return !DosCreateMutexSem(NULL, 1095 &G_hmtxLCIDs, 1096 0, 1097 TRUE); // request! 1098 1098 1099 1099 // subsequent calls: request -
trunk/src/helpers/level.c
r222 r238 529 529 STATIC PSYSLEVELDATA _allocsysleveldata(HFILE hFile) 530 530 { 531 return (PSYSLEVELDATA) 531 return (PSYSLEVELDATA)malloc(sizeof(SYSLEVELDATA)); 532 532 } 533 533 -
trunk/src/helpers/linklist.c
r232 r238 113 113 void* lstMalloc(size_t size) 114 114 { 115 return (malloc(size));115 return malloc(size); 116 116 } 117 117 … … 128 128 void* lstStrDup(const char *pcsz) 129 129 { 130 return (strdup(pcsz));130 return strdup(pcsz); 131 131 } 132 132 … … 521 521 PLISTNODE pNode; 522 522 if (pNode = lstNodeFromIndex(pList, ulIndex)) 523 return (pNode->pItemData);524 else 525 return (0);523 return pNode->pItemData; 524 525 return NULL; 526 526 } 527 527 -
trunk/src/helpers/math.c
r174 r238 64 64 } 65 65 66 return (a);66 return a; 67 67 68 68 } … … 225 225 } 226 226 227 return (rc);227 return rc; 228 228 } 229 229 … … 310 310 { 311 311 if (!rc) 312 return (0);312 return 0; 313 313 314 314 rc++; … … 318 318 } 319 319 320 return (rc);320 return rc; 321 321 } 322 322 … … 353 353 } 354 354 355 return (d);356 } 357 358 355 return d; 356 } 357 358 -
trunk/src/helpers/memdebug.c
r222 r238 199 199 } 200 200 else 201 return (!DosRequestMutexSem(G_hmtxMallocList,202 SEM_INDEFINITE_WAIT));203 204 return (FALSE);201 return !DosRequestMutexSem(G_hmtxMallocList, 202 SEM_INDEFINITE_WAIT); 203 204 return FALSE; 205 205 } 206 206 … … 246 246 STATIC PHEAPITEM FindHeapItem(void *p) 247 247 { 248 return ( (PHEAPITEM)treeFind(G_pHeapItemsRoot,249 250 treeCompareKeys));248 return (PHEAPITEM)treeFind(G_pHeapItemsRoot, 249 (ULONG)p, 250 treeCompareKeys); 251 251 } 252 252 … … 417 417 } 418 418 419 return (prc);419 return prc; 420 420 } 421 421 … … 440 440 pcszFunction); 441 441 memset(p, 0, num * stSize); 442 return (p);442 return p; 443 443 } 444 444 … … 547 547 // p == NULL: this is valid, use malloc() instead 548 548 // V0.9.12 (2001-05-21) [umoeller] 549 return (memdMalloc(stSize, pcszSourceFile, ulLine, pcszFunction));549 return memdMalloc(stSize, pcszSourceFile, ulLine, pcszFunction); 550 550 551 551 if (memdLock()) … … 665 665 } 666 666 667 return (prc);667 return prc; 668 668 } 669 669 … … 727 727 } 728 728 729 return (ulItemsReleased);729 return ulItemsReleased; 730 730 } 731 731 -
trunk/src/helpers/memdebug_win.c
r222 r238 151 151 ulTotalAllocated += Size; 152 152 } 153 return (0);153 return 0; 154 154 } 155 155 … … 194 194 } 195 195 else 196 return (1); // stop196 return 1; // stop 197 197 } 198 198 199 return (0);199 return 0; 200 200 } 201 201 … … 416 416 if ((pmrc1) && (pmrc2)) 417 417 if (pmrc1->ulIndex < pmrc2->ulIndex) 418 return (-1);418 return -1; 419 419 else if (pmrc1->ulIndex > pmrc2->ulIndex) 420 return (1);421 422 return (0);420 return 1; 421 422 return 0; 423 423 } 424 424 … … 439 439 0)) 440 440 { 441 case WCS_LT: return (-1);442 case WCS_GT: return (1);441 case WCS_LT: return -1; 442 case WCS_GT: return 1; 443 443 default: // equal 444 444 if (pmrc1->ulLine < pmrc2->ulLine) 445 return (-1);445 return -1; 446 446 else if (pmrc1->ulLine > pmrc2->ulLine) 447 return (1);447 return 1; 448 448 449 449 } 450 450 451 return (0);451 return 0; 452 452 } 453 453 … … 464 464 { 465 465 if (pmrc1->ulSize > pmrc2->ulSize) 466 return (1);466 return 1; 467 467 else if (pmrc1->ulSize < pmrc2->ulSize) 468 return (-1);468 return -1; 469 469 } 470 470 471 return (0);471 return 0; 472 472 } 473 473 … … 484 484 { 485 485 if (pmrc1->ulAddress > pmrc2->ulAddress) 486 return (1);486 return 1; 487 487 else if (pmrc1->ulAddress < pmrc2->ulAddress) 488 return (-1);488 return -1; 489 489 } 490 490 491 return (0);491 return 0; 492 492 } 493 493 -
trunk/src/helpers/prfh.c
r194 r238 166 166 *pcbBuf = ulSizeOfData; 167 167 168 return (pData);168 return pData; 169 169 } 170 170 … … 213 213 *pcbBuf = ulSizeOfData; 214 214 215 return (pData);215 return pData; 216 216 } 217 217 … … 239 239 szDefault, 240 240 szTemp, sizeof(szTemp)-1); 241 return (szTemp[0]);241 return szTemp[0]; 242 242 } 243 243 … … 260 260 sizeof(szColor)-1); 261 261 sscanf(szColor, "%lu %lu %lu ", &r, &g, &b); 262 return (LONG)(r *0x10000 + g*0x100 + b);262 return (LONG)(r * 0x10000 + g * 0x100 + b); 263 263 } 264 264 … … 344 344 ulrc = PRFERR_DATASIZE; 345 345 346 return (ulrc);346 return ulrc; 347 347 } 348 348 … … 518 518 } 519 519 520 return (ulrc);520 return ulrc; 521 521 } 522 522 -
trunk/src/helpers/prfh2.c
r229 r238 109 109 } 110 110 111 return (ulrc);111 return ulrc; 112 112 } 113 113 … … 129 129 sprintf(szError2, "An error occured copying the profile %s: \n%s", 130 130 pcszINI, pszErrorString); 131 return (prfhINIError(ulOptions, fLog, fncbError, szError2));131 return prfhINIError(ulOptions, fLog, fncbError, szError2); 132 132 } 133 133 … … 638 638 639 639 if (ulErrorOccured != MBID_IGNORE) 640 return (999);640 return 999; 641 641 else 642 642 return NO_ERROR; -
trunk/src/helpers/procstat.c
r229 r238 94 94 95 95 if (!ppps) 96 return (ERROR_INVALID_PARAMETER);96 return ERROR_INVALID_PARAMETER; 97 97 98 98 // changed allocation V0.9.10 (2001-04-08) [umoeller]: … … 187 187 } 188 188 189 return (pReturn);189 return pReturn; 190 190 } 191 191 … … 222 222 } 223 223 224 return (pReturn);224 return pReturn; 225 225 } 226 226 … … 300 300 } 301 301 302 return (rc);302 return rc; 303 303 } 304 304 … … 349 349 } 350 350 351 return (ulrc);351 return ulrc; 352 352 } 353 353 … … 394 394 } 395 395 396 return (ulrc);396 return ulrc; 397 397 } 398 398 … … 483 483 if (prc16QueryThreadInfo(pps, usPID, usTID, &prct)) 484 484 ulrc = prct.ulPriority; 485 return (ulrc);485 return ulrc; 486 486 } 487 487 … … 533 533 534 534 if (arc == NO_ERROR) 535 return ( (PQTOPLEVEL32)pBuf);535 return (PQTOPLEVEL32)pBuf; 536 536 else 537 537 DosFreeMem(pBuf); … … 594 594 595 595 if (pProcThis->ulRecType == 1) 596 return (pProcThis);597 else 598 596 return pProcThis; 597 598 return NULL; 599 599 } 600 600 … … 649 649 { 650 650 if (i == usSemID) 651 return (pSemThis);651 return pSemThis; 652 652 653 653 i++; … … 678 678 { 679 679 if (pSemThis->usIndex == usSemID) 680 return (pSemThis);680 return pSemThis; 681 681 682 682 pSemThis = pSemThis->pNext; … … 704 704 { 705 705 if (pShrMem->usHandle == usShrMemID) 706 return (pShrMem);706 return pShrMem; 707 707 pShrMem = pShrMem->pNext; 708 708 } … … 759 759 { 760 760 if (pFile->paFiles[ul].usSFN == usFileID) 761 return (pFile);761 return pFile; 762 762 } 763 763 -
trunk/src/helpers/regexp.c
r222 r238 1011 1011 return MTYPE_CREP; 1012 1012 default: 1013 return (MTYPE) -1;1013 return (MTYPE)-1; 1014 1014 } 1015 1015 } -
trunk/src/helpers/shapewin.c
r222 r238 537 537 pRgn = (PSHPREGION)PVOIDFROMMP(mp1); 538 538 WinSetWindowPtr(hwnd, 0, (PVOID) pRgn); 539 return (MRESULT) 539 return (MRESULT)FALSE; 540 540 541 541 /* … … 549 549 shprgnDraw(hps, pRgn); 550 550 WinEndPaint(hps) ; 551 return (MRESULT) 551 return (MRESULT)0; 552 552 553 553 case WM_MOUSEMOVE : … … 1173 1173 1174 1174 if (pCtrl == NULL) 1175 return (MRESULT) 1175 return (MRESULT)TRUE; 1176 1176 1177 1177 // store control data in window words 1178 1178 WinSetWindowPtr(hwnd, 0, (PVOID) pCtrl); 1179 return (MRESULT) 1179 return (MRESULT)FALSE; 1180 1180 1181 1181 /* … … 1187 1187 // TRACE("WM_DESTORY\n"); 1188 1188 shpmgrWMDestroy(pCtrl); 1189 return (MRESULT) 1189 return (MRESULT)0; 1190 1190 1191 1191 /* … … 1212 1212 // never show ourselves 1213 1213 pswp->fl &= ~SWP_SHOW; 1214 return (MRESULT) 1214 return (MRESULT)0; 1215 1215 1216 1216 /* … … 1221 1221 case SHAPEWIN_MSG_UPDATE: 1222 1222 shpmgrUpdateRegions(pCtrl, (PRECTL) PVOIDFROMMP(mp1)); 1223 return (MRESULT) 1223 return (MRESULT)0; 1224 1224 1225 1225 /* … … 1270 1270 WinValidateRect(hwnd, NULL, FALSE); 1271 1271 // WinEndPaint(hps); 1272 return (MRESULT) 1272 return (MRESULT)0; 1273 1273 } 1274 1274 -
trunk/src/helpers/stringh.c
r196 r238 220 220 *@@ strhdup: 221 221 * like strdup, but this one doesn't crash if pszSource 222 * is NULL, but returns NULL also. In addition, this 222 * is NULL. Instead, this returns NULL if pcszSource is 223 * NULL or points to a null byte. In addition, this 223 224 * can report the length of the string (V0.9.16). 224 225 * … … 407 408 { 408 409 if (pcsz) // && *pcsz) // V0.9.18 (2002-03-27) [umoeller] 409 return (strlen(pcsz) + 1);410 return strlen(pcsz) + 1; 410 411 411 412 return 0; … … 1028 1029 *pulOffset = prc - pcszSearchIn; 1029 1030 1030 return ( (PSZ)prc);1031 return (PSZ)prc; 1031 1032 } 1032 1033 … … 1855 1856 1856 1857 if (pattern_size == 0) // Empty patterns match at start 1857 return ( (void *)block);1858 return (void*)block; 1858 1859 1859 1860 // Build the shift table unless we're continuing a previous search … … 1901 1902 // If we found a match, return the start address 1902 1903 if (match_size >= pattern_size) 1903 return ( (void*)(match_base));1904 return (void*)match_base; 1904 1905 1905 1906 } … … 1959 1960 1960 1961 if (pattern_size == 0) // Empty string matches at start 1961 return (char *)string;1962 return (char*)string; 1962 1963 1963 1964 // Build the shift table … … 1997 1998 // If we found a match, return the start address 1998 1999 if (match_size >= pattern_size) 1999 return ( (char *)(match_base));2000 return (char*)match_base; 2000 2001 } 2001 2002 } -
trunk/src/helpers/syssound.c
r184 r238 472 472 { 473 473 free(pszExisting); 474 return (TRUE);475 } 476 477 return (FALSE);474 return TRUE; 475 } 476 477 return FALSE; 478 478 */ 479 479 -
trunk/src/helpers/textv_html.c
r222 r238 991 991 case 'd': // DD 992 992 if ((*p2 == 0) && (!fEndOfTag)) 993 return (TagDD);993 return TagDD; 994 994 break; 995 995 … … 1250 1250 } 1251 1251 1252 return (pProcessor);1252 return pProcessor; 1253 1253 } 1254 1254 … … 1863 1863 } 1864 1864 1865 return (crc);1865 return crc; 1866 1866 } 1867 1867 -
trunk/src/helpers/threads.c
r229 r238 390 390 } 391 391 392 return (ulrc);392 return ulrc; 393 393 } 394 394 … … 477 477 } 478 478 479 return (ulrc);479 return ulrc; 480 480 } 481 481 … … 526 526 } 527 527 528 return (pArray);528 return pArray; 529 529 } 530 530 … … 577 577 { 578 578 pti->fExit = TRUE; 579 return (TRUE);580 } 581 return (FALSE);579 return TRUE; 580 } 581 return FALSE; 582 582 } 583 583 … … 605 605 DosWaitThread(&pti->tid, DCWW_WAIT); 606 606 pti->tid = NULLHANDLE; 607 return (TRUE);607 return TRUE; 608 608 } 609 return (FALSE);609 return FALSE; 610 610 } 611 611 … … 624 624 thrWait(pti); 625 625 } 626 return (TRUE);626 return TRUE; 627 627 } 628 628 … … 649 649 DosKillThread(pti->tid); 650 650 } 651 return (TRUE);651 return TRUE; 652 652 } 653 653 … … 662 662 { 663 663 if (pti) 664 return (pti->tid);665 666 return (NULLHANDLE);664 return pti->tid; 665 666 return NULLHANDLE; 667 667 } 668 668 … … 691 691 if (ptib) 692 692 if (ptib->tib_ptib2) 693 return (ptib->tib_ptib2->tib2_ulpri);694 return (0);695 } 696 697 693 return ptib->tib_ptib2->tib2_ulpri; 694 return 0; 695 } 696 697 -
trunk/src/helpers/timer.c
r222 r238 162 162 { 163 163 if (!G_hmtxTimers) 164 return (!DosCreateMutexSem(NULL,165 166 167 TRUE)); // request!168 else 169 164 return !DosCreateMutexSem(NULL, 165 &G_hmtxTimers, 166 0, 167 TRUE); // request! 168 169 return !DosRequestMutexSem(G_hmtxTimers, SEM_INDEFINITE_WAIT); 170 170 } 171 171 … … 207 207 ) 208 208 { 209 return (pTimer);209 return pTimer; 210 210 } 211 211 … … 394 394 } 395 395 396 return (pSet);396 return pSet; 397 397 } 398 398 … … 733 733 } 734 734 735 return (usrc);735 return usrc; 736 736 } 737 737 -
trunk/src/helpers/tmsgfile.c
r222 r238 148 148 *@@added V0.9.18 (2002-03-24) [umoeller] 149 149 *@@changed V0.9.20 (2002-07-19) [umoeller]: optimized, no longer holding all msgs im mem 150 *@@changed V1.0.1 (2002-12-16) [pr]: Ctrl-Z fix 150 151 */ 151 152 … … 181 182 cbRead - 1); // not including null byte 182 183 183 // convert to plain C format 184 /* xstrConvertLineFormat(&pTmf->strContent, 185 CRLF2LF); 186 */ 187 188 // kick out all the comments 189 /* 190 while (pStartOfMarker = strstr(pTmf->strContent.psz, "\n;")) 191 { 192 // copy the next line over this 193 PCSZ pEOL = strhFindEOL(pStartOfMarker + 2, NULL); 194 xstrrpl(&pTmf->strContent, 195 // ofs of first char to replace: "\n;" 196 pStartOfMarker - pTmf->strContent.psz, 197 // no. of chars to replace: 198 pEOL - pStartOfMarker, 199 // string to replace chars with: 200 NULL, 201 // length of replacement string: 202 0); 203 } 204 */ 205 206 // free excessive memory 207 // xstrShrink(&pTmf->strContent); 208 184 // go build a tree of all message IDs... 209 185 pStartOfFile = strContents.psz; 210 211 // go build a tree of all message IDs...212 186 213 187 // find first start message marker … … 301 275 pNew->cbText = strlen(pStartOfText); 302 276 303 // remove trailing newlines 277 // remove trailing newlines and Ctrl-Z 304 278 while ( (pNew->cbText) 305 279 && ( (pStartOfText[pNew->cbText - 1] == '\n') 306 280 || (pStartOfText[pNew->cbText - 1] == '\r') 281 || (pStartOfText[pNew->cbText - 1] == '\x1a') // V1.0.1 (2002-12-16) [pr] 307 282 ) 308 283 ) … … 335 310 * 336 311 * Use tmfCloseMessageFile to close the file 337 * again and free all resources. This thing 338 * can allocate quite a bit of memory. 312 * again and free all resources. 339 313 * 340 314 * Returns: … … 415 389 STATIC VOID FreeInternalMem(PTMFMSGFILE pTmf) 416 390 { 417 LONG cItems;391 LONG cItems; 418 392 TREE** papNodes; 419 393 420 if (cItems = pTmf->cIDs) 394 if ( (cItems = pTmf->cIDs) 395 && (papNodes = treeBuildArray(pTmf->IDsTreeRoot, 396 &cItems)) 397 ) 421 398 { 422 if (papNodes = treeBuildArray(pTmf->IDsTreeRoot,423 &cItems))399 ULONG ul; 400 for (ul = 0; ul < cItems; ul++) 424 401 { 425 ULONG ul; 426 for (ul = 0; ul < cItems; ul++) 427 { 428 PMSGENTRY pNodeThis = (PMSGENTRY)(papNodes[ul]); 429 430 xstrClear(&pNodeThis->strID); 431 432 free(pNodeThis); 433 } 434 435 free(papNodes); 402 PMSGENTRY pNodeThis = (PMSGENTRY)(papNodes[ul]); 403 404 xstrClear(&pNodeThis->strID); 405 406 free(pNodeThis); 436 407 } 408 409 free(papNodes); 437 410 } 438 411 } … … 464 437 } 465 438 466 return (ERROR_INVALID_PARAMETER);439 return ERROR_INVALID_PARAMETER; 467 440 } 468 441 … … 503 476 ULONG cTableEntries) // in: count of items in pTable or null 504 477 { 505 APIRET arc = NO_ERROR; 478 APIRET arc; 479 ULONG cbFile; 480 PXFILE pFile; 506 481 507 482 if ( (!pMsgFile) 508 483 || (!pMsgFile->pszFilename) 509 484 ) 510 arc = ERROR_INVALID_PARAMETER; 511 else 485 return ERROR_INVALID_PARAMETER; 486 487 // open the file again V0.9.20 (2002-07-19) [umoeller] 488 if (!(arc = doshOpen(pMsgFile->pszFilename, 489 XOPEN_READ_EXISTING, 490 &cbFile, 491 &pFile))) 512 492 { 513 // open the file again V0.9.20 (2002-07-19) [umoeller] 514 ULONG cbFile; 515 PXFILE pFile; 516 if (!(arc = doshOpen(pMsgFile->pszFilename, 517 XOPEN_READ_EXISTING, 518 &cbFile, 519 &pFile))) 493 // check if last-write date/time changed compared 494 // to the last time we opened the thing... 495 // V0.9.18 (2002-03-24) [umoeller] 496 FILESTATUS3 fs3; 497 if (!(arc = DosQueryFileInfo(pFile->hf, 498 FIL_STANDARD, 499 &fs3, 500 sizeof(fs3)))) 520 501 { 521 // check if last-write date/time changed compared 522 // to the last time we opened the thing... 523 // V0.9.18 (2002-03-24) [umoeller] 524 FILESTATUS3 fs3; 525 if (!(arc = DosQueryFileInfo(pFile->hf, 526 FIL_STANDARD, 527 &fs3, 528 sizeof(fs3)))) 502 CHAR szTemp[30]; 503 dtCreateFileTimeStamp(szTemp, 504 &fs3.fdateLastWrite, 505 &fs3.ftimeLastWrite); 506 if (strcmp(szTemp, pMsgFile->szTimestamp)) 529 507 { 530 CHAR szTemp[30]; 531 dtCreateFileTimeStamp(szTemp, 532 &fs3.fdateLastWrite, 533 &fs3.ftimeLastWrite); 534 if (strcmp(szTemp, pMsgFile->szTimestamp)) 508 // last write date changed: 509 _Pmpf((__FUNCTION__ ": timestamp changed, recompiling")); 510 FreeInternalMem(pMsgFile); 511 512 if (!(arc = LoadAndCompile(pMsgFile, pFile))) 513 strcpy(pMsgFile->szTimestamp, szTemp); 514 } 515 } 516 517 if (!arc) 518 { 519 // go find the message in the tree 520 PMSGENTRY pEntry; 521 if (!(pEntry = (PMSGENTRY)treeFind(pMsgFile->IDsTreeRoot, 522 (ULONG)pcszMessageName, 523 treeCompareStrings))) 524 arc = ERROR_MR_MID_NOT_FOUND; 525 else 526 { 527 PSZ pszMsg; 528 ULONG cbRead = pEntry->cbText; 529 530 if (!(pszMsg = (PSZ)malloc(cbRead + 1))) 531 arc = ERROR_NOT_ENOUGH_MEMORY; 532 else if (!(arc = doshReadAt(pFile, 533 pEntry->ulOfsText, 534 &cbRead, 535 pszMsg, 536 DRFL_NOCACHE | DRFL_FAILIFLESS))) 535 537 { 536 // last write date changed: 537 _Pmpf((__FUNCTION__ ": timestamp changed, recompiling")); 538 FreeInternalMem(pMsgFile); 539 540 if (!(arc = LoadAndCompile(pMsgFile, pFile))) 541 strcpy(pMsgFile->szTimestamp, szTemp); 542 } 543 } 544 545 if (!arc) 546 { 547 // go find the message in the tree 548 PMSGENTRY pEntry; 549 if (!(pEntry = (PMSGENTRY)treeFind(pMsgFile->IDsTreeRoot, 550 (ULONG)pcszMessageName, 551 treeCompareStrings))) 552 arc = ERROR_MR_MID_NOT_FOUND; 553 else 554 { 555 PSZ pszMsg; 556 ULONG cbRead = pEntry->cbText; 557 558 if (!(pszMsg = (PSZ)malloc(cbRead + 1))) 559 arc = ERROR_NOT_ENOUGH_MEMORY; 560 else if (!(arc = doshReadAt(pFile, 561 pEntry->ulOfsText, 562 &cbRead, 563 pszMsg, 564 DRFL_NOCACHE | DRFL_FAILIFLESS))) 538 // null-terminate 539 pszMsg[cbRead] = '\0'; 540 xstrset2(pstr, 541 pszMsg, 542 cbRead); 543 544 // kick out \r\n 545 xstrConvertLineFormat(pstr, 546 CRLF2LF); 547 548 // now replace strings from the table 549 if (cTableEntries && pTable) 565 550 { 566 // null-terminate 567 pszMsg[cbRead] = '\0'; 568 xstrset2(pstr, 569 pszMsg, 570 cbRead); 571 572 // kick out \r\n 573 xstrConvertLineFormat(pstr, 574 CRLF2LF); 575 576 // now replace strings from the table 577 if (cTableEntries && pTable) 551 CHAR szFind[10] = "%0"; 552 ULONG ul; 553 for (ul = 0; 554 ul < cTableEntries; 555 ul++) 578 556 { 579 CHAR szFind[10] = "%0"; 580 ULONG ul; 581 for (ul = 0; 582 ul < cTableEntries; 583 ul++) 584 { 585 ULONG ulOfs = 0; 586 587 _ultoa(ul + 1, szFind + 1, 10); 588 while (xstrFindReplaceC(pstr, 589 &ulOfs, 590 szFind, 591 pTable[ul])) 592 ; 593 } 557 ULONG ulOfs = 0; 558 559 _ultoa(ul + 1, szFind + 1, 10); 560 while (xstrFindReplaceC(pstr, 561 &ulOfs, 562 szFind, 563 pTable[ul])) 564 ; 594 565 } 595 566 } 596 567 } 597 568 } 598 599 doshClose(&pFile);600 569 } 570 571 doshClose(&pFile); 601 572 } 602 573 -
trunk/src/helpers/tree.c
r222 r238 218 218 + p, // new tree node 219 219 + fnCompare); // comparison func 220 + return (p);220 + return p; 221 221 + } 222 222 * … … 226 226 + int TREEENTRY fnCompare(ULONG ul1, ULONG ul2) 227 227 + { 228 + return (strcmp((const char*)ul1,229 + (const char*)ul2));228 + return strcmp((const char*)ul1, 229 + (const char*)ul2); 230 230 + } 231 231 * … … 760 760 (*plCount)--; // V0.9.16 (2001-10-19) [umoeller] 761 761 762 return (STATUS_OK);762 return STATUS_OK; 763 763 } 764 764 … … 999 999 } 1000 1000 1001 return (papNodes);1001 return papNodes; 1002 1002 } 1003 1003 -
trunk/src/helpers/vcard.c
r226 r238 316 316 || (!pllParent) 317 317 ) 318 return (ERROR_INVALID_PARAMETER);318 return ERROR_INVALID_PARAMETER; 319 319 320 320 while (!arc) -
trunk/src/helpers/winh.c
r235 r238 120 120 { 121 121 // put the call in brackets so the macro won't apply here 122 return ( (WinSendMsg)(hwnd, msg, mp1, mp2));122 return (WinSendMsg)(hwnd, msg, mp1, mp2); 123 123 } 124 124 … … 138 138 MRESULT winhSendDlgItemMsg(HWND hwnd, ULONG id, ULONG msg, MPARAM mp1, MPARAM mp2) 139 139 { 140 return ( (WinSendDlgItemMsg)(hwnd, id, msg, mp1, mp2));140 return (WinSendDlgItemMsg)(hwnd, id, msg, mp1, mp2); 141 141 } 142 142 … … 157 157 { 158 158 // put the call in brackets so the macro won't apply here 159 return ( (WinPostMsg)(hwnd, msg, mp1, mp2));159 return (WinPostMsg)(hwnd, msg, mp1, mp2); 160 160 } 161 161 … … 169 169 { 170 170 // put the call in brackets so the macro won't apply here 171 return ( (WinWindowFromID)(hwnd, id));171 return (WinWindowFromID)(hwnd, id); 172 172 } 173 173 … … 181 181 { 182 182 // put the call in brackets so the macro won't apply here 183 return ( (WinQueryWindow)(hwnd, lCode));183 return (WinQueryWindow)(hwnd, lCode); 184 184 } 185 185 … … 193 193 { 194 194 // put the call in brackets so the macro won't apply here 195 return ( (WinQueryWindowPtr)(hwnd, index));195 return (WinQueryWindowPtr)(hwnd, index); 196 196 } 197 197 … … 2617 2617 ULONG ul = 0; 2618 2618 2619 /* if (!WinIsWindowVisible(hwndDlg))2620 return (FALSE); */2621 2622 2619 if ((pmpFlags) && (pxac)) 2623 2620 { -
trunk/src/helpers/xml.c
r229 r238 176 176 // start of expat (parser) errors 177 177 case ERROR_EXPAT_NO_MEMORY: 178 return ("Out of memory");178 return "Out of memory"; 179 179 180 180 case ERROR_EXPAT_SYNTAX: 181 return ("Syntax error");181 return "Syntax error"; 182 182 case ERROR_EXPAT_NO_ELEMENTS: 183 return ("No element found");183 return "No element found"; 184 184 case ERROR_EXPAT_INVALID_TOKEN: 185 return ("Not well-formed (invalid token)");185 return "Not well-formed (invalid token)"; 186 186 case ERROR_EXPAT_UNCLOSED_TOKEN: 187 return ("Unclosed token");187 return "Unclosed token"; 188 188 case ERROR_EXPAT_PARTIAL_CHAR: 189 return ("Unclosed token");189 return "Unclosed token"; 190 190 case ERROR_EXPAT_TAG_MISMATCH: 191 return ("Mismatched tag");191 return "Mismatched tag"; 192 192 case ERROR_EXPAT_DUPLICATE_ATTRIBUTE: 193 return ("Duplicate attribute");193 return "Duplicate attribute"; 194 194 case ERROR_EXPAT_JUNK_AFTER_DOC_ELEMENT: 195 return ("Junk after root element");195 return "Junk after root element"; 196 196 case ERROR_EXPAT_PARAM_ENTITY_REF: 197 return ("Illegal parameter entity reference");197 return "Illegal parameter entity reference"; 198 198 case ERROR_EXPAT_UNDEFINED_ENTITY: 199 return ("Undefined entity");199 return "Undefined entity"; 200 200 case ERROR_EXPAT_RECURSIVE_ENTITY_REF: 201 return ("Recursive entity reference");201 return "Recursive entity reference"; 202 202 case ERROR_EXPAT_ASYNC_ENTITY: 203 return ("Asynchronous entity");203 return "Asynchronous entity"; 204 204 case ERROR_EXPAT_BAD_CHAR_REF: 205 return ("Reference to invalid character number");205 return "Reference to invalid character number"; 206 206 case ERROR_EXPAT_BINARY_ENTITY_REF: 207 return ("Reference to binary entity");207 return "Reference to binary entity"; 208 208 case ERROR_EXPAT_ATTRIBUTE_EXTERNAL_ENTITY_REF: 209 return ("Reference to external entity in attribute");209 return "Reference to external entity in attribute"; 210 210 case ERROR_EXPAT_MISPLACED_XML_PI: 211 return ("XML processing instruction not at start of external entity");211 return "XML processing instruction not at start of external entity"; 212 212 case ERROR_EXPAT_UNKNOWN_ENCODING: 213 return ("Unknown encoding");213 return "Unknown encoding"; 214 214 case ERROR_EXPAT_INCORRECT_ENCODING: 215 return ("Encoding specified in XML declaration is incorrect");215 return "Encoding specified in XML declaration is incorrect"; 216 216 case ERROR_EXPAT_UNCLOSED_CDATA_SECTION: 217 return ("Unclosed CDATA section");217 return "Unclosed CDATA section"; 218 218 case ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING: 219 return ("Error in processing external entity reference");219 return "Error in processing external entity reference"; 220 220 case ERROR_EXPAT_NOT_STANDALONE: 221 return ("Document is not standalone");221 return "Document is not standalone"; 222 222 case ERROR_EXPAT_UNEXPECTED_STATE: 223 return ("Unexpected parser state - please send a bug report");223 return "Unexpected parser state - please send a bug report"; 224 224 // end of expat (parser) errors 225 225 … … 227 227 228 228 case ERROR_DOM_UNDECLARED_ELEMENT: 229 return ("Element has not been declared");229 return "Element has not been declared"; 230 230 case ERROR_DOM_ROOT_ELEMENT_MISNAMED: 231 return ("Root element name does not match DOCTYPE name");231 return "Root element name does not match DOCTYPE name"; 232 232 case ERROR_DOM_INVALID_ROOT_ELEMENT: 233 return ("Invalid or duplicate root element");233 return "Invalid or duplicate root element"; 234 234 235 235 case ERROR_DOM_INVALID_SUBELEMENT: 236 return ("Invalid sub-element in parent element");236 return "Invalid sub-element in parent element"; 237 237 case ERROR_DOM_DUPLICATE_ELEMENT_DECL: 238 return ("Duplicate element declaration");238 return "Duplicate element declaration"; 239 239 case ERROR_DOM_DUPLICATE_ATTRIBUTE_DECL: 240 return ("Duplicate attribute declaration");240 return "Duplicate attribute declaration"; 241 241 case ERROR_DOM_UNDECLARED_ATTRIBUTE: 242 return ("Undeclared attribute in element");242 return "Undeclared attribute in element"; 243 243 case ERROR_ELEMENT_CANNOT_HAVE_CONTENT: 244 return ("Element cannot have content");244 return "Element cannot have content"; 245 245 case ERROR_DOM_INVALID_ATTRIB_VALUE: 246 return ("Invalid attribute value");246 return "Invalid attribute value"; 247 247 case ERROR_DOM_REQUIRED_ATTRIBUTE_MISSING: 248 return ("Required attribute is missing");248 return "Required attribute is missing"; 249 249 case ERROR_DOM_SUBELEMENT_IN_EMPTY_ELEMENT: 250 return ("Subelement in empty element");250 return "Subelement in empty element"; 251 251 252 252 case ERROR_DOM_PARSING: 253 return ("Parsing error");253 return "Parsing error"; 254 254 case ERROR_DOM_VALIDITY: 255 return ("Validity error");255 return "Validity error"; 256 256 257 257 case ERROR_DOM_NODETYPE_NOT_SUPPORTED: 258 return ("DOM node type not supported");258 return "DOM node type not supported"; 259 259 case ERROR_DOM_NO_DOCUMENT: 260 return ("No DOM document");260 return "No DOM document"; 261 261 case ERROR_DOM_NO_ELEMENT: 262 return ("No DOM element");262 return "No DOM element"; 263 263 case ERROR_DOM_DUPLICATE_DOCTYPE: 264 return ("Duplicate doctype");264 return "Duplicate doctype"; 265 265 case ERROR_DOM_DOCTYPE_ROOT_NAMES_MISMATCH: 266 return ("Root element doesn't match doctype name");266 return "Root element doesn't match doctype name"; 267 267 case ERROR_DOM_INTEGRITY: 268 return ("DOM integrity error");268 return "DOM integrity error"; 269 269 case ERROR_DOM_DUPLICATE_ATTRIBUTE: 270 return ("Duplicate attribute");270 return "Duplicate attribute"; 271 271 272 272 case ERROR_DOM_VALIDATE_INVALID_ELEMENT: 273 return ("Validation error: Undeclared element name");273 return "Validation error: Undeclared element name"; 274 274 case ERROR_DOM_ELEMENT_DECL_OUTSIDE_DOCTYPE: 275 return ("Element declaration outside doctype");275 return "Element declaration outside doctype"; 276 276 case ERROR_DOM_ATTLIST_DECL_OUTSIDE_DOCTYPE: 277 return ("Attlist declaration outside doctype");277 return "Attlist declaration outside doctype"; 278 278 279 279 case ERROR_DOM_INCOMPLETE_ENCODING_MAP: 280 return ("Incomplete encoding map specified");280 return "Incomplete encoding map specified"; 281 281 282 282 case ERROR_DOM_INVALID_EXTERNAL_HANDLER: 283 return ("Invalid 'external' handler specified");283 return "Invalid 'external' handler specified"; 284 284 } 285 285 … … 346 346 ULONG ul2) 347 347 { 348 return (strhcmp(((PXSTRING)ul1)->psz,349 ((PXSTRING)ul2)->psz));348 return strhcmp(((PXSTRING)ul1)->psz, 349 ((PXSTRING)ul2)->psz); 350 350 } 351 351 … … 1383 1383 } 1384 1384 1385 return (pStackItem);1385 return pStackItem; 1386 1386 } 1387 1387 … … 1482 1482 } 1483 1483 // return success 1484 return (1);1484 return 1; 1485 1485 } 1486 1486 } 1487 1487 1488 1488 // error 1489 return (0);1489 return 0; 1490 1490 } 1491 1491 … … 2008 2008 pDom->pParser = pOldParser; 2009 2009 2010 return (i);2010 return i; 2011 2011 } 2012 2012 … … 2794 2794 } 2795 2795 2796 return (pElementDecl);2796 return pElementDecl; 2797 2797 } 2798 2798 … … 2818 2818 ) 2819 2819 { 2820 return ((PCMATTRIBUTEDECLBASE)treeFind( 2821 pDocTypeNode->AttribDeclBasesTree, 2822 (ULONG)pstrElementName, 2823 CompareXStrings)); 2820 return (PCMATTRIBUTEDECLBASE)treeFind(pDocTypeNode->AttribDeclBasesTree, 2821 (ULONG)pstrElementName, 2822 CompareXStrings); 2824 2823 } 2825 2824 … … 2851 2850 if (*ppAttribDeclBase) 2852 2851 { 2853 return ((PCMATTRIBUTEDECL)treeFind( 2854 ((**ppAttribDeclBase).AttribDeclsTree), 2855 (ULONG)pstrAttribName, 2856 CompareXStrings)); 2852 return (PCMATTRIBUTEDECL)treeFind(((**ppAttribDeclBase).AttribDeclsTree), 2853 (ULONG)pstrAttribName, 2854 CompareXStrings); 2857 2855 } 2858 2856 } … … 2888 2886 PDOMNODE pDomNode = (PDOMNODE)pListNode->pItemData; 2889 2887 if (pDomNode->NodeBase.ulNodeType == DOMNODE_ELEMENT) 2890 return (pDomNode);2888 return pDomNode; 2891 2889 2892 2890 pListNode = pListNode->pNext; … … 2910 2908 PLISTNODE pListNode = lstQueryFirstNode(&pDomNode->llChildren); 2911 2909 if (pListNode) 2912 return ( (PDOMNODE)pListNode->pItemData);2913 2914 return (0);2910 return (PDOMNODE)pListNode->pItemData; 2911 2912 return 0; 2915 2913 } 2916 2914 … … 2928 2926 PLISTNODE pListNode = lstQueryLastNode(&pDomNode->llChildren); 2929 2927 if (pListNode) 2930 return ( (PDOMNODE)pListNode->pItemData);2931 2932 return (0);2928 return (PDOMNODE)pListNode->pItemData; 2929 2930 return 0; 2933 2931 } 2934 2932 … … 2953 2951 && (pDomNodeThis->NodeBase.ulNodeType == DOMNODE_TEXT) 2954 2952 ) 2955 return (pDomNodeThis);2953 return pDomNodeThis; 2956 2954 } 2957 2955 … … 3004 3002 3005 3003 if (cItems) 3006 return (pll);3007 else 3008 3009 } 3010 3011 return (0);3004 return pll; 3005 3006 lstFree(&pll); 3007 } 3008 3009 return 0; 3012 3010 } 3013 3011 … … 3034 3032 (ULONG)&str, 3035 3033 CompareXStrings)) 3036 return (pAttrNode->pstrNodeValue);3034 return pAttrNode->pstrNodeValue; 3037 3035 3038 3036 return NULL; -
trunk/src/helpers/xprf2.c
r229 r238 644 644 { 645 645 printf("\r done %03d%%", ulNow * 100 / ulMax); 646 return (TRUE);646 return TRUE; 647 647 } 648 648
Note:
See TracChangeset
for help on using the changeset viewer.