Rev 17482 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17482 | Rev 17894 | ||
---|---|---|---|
Line 682... | Line 682... | ||
682 | void module_index(void) |
682 | void module_index(void) |
683 | { |
683 | { |
684 | char buf[MAX_NAMELEN+1], ind_buf[MAX_LINELEN+1]; |
684 | char buf[MAX_NAMELEN+1], ind_buf[MAX_LINELEN+1]; |
685 | char *e, *p, *p2, *ft; |
685 | char *e, *p, *p2, *ft; |
686 | double v1, v2; |
686 | double v1, v2; |
687 | int i |
687 | int i; |
688 | long indf_len; |
688 | long indf_len; |
689 | 689 | ||
690 | memmove(var_def_file,default_var_def,strlen(default_var_def)+1); |
690 | memmove(var_def_file,default_var_def,strlen(default_var_def)+1); |
691 | ft=readfile(mkfname(NULL,"%s/INDEX",module_prefix), |
691 | ft=readfile(mkfname(NULL,"%s/INDEX",module_prefix), |
692 | ind_buf,sizeof(ind_buf)); |
692 | ind_buf,sizeof(ind_buf)); |
693 | if(ft==NULL) ft=readfile(mkfname(NULL,"%s/index",module_prefix), |
693 | if(ft==NULL) ft=readfile(mkfname(NULL,"%s/index",module_prefix), |
694 | ind_buf,sizeof(ind_buf)); |
694 | ind_buf,sizeof(ind_buf)); |
695 | if(ft==NULL) return; |
695 | if(ft==NULL) return; |
696 | e=ind_buf-1; indf_len=strlen(ind_buf); |
696 | e=ind_buf-1; indf_len=strlen(ind_buf); |
697 | for( |
697 | for( ; e<ind_buf+indf_len && e!=NULL;){ |
698 | p=e+1; e=strchr(p,'\n'); if(e!=NULL) *e=0; |
698 | p=e+1; e=strchr(p,'\n'); if(e!=NULL) *e=0; |
699 | strip_trailing_spaces(p); p=find_word_start(p); |
699 | strip_trailing_spaces(p); p=find_word_start(p); |
700 | if(*p==0 || *p==comment_prefix_char) continue; /* empty or comment line */ |
700 | if(*p==0 || *p==comment_prefix_char) continue; /* empty or comment line */ |
701 | p2=strchr(p,'='); |
701 | p2=strchr(p,'='); |
702 | if(p2==NULL) continue; /* syntax error */ |
702 | if(p2==NULL) continue; /* syntax error */ |