Changeset 4972 for trunk/src/win32k/dev16/extract.c
- Timestamp:
- Jan 19, 2001, 3:28:53 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev16/extract.c
r4787 r4972 1 /* $Id: extract.c,v 1. 3 2000-12-11 06:53:48bird Exp $1 /* $Id: extract.c,v 1.4 2001-01-19 02:27:32 bird Exp $ 2 2 * 3 3 * Description: SymDB entry generator. 4 4 * Builds SymDB entry from one or more symbol files. 5 5 * 6 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)6 * Copyright (c) 2000-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no) 7 7 * 8 8 * Project Odin Software License can be found in LICENSE.TXT … … 82 82 * Dumps writes a KRNLDBENTRY struct to stderr for the given .sym-file. 83 83 * The filesnames are on this format: 84 * nnnn[n]tm .SYM84 * nnnn[n]tm[r].SYM 85 85 * Where: n - are the build number 4 or 5 digits. 86 86 * t - kernel type. R = retail, H = half strict, A = all strict. 87 87 * m - UNI or SMP. U = UNI processor kernel. S = SMP processor kernel. 4 = Warp 4 FP13+ 88 * r - revision letter. Currently only 'A' is supported. 88 89 * @returns NO_ERROR on success. Untracable error code on error. 89 90 * @param pszFilename Pointer to read only filename of the .sym-file. … … 96 97 APIRET rc; 97 98 int cch; 99 int cchNum; 98 100 const char *psz = pszFilename + kstrlen(pszFilename); 99 101 … … 110 112 111 113 /* Filename check */ 112 if (cch < 10 || cch > 11 114 cchNum = psz[0] > '2' ? 4 : 5; /* build number length. */ 115 if (cch < 10 || cch > 12 113 116 || !(psz[0] >= '0' && psz[0] <= '9') 114 117 || !(psz[1] >= '0' && psz[1] <= '9') 115 118 || !(psz[2] >= '0' && psz[2] <= '9') 116 119 || !(psz[3] >= '0' && psz[3] <= '9') 117 || !(psz[cch-7] >= '0' && psz[cch-7] <= '9') 118 || !(psz[cch-6] == 'A' || psz[cch-6] == 'H' || psz[cch-6] == 'R') 119 || !(psz[cch-5] == 'S' || psz[cch-5] == 'U' || psz[cch-5] == '4') 120 || !(cchNum == 4 || (psz[4] >= '0' && psz[4] <= '9')) 121 || !(psz[cchNum] == 'A' || psz[cchNum] == 'H' || psz[cchNum] == 'R') 122 || !(psz[cchNum+1] == 'S' || psz[cchNum+1] == 'U' || psz[cchNum+1] == '4') 123 /* || !(cch != 12 || psz[cchNum+2] == 'A') */ 120 124 ) 121 125 { … … 142 146 * is enclaved within an "#ifdef ALLKERNELS ... #endif". 143 147 */ 144 if (psz[cch -6] != 'R')148 if (psz[cchNum] != 'R') 145 149 printf16("#ifdef ALLKERNELS\n"); 146 150 … … 148 152 " %.*s, ", 149 153 psz, 150 cch - 6, &psz[0] /* build number */154 cchNum, &psz[0] /* build number */ 151 155 ); 152 156 153 switch (psz[cch - 5])157 switch (psz[cchNum + 1]) 154 158 { 155 159 case 'S': printf16("KF_SMP"); break; … … 157 161 case 'U': printf16("KF_UNI"); break; 158 162 } 159 switch (psz[cch - 6])163 switch (psz[cchNum]) 160 164 { 161 165 case 'A': printf16(" | KF_ALLSTRICT"); break; 162 166 case 'H': printf16(" | KF_HALFSTRICT"); break; 163 167 } 168 if (psz[cchNum + 2] == 'A') 169 printf16(" | KF_REV_A"); 170 164 171 printf16(", %d,\n" 165 172 " {\n", … … 183 190 * is enclaved within an "#ifdef ALLKERNELS ... #endif". 184 191 */ 185 if (psz[cch -6] != 'R')192 if (psz[cchNum] != 'R') 186 193 printf16("#endif\n"); 187 194 } … … 245 252 int i; 246 253 247 printf16("/* $Id: extract.c,v 1. 3 2000-12-11 06:53:48bird Exp $\n"254 printf16("/* $Id: extract.c,v 1.4 2001-01-19 02:27:32 bird Exp $\n" 248 255 "*\n" 249 256 "* Autogenerated kernel symbol database.\n"
Note:
See TracChangeset
for help on using the changeset viewer.