Subversion Repositories wimsdev

Rev

Rev 7674 | Rev 8120 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7674 Rev 8100
Line 91... Line 91...
91
/* '?' escapes to Lisp commands. */
91
/* '?' escapes to Lisp commands. */
92
    if(strchr(pm,'?')!=NULL) {
92
    if(strchr(pm,'?')!=NULL) {
93
        fprintf(stderr,"Illegal under WIMS.\n"); exit(1);
93
        fprintf(stderr,"Illegal under WIMS.\n"); exit(1);
94
    }
94
    }
95
    for(s=pm;*s;s++) *s=tolower(*s);
95
    for(s=pm;*s;s++) *s=tolower(*s);
96
    strip_trailing_spaces(pm); l=strlen(pm);
96
    strip_trailing_spaces2(pm); l=strlen(pm);
97
    if(l>0 && pm[l-1]!=';') strcat(pm,";");
97
    if(l>0 && pm[l-1]!=';') strcat(pm,";");
98
    find_illegal(pm);
98
    find_illegal(pm);
99
}
99
}
100
 
100
 
101
char *find_prompt(char *p, char t)
101
char *find_prompt(char *p, char t)
Line 151... Line 151...
151
      }
151
      }
152
/* strip leading and trailing spaces */
152
/* strip leading and trailing spaces */
153
      while(isspace(*pp) && pp<pe) pp++;
153
      while(isspace(*pp) && pp<pe) pp++;
154
      pt=pp+strlen(pp)-1;
154
      pt=pp+strlen(pp)-1;
155
      while(isspace(*pt) && pt>pp) *pt--=0;
155
      while(isspace(*pt) && pt>pp) *pt--=0;
156
      if(*pp=='[' && *pt==']' && find_matching(pp+1,']')==pt) {
156
      if(*pp=='[' && *pt==']' && find_matching2(pp+1,']')==pt) {
157
          *(pt--)=0; pp++;
157
          *(pt--)=0; pp++;
158
      }
158
      }
159
      for(pt=strchr(pp,'b');pt!=NULL; pt=strchr(pt+1,'b')) {
159
      for(pt=strchr(pp,'b');pt!=NULL; pt=strchr(pt+1,'b')) {
160
          if(pt>pp && isdigit(*(pt-1)) &&
160
          if(pt>pp && isdigit(*(pt-1)) &&
161
             (*(pt+1)=='-' || isdigit(*(pt+1)))) {
161
             (*(pt+1)=='-' || isdigit(*(pt+1)))) {