Back to index

wims  3.65+svn20090927
Defines | Functions | Variables
oncechar.c File Reference
#include "../wims.h"

Go to the source code of this file.


#define MAX_WORDLEN   1023


int getword (void)
void checkword (void)
int main (int argc, char *argv[])


char wbuf [MAX_WORDLEN+1]
char selbuf [256]

Define Documentation

#define MAX_WORDLEN   1023

Definition at line 26 of file oncechar.c.

Function Documentation

void checkword ( void  )

Definition at line 40 of file oncechar.c.

    char sbuf[256];
    char *p, *pt;
    for(p=wbuf; *p; p++) {
       pt=strchr(sbuf,*p); if(pt==NULL) return;
       else *pt=' ';

Here is the caller graph for this function:

int getword ( void  )

Definition at line 31 of file oncechar.c.

    int t,c;
    do c=getchar(); while(isspace(c));
    for(t=0; t<MAX_WORDLEN && isalnum(c); t++, c=getchar()) wbuf[t]=c;
    wbuf[t]=0; return c;    

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 

Definition at line 52 of file oncechar.c.

    int c;
    char *p;
    p=getenv("oncechar"); if(p==NULL || *p==0) return 0;
    for(p=selbuf; *p; p++) 
      if(isspace(*p) || strchr("^?*.${}[]()\\",*p)!=NULL) strcpy(p,p+1);
       c=getword(); checkword();
    return 0;

Here is the call graph for this function:

Variable Documentation

char selbuf[256]

Definition at line 29 of file oncechar.c.

char wbuf[MAX_WORDLEN+1]

Definition at line 28 of file oncechar.c.