Loading certgen/certidx.c +8 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,14 @@ int glob_pattern_p (const char *, int); static const char * _outPath = "-"; static int _canonicalize = 1; static int _fnames = 0; static FILE * _out; static copt_t _options [] = { { "h?", "help", COPT_HELP, NULL, "Print this help page" }, { "o", "out", COPT_STR, (void*)&_outPath, "Output path [stdout by default]" }, { "c", "no-canonicalize", COPT_BOOLI, (void*)&_canonicalize, "No canonicalize" }, { "C", "no-canonicalize", COPT_BOOLI, (void*)&_canonicalize, "No canonicalize" }, { "n", "fnames", COPT_BOOL, (void*)&_fnames, "Use file names instead of IDs" }, { NULL, NULL, COPT_END, NULL, NULL } }; Loading Loading @@ -150,7 +152,7 @@ int main(int argc, char ** argv) ebuf = cstrnload(buf, CERT_MAX_SIZE, argv[argi]); if(ebuf && (ebuf - buf) > 0){ const pchar_t* fname = cstrlastpathelement(argv[argi]); *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); }else{ // check if it is a mask Loading @@ -161,7 +163,7 @@ int main(int argc, char ** argv) ebuf = cstrnload(buf, CERT_MAX_SIZE, gl.gl_pathv[i]); if (ebuf && (ebuf - buf) > 0) { const pchar_t* fname = cstrlastpathelement(gl.gl_pathv[i]); *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); } } Loading @@ -179,7 +181,7 @@ int main(int argc, char ** argv) cstrcpy(fname, fd.cFileName); ebuf = cstrnload(buf, CERT_MAX_SIZE, path); if(ebuf && (ebuf - buf) > 0){ *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); } }while(FindNextFile(h, &fd)); Loading Loading
certgen/certidx.c +8 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,14 @@ int glob_pattern_p (const char *, int); static const char * _outPath = "-"; static int _canonicalize = 1; static int _fnames = 0; static FILE * _out; static copt_t _options [] = { { "h?", "help", COPT_HELP, NULL, "Print this help page" }, { "o", "out", COPT_STR, (void*)&_outPath, "Output path [stdout by default]" }, { "c", "no-canonicalize", COPT_BOOLI, (void*)&_canonicalize, "No canonicalize" }, { "C", "no-canonicalize", COPT_BOOLI, (void*)&_canonicalize, "No canonicalize" }, { "n", "fnames", COPT_BOOL, (void*)&_fnames, "Use file names instead of IDs" }, { NULL, NULL, COPT_END, NULL, NULL } }; Loading Loading @@ -150,7 +152,7 @@ int main(int argc, char ** argv) ebuf = cstrnload(buf, CERT_MAX_SIZE, argv[argi]); if(ebuf && (ebuf - buf) > 0){ const pchar_t* fname = cstrlastpathelement(argv[argi]); *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); }else{ // check if it is a mask Loading @@ -161,7 +163,7 @@ int main(int argc, char ** argv) ebuf = cstrnload(buf, CERT_MAX_SIZE, gl.gl_pathv[i]); if (ebuf && (ebuf - buf) > 0) { const pchar_t* fname = cstrlastpathelement(gl.gl_pathv[i]); *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); } } Loading @@ -179,7 +181,7 @@ int main(int argc, char ** argv) cstrcpy(fname, fd.cFileName); ebuf = cstrnload(buf, CERT_MAX_SIZE, path); if(ebuf && (ebuf - buf) > 0){ *cstrpathextension(fname) = 0; if(!_fnames) *cstrpathextension(fname) = 0; process_cert(fname, buf, ebuf); } }while(FindNextFile(h, &fd)); Loading