oga's tools
Revision | ea575fe40e25020d0d4fba179de0634b06fb6679 (tree) |
---|---|
Time | 2014-02-11 16:11:28 |
Author | oga <hyperoga@gmai...> |
Commiter | oga |
2014.02.10 V1.15 fix -r
@@ -11,6 +11,7 @@ | ||
11 | 11 | * 2007.02.26 V1.12 support -s option |
12 | 12 | * 2007.03.03 V1.13 bigfile support |
13 | 13 | * 2014.02.02 V1.14 support MSVC6 |
14 | + * 2014.02.10 V1.15 fix -r | |
14 | 15 | */ |
15 | 16 | |
16 | 17 | #define DP_LARGE_FILE |
@@ -61,6 +62,7 @@ typedef unsigned int uint64; | ||
61 | 62 | #endif |
62 | 63 | |
63 | 64 | #define READ_SIZE (1024) |
65 | +#define START_POS 12 /* data start position */ | |
64 | 66 | |
65 | 67 | int vf = 0; /* -v: verbose */ |
66 | 68 |
@@ -83,11 +85,11 @@ void DpToFile(FILE *fp) | ||
83 | 85 | } |
84 | 86 | for (i=0; i<4; i++) { |
85 | 87 | for (j=0; j<4; j++) { |
86 | - if (isspace(buf[10+i*9+j*2])) { | |
88 | + if (isspace(buf[START_POS+i*9+j*2])) { | |
87 | 89 | /* data end */ |
88 | 90 | return; |
89 | 91 | } |
90 | - strncpy(&wk[2],&buf[10+i*9+j*2],2); | |
92 | + strncpy(&wk[2],&buf[START_POS+i*9+j*2],2); | |
91 | 93 | c = strtoul(wk,(char **)0,0); |
92 | 94 | putchar(c); |
93 | 95 | } |