Subversion Repositories wimsdev

Rev

Rev 10 | Rev 8136 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 reyssat 1
/*    Copyright (C) 2002-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
2
 *
3
 *  This program is free software; you can redistribute it and/or modify
4
 *  it under the terms of the GNU General Public License as published by
5
 *  the Free Software Foundation; either version 2 of the License, or
6
 *  (at your option) any later version.
7
 *
8
 *  This program is distributed in the hope that it will be useful,
9
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 *  GNU General Public License for more details.
12
 *
13
 *  You should have received a copy of the GNU General Public License
14
 *  along with this program; if not, write to the Free Software
15
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
 */
17
 
18
 
19
 
20
        /* the type of an expression, with cutpoints */
21
void req_type(void)
22
{
23
    int i,l;
24
    char *p;
25
    int commas[MAX_COMMAS];
26
    int commacnt;
27
    if(objlinecnt<2) return;
28
    while((p=wordchr(objline[0],"nocomma"))!=NULL) {
3718 reyssat 29
        nocomma=1; ovlstrcpy(p,p+strlen("nocomma"));
10 reyssat 30
    }
31
    for(i=1;i<objlinecnt;i++) {
32
        thisobjline=i; p=find_word_start(objline[i]);
33
        linelogdir=0;
34
        if(*p=='>') {
35
            if(logdir<0) continue;
36
            p=find_word_start(p+1); linelogdir=1;
37
        }
38
        else if(*p=='<') {
39
            if(logdir>0) continue;
40
            p=find_word_start(p+1); linelogdir=-1;
41
        }
42
        thislinelen=strlen(p); if(thislinelen<=0) continue;
43
        l=_type(p,commas,&commacnt); printf("%s\n",typenames[l]);
44
    }
45
 
46
}
47