360 |
if (regcomp(&preg, strbuf_value(sb), REG_EXTENDED) != 0) |
if (regcomp(&preg, strbuf_value(sb), REG_EXTENDED) != 0) |
361 |
die("cannot compile regular expression."); |
die("cannot compile regular expression."); |
362 |
/* |
/* |
363 |
* construct skelton file name in the system datadir directory. |
* construct skeleton file name in the system datadir directory. |
364 |
*/ |
*/ |
365 |
strbuf_reset(sb); |
strbuf_reset(sb); |
366 |
strbuf_sprintf(sb, "%s/gtags/%s.tmpl", datadir, file); |
strbuf_sprintf(sb, "%s/gtags/%s.tmpl", datadir, file); |
367 |
ip = fopen(strbuf_value(sb), "r"); |
ip = fopen(strbuf_value(sb), "r"); |
368 |
if (!ip) |
if (!ip) |
369 |
die("skelton file '%s' not found.", strbuf_value(sb)); |
die("skeleton file '%s' not found.", strbuf_value(sb)); |
370 |
op = fopen(makepath(dist, file, NULL), "w"); |
op = fopen(makepath(dist, file, NULL), "w"); |
371 |
if (!op) |
if (!op) |
372 |
die("cannot create file '%s'.", file); |
die("cannot create file '%s'.", file); |