Changeset 24220 in vbox for trunk/src/VBox/Main/webservice
- Timestamp:
- Oct 30, 2009 10:06:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/split-soapC.cpp
r23605 r24220 61 61 break; 62 62 } 63 fseek(pFileIn, 0, SEEK_END);63 int rc2 = fseek(pFileIn, 0, SEEK_END); 64 64 long cbFileIn = ftell(pFileIn); 65 rewind(pFileIn); 65 int rc3 = fseek(pFileIn, 0, SEEK_SET); 66 if (rc3 == -1 || rc2 == -1 || cbFileIn < 0) 67 { 68 fprintf(stderr, "split-soapC: Seek failure.\n"); 69 rc = 2; 70 break; 71 } 66 72 67 73 if (!(pBuffer = (char*)malloc(cbFileIn + 1))) … … 72 78 } 73 79 74 if (fread(pBuffer, 1, cbFileIn, pFileIn) != cbFileIn)80 if (fread(pBuffer, 1, cbFileIn, pFileIn) != (size_t)cbFileIn) 75 81 { 76 82 fprintf(stderr, "split-soapC: Failed to read %ld bytes from input file.\n", cbFileIn); … … 96 102 /* construct output filename */ 97 103 char szFilename[1024]; 98 sprintf(szFilename, "%s/soapC-% u.cpp", argv[2], ++cFiles);104 sprintf(szFilename, "%s/soapC-%lu.cpp", argv[2], ++cFiles); 99 105 szFilename[sizeof(szFilename)-1] = '\0'; 100 printf("info: soapC-% u.cpp\n", cFiles);106 printf("info: soapC-%lu.cpp\n", cFiles); 101 107 102 108 /* create output file */
Note:
See TracChangeset
for help on using the changeset viewer.