Subversion Repositories wimsdev

Rev

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

Rev 13380 Rev 14813
Line 93... Line 93...
93
  substitute=substit;
93
  substitute=substit;
94
  if(argc==2 && strcmp(argv[1],"table")==0) {
94
  if(argc==2 && strcmp(argv[1],"table")==0) {
95
    if(verify_order(specialfn, specialfn_no, sizeof(specialfn[0]))) return -1;
95
    if(verify_order(specialfn, specialfn_no, sizeof(specialfn[0]))) return -1;
96
    puts("Table orders OK."); return 0;
96
    puts("Table orders OK."); return 0;
97
  }
97
  }
98
/* is defined in public_html/scripts/docu/mkindex and in public_html/modules/adm/doc/var.proc */
98
 /* is defined in public_html/scripts/docu/mkindex and in public_html/modules/adm/doc/var.proc */
99
  p=getenv("w_msg2wims_primitives"); if(p!=NULL) {
99
  p=getenv("w_msg2wims_primitives"); if(p!=NULL) {
100
    snprintf(primbuf,sizeof(primbuf),"%s",p);
100
    snprintf(primbuf,sizeof(primbuf),"%s",p);
101
    for(p=primbuf; *p; p++) if(!isalnum(*p)) *p=' ';
101
    for(p=primbuf; *p; p++) if(!isalnum(*p)) *p=' ';
102
    p=find_word_start(primbuf);
102
    p=find_word_start(primbuf);
103
    for(primcnt=0; primcnt<256 && *p; primcnt++, p=find_word_start(p1)) {
103
    for(primcnt=0; primcnt<256 && *p; primcnt++, p=find_word_start(p1)) {
Line 133... Line 133...
133
      case whilechar: {
133
      case whilechar: {
134
        if(primcnt>0) fputs("\n!endwhile\n",outf);
134
        if(primcnt>0) fputs("\n!endwhile\n",outf);
135
        else fputc(*p,outf);
135
        else fputc(*p,outf);
136
        break;
136
        break;
137
      }
137
      }
138
/* lines begining by > are in small; italics and pre  */
138
      /* lines begining by > are in blockquote class="wims_citation" */
139
      case '\n': {
139
      case '\n': {
140
        if(*(p+1)=='>') {
140
        if(*(p+1)=='>') {
141
          pre: p++; fputs("\n<i><small><pre wrap>",outf);
141
          pre: p++; fputs("\n<blockquote class=\"wims_citation\"><pre>",outf);
142
          for(p1=strchr(p,'\n'); p1!=NULL && *(p1+1)=='>';
142
          for(p1=strchr(p,'\n'); p1!=NULL && *(p1+1)=='>';
143
          p1=strchr(++p1,'\n'));
143
            p1=strchr(++p1,'\n'));
144
          if(p1!=NULL) *p1++=0; else p1=p+strlen(p);
144
          if(p1!=NULL) *p1++=0; else p1=p+strlen(p);
145
          for(p2=p;*p2;p2++) {
145
          for(p2=p;*p2;p2++) {
146
            if(*p2!='<') fputc(*p2,outf);
146
            if(*p2!='<') fputc(*p2,outf);
147
            else fputs("&lt;",outf);
147
            else fputs("&lt;",outf);
148
          }
148
          }
149
          fputs("</pre></small></i>\n",outf);
149
          fputs("</pre></blockquote>\n",outf);
150
          p=p1-1; break;
150
          p=p1-1; break;
151
        }
151
        }
152
/* two successive lines are replaced by an <p> - has to be fixed */
152
        /* two successive lines are replaced by an <br /> */
153
        if(*(p+1)!='\n') {fputc(*p,outf);break;}
153
        if(*(p+1)!='\n') {fputc(*p,outf);break;}
154
        p++; fputs("\n<br/>\n",outf);
154
        p++; fputs("\n<br />\n",outf);
155
        while(*(p+1)=='\n') p++;
155
        while(*(p+1)=='\n') p++;
156
        if(*(p+1)=='>') goto pre;
156
        if(*(p+1)=='>') goto pre;
157
        break;
157
        break;
158
      }
158
      }
159
 
159
 
Line 165... Line 165...
165
        p2=find_tag_end(p);
165
        p2=find_tag_end(p);
166
        if(!*p2) {msg_error("open_tag"); p2--;}
166
        if(!*p2) {msg_error("open_tag"); p2--;}
167
        tend=p2;
167
        tend=p2;
168
        fputc(*p, outf); break;
168
        fputc(*p, outf); break;
169
      }
169
      }
170
/* interpretation of variables */
170
      /* interpretation of variables */
171
      case '\\': {
171
      case '\\': {
172
       char *pe;
172
       char *pe;
173
        p++;
173
        p++;
174
        if(isalpha(*p)) {
174
        if(isalpha(*p)) {
175
           if(primcnt>0) {
175
           if(primcnt>0) {