]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/metadata/extractor/meta_lex.l
ocaml 3.09 transition
[helm.git] / helm / metadata / extractor / meta_lex.l
index 35bfcc9ba09466443bdcc951188772271f30bf62..c4c23e847bbbf3def939bd99e522a15ed865a3c7 100644 (file)
@@ -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++;
                    }
 
 "</decl>"          |
@@ -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;
 }