X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmetadata%2Fextractor%2Fmeta_lex.l;h=c4c23e847bbbf3def939bd99e522a15ed865a3c7;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=35bfcc9ba09466443bdcc951188772271f30bf62;hpb=407c75f92f1a641dc49243209cd246f6affd924d;p=helm.git diff --git a/helm/metadata/extractor/meta_lex.l b/helm/metadata/extractor/meta_lex.l index 35bfcc9ba..c4c23e847 100644 --- a/helm/metadata/extractor/meta_lex.l +++ b/helm/metadata/extractor/meta_lex.l @@ -115,7 +115,8 @@ value [^"]+ position = MAINHYP; else if (position == MAINHYP) { position = INHYP; - no_open_source++;}; + no_open_source = 1;} + else if (position == INHYP) no_open_source++; } "" | @@ -272,6 +273,9 @@ value [^"]+ int main(int argc, char *argv[]) { struct stat buf; + char *name; + char *poss; + char *posd; /* FILE *debug; */ @@ -304,6 +308,13 @@ int main(int argc, char *argv[]) yylex(); fclose(yyin); print_all(argv[1]); + poss = rindex(argv[1],'/'); + posd = rindex(argv[1],'.'); + name = (char *)malloc((posd - poss) * sizeof(char)); + strncpy(name, poss + 1, posd - poss - 1); + name[posd - poss - 1] = '\0'; + print_name(name,argv[1]); + free(name); return 0; }