/*{{{  #includes*/
#include <ctype.h>
#include <sys/types.h>
#include <limits.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <stdio.h>

#include <local/bool.h>

#define SCANNER_C

#include "keybind.h"
#include "../h/envvar_str.h"
/*}}}  */

/*{{{  variable declarations*/
/*{{{  stack for filed-folds*/
private int inp_stack[f_s_depth+1],po_stack[f_s_depth+1],y_stack[f_s_depth+1];
private bool nl_stack[f_s_depth+1];
private FILE *file_stack[f_s_depth+1];
private char *name_stack[f_s_depth+1];
private int f_s_ptr=0;
/*}}}  */
/*{{{  reading-stuff*/
private int input=EOF,current_line_no=1,cur_y_po=0;
private bool nl=FALSE;
/*}}}  */
/*{{{  if-using stuff*/
private int  missing_gnisu=0;
private char *tags[tag_count];
private int  tags_used=0;
private int  tags_nofree;
/*}}}  */
private bool err_marked;
private bool fullscan=TRUE;
/*{{{  return-vars for the scanner*/
public char    tk_char;
public KEYNAME *tk_key;
public OP      *tk_operation;
public VARS    *tk_var;
public int     tk_val;
public char    tk_string[name_lg];
public TOKEN   tk_macro[macro_lg];
/*}}}  */
/*{{{  tables*/
public ALIAS   *func_key[alias_count];
private int    func_free=alias_count;
public OP      *new_op[op_count];
private int    new_op_free=op_count;
public VARS    *vars[var_count];
private int    vars_free=var_count;
public char    *source;
/*}}}  */
/*}}}  */

/*{{{  error_po()*/
public void error_po(void)
{
  char *s, buf[_POSIX_PATH_MAX+1];
  int i=0;

  if (!err_marked) {
    if (verbose) fprintf(stderr,"\n");
    fprintf(stderr,"%s \"keybind\"\n",OP_E_FORMATNAME);
    if (s=getcwd(buf, _POSIX_PATH_MAX))
       fprintf(stderr,"%s \"%s\"\n",ORIPAGERDIR,s);
    for (;i<=f_s_ptr;i++)
      fprintf(stderr,F_ERRORPO,
                     (i?name_stack[i]:source),
                     (i==f_s_ptr?current_line_no:po_stack[i]-1));
    fprintf(stderr,F_ERRY,cur_y_po);
  }
  err_marked=TRUE;
}
/*}}}  */
/*{{{  create an operation entry*/
public void creat_op(char *name,bool mode,int lg,TOKEN *code,int place,bool ret_used)

/*{{{  comment*/
/* arguments are:
  name - name of the macro/function
  mode - the code is defined (forward)
  lg   - number of tokens
  code - the tokenlist
  place- the number of the used origami-macro-buffer or 0 for defmac
*/
/*}}}  */
{
  OP **act=new_op;

  /*{{{  oplist full*/
  if (!new_op_free--) {
    error_po();
    fprintf(stderr,M_NOOPS);
    exit(1);
  }
  /*}}}  */
  while (*act) act++;
  *act=(OP*)malloc(sizeof(OP));
  if (!((*act)->op_name=(char*)malloc(strlen(name)+1))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  strcpy((*act)->op_name,name);
  (*act)->length=lg;
  (*act)->def=mode;
  (*act)->place=place;
  (*act)->ret_used=ret_used;
  if (!((*act)->ops=(TOKEN*)malloc((1+lg)*sizeof(TOKEN)))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  memcpy((*act)->ops,code,lg*sizeof(int));
  /*{{{  verbose-handling*/
  if (verbose)
  {
    if (place)
      fprintf(stderr,F_BELONGS,name);
    else
      fprintf(stderr,F_OPERATION,name,lg);
  }
  /*}}}  */
}
/*}}}  */
/*{{{  create an variable entry*/
public int creat_var(char *name)
{
  VARS **act=vars;

  /*{{{  varlist full*/
  if (!vars_free--) {
    error_po();
    fprintf(stderr,M_NOVAS);
    exit(1);
  }
  /*}}}  */
  while (*act) act++;
  if (!(*act=(VARS*)malloc(sizeof(VARS)))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  if (!((*act)->var_name=(char*)malloc(strlen(name)+1))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  strcpy((*act)->var_name,name);
  return((*act)->no=int_no++);
}
/*}}}  */
/*{{{  create an alias entry*/
public void creat_alias(char *name, char *code, int lg)
{
  ALIAS **act= func_key;

  /*{{{  alias-list full*/
  if (!func_free--) {
    error_po();
    fprintf(stderr,M_ALIAS_OV);
    exit(1);
  }
  /*}}}  */
  /*{{{  put the alias to the alias-list*/
  while (*act) act++;
  if (!(*act=(ALIAS*)malloc(sizeof(ALIAS)))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  if (!((*act)->key_name=(char*)malloc(strlen(name)+1))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  strcpy((*act)->key_name,name);
  (*act)->code=(char*)malloc(lg+1);
  memcpy((*act)->code,code,lg);
  (*act)->length=lg;
  /*}}}  */
  /*{{{  put $name to taglist*/
  if (!(tags[tags_used]=malloc(strlen(name)+2))) {
    fprintf(stderr,M_NOMEMORY);
    exit(1);
  }
  tags[tags_used][0]='$';
  strcpy(tags[tags_used++]+1,name);
  /*}}}  */
  if (verbose) fprintf(stderr,F_ALIAS,name);
}
/*}}}  */
/*{{{  use*/
public void use(char *tag)
{
  tags[tags_used++]=tag;
  tags_nofree=tags_used;
}
/*}}}  */
/*{{{  default_using*/
public void default_using(void)
{ if (strcmp(m_name,NO_MOUSE)) { use("MOUSY");use(m_name); }
  OS_USINGS
}
/*}}}  */
/*{{{  init alias list*/
public void init_alias(void)
{ creat_alias("esc","\033",1);
}
/*}}}  */
/*{{{  read a character from input, count lines*/
private int read_in(void)
{
  input=getc(in);
  if (nl) {
    current_line_no++;
    cur_y_po=0;
  } else
    cur_y_po++;
  nl= input=='\n';
  if (input=='\t')
   { error_po();
     fprintf(stderr,M_TAB);
   }
  return(input);
}
/*}}}  */
/*{{{  init_scan*/
public int ctrl_c[O_NOP];

public void init_scan (void)
{ int i;

  read_in();
  for (i=0;i<O_NOP;i++) ctrl_c[i]=0;
  ctrl_c['@']=0;
  ctrl_c['A']=1;
  ctrl_c['a']=1;
  ctrl_c['B']=2;
  ctrl_c['b']=2;
  ctrl_c['C']=3;
  ctrl_c['c']=3;
  ctrl_c['D']=4;
  ctrl_c['d']=4;
  ctrl_c['E']=5;
  ctrl_c['e']=5;
  ctrl_c['F']=6;
  ctrl_c['f']=6;
  ctrl_c['G']=7;
  ctrl_c['g']=7;
  ctrl_c['H']=8;
  ctrl_c['h']=8;
  ctrl_c['I']=9;
  ctrl_c['i']=9;
  ctrl_c['J']=10;
  ctrl_c['j']=10;
  ctrl_c['K']=11;
  ctrl_c['k']=11;
  ctrl_c['L']=12;
  ctrl_c['l']=12;
  ctrl_c['M']=13;
  ctrl_c['m']=13;
  ctrl_c['N']=14;
  ctrl_c['n']=14;
  ctrl_c['O']=15;
  ctrl_c['o']=15;
  ctrl_c['P']=16;
  ctrl_c['p']=16;
  ctrl_c['Q']=17;
  ctrl_c['q']=17;
  ctrl_c['R']=18;
  ctrl_c['r']=18;
  ctrl_c['S']=19;
  ctrl_c['s']=19;
  ctrl_c['T']=20;
  ctrl_c['t']=20;
  ctrl_c['U']=21;
  ctrl_c['u']=21;
  ctrl_c['V']=22;
  ctrl_c['v']=22;
  ctrl_c['W']=23;
  ctrl_c['w']=23;
  ctrl_c['X']=24;
  ctrl_c['x']=24;
  ctrl_c['Y']=25;
  ctrl_c['y']=25;
  ctrl_c['Z']=26;
  ctrl_c['z']=26;
  ctrl_c['[']=27;
  ctrl_c['\\']=28;
  ctrl_c[']']=29;
  ctrl_c['^']=30;
  ctrl_c['_']=31;
  ctrl_c['?']=127;
}
/*}}}  */
/*{{{  get a token - conditional compilation*/
/*{{{  get a token and handle filed-folds - filed-folds are handled inside*/
/*{{{  get a token from current input-file*/
private tokens get_single_token(bool code,bool filename)
{ err_marked=FALSE;
  /*{{{  skip comments, spaces  ...*/
  while (input=='\n' || input==' ' || input==';' || input==begin_std_c || input==end_std_c)
  {
    if (input==';' || input==begin_std_c || input==end_std_c)
    {
      while (input!='\n' && input!=EOF) read_in();
    }
    read_in();
  }
  /*}}}  */

  switch (input)
  {
    case '\t': return(ERROR);
    /*{{{  single char tokens*/
    case EOF: {read_in();return(ENDFILE);}
    case '(': {read_in();return(BEGIN);}
    case ')': {read_in();return(END);}
    case ',': {read_in();return(COMMA);}
    case '@': {read_in();return(COMPPRE);}
    case '+': {read_in();return(ADD);}
    case '-': {read_in();return(MINUS);}
    case '*': {read_in();return(MULT);}
    /*}}}  */
    default :
    if (code)
    {
      /*{{{  code-parser*/
      switch (input)
      {
        /*{{{  hex-value*/
        case '0':
         { int h=0;
           char *s=tk_string;

           read_in();
           if (input!='x' && input!='X')
            /*{{{  error*/
            { error_po();
              fprintf(stderr,M_NOHEX);
              return(ERROR);
            }
            /*}}}  */
           read_in();
           *s++='0';
           *s++='x';
           for (;;)
            { switch(input)
               { case '0': h=h*16;   break;
                 case '1': h=h*16+1; break;
                 case '2': h=h*16+2; break;
                 case '3': h=h*16+3; break;
                 case '4': h=h*16+4; break;
                 case '5': h=h*16+5; break;
                 case '6': h=h*16+6; break;
                 case '7': h=h*16+7; break;
                 case '8': h=h*16+8; break;
                 case '9': h=h*16+9; break;
                 case 'a': h=h*16+10;break;
                 case 'A': h=h*16+10;break;
                 case 'b': h=h*16+11;break;
                 case 'B': h=h*16+11;break;
                 case 'c': h=h*16+12;break;
                 case 'C': h=h*16+12;break;
                 case 'd': h=h*16+13;break;
                 case 'D': h=h*16+13;break;
                 case 'e': h=h*16+14;break;
                 case 'E': h=h*16+14;break;
                 case 'f': h=h*16+15;break;
                 case 'F': h=h*16+15;break;
                 default:{ tk_char=h;*s++=' ';*s++='\0';return(HEX); }
               }
              *s++=input;
              read_in();
            }
         }
        /*}}}  */
        /*{{{  Meta-handling*/
        case 'M':
        {
          read_in();
          if (input!='-')
          {
            error_po();
            fprintf(stderr,M_NOMETA);
            return(ERROR);
          }
          read_in();
          return(META);
        }
        /*}}}  */
        /*{{{  Control-handling*/
        case 'C':
        {
          /*{{{  read -" and error-check*/
          read_in();
          if (input!='-')
          {
            error_po();
            fprintf(stderr,M_NOCNTRL);
            return(ERROR);
          }
          /*}}}  */
          read_in();
          tk_char=ctrl_c[input];
          read_in();
          return(CHAR);
        }
        /*}}}  */
        /*{{{  Char-handling*/
        case '"':
        {
          tk_char=read_in();
          if (input<' ' || input>127)
          {
            error_po();
            fprintf(stderr,M_NOCHAR);
            return(ERROR);
          }
          read_in();
          return(CHAR);
          break;
        }
        /*}}}  */
        /*{{{  Alias-handling*/
        case '$':
        {
          char *s=tk_string;

          read_in();
          /*{{{  read aliasname*/
          while (input!=' ' && input!='\n'
          && input!='=' && input!=EOF && input!=')')
          {
            *s++=input;
            read_in();
          }
          *s='\0';
          /*}}}  */
          return(DOLLAR);
        }
        /*}}}  */
        /*{{{  default=error*/
        default :
        {
          error_po();
          fprintf(stderr,M_NOCODE);
          return(ERROR);
        }
        /*}}}  */
      }
      /*}}}  */
    } else
    {
      /*{{{  macro-parser*/
      switch (input)
      {
        /*{{{  string-handling*/
        case '"':
        {
          TOKEN *t=tk_macro;
          char  *c=tk_string;

          read_in();
          do
          {
            /*{{{  Test auf < ' ' oder EOF*/
            if (input<' ')
            {
              error_po();
              fprintf(stderr,M_FALSEEND);
              return(ERROR);
            }
            /*}}}  */
            *t++ = (TOKEN) input;
            *c++ = (char) input;
            read_in();
          } while (   input!=' ' && input!='\n'
          && input!=')' && input!=EOF && input!='"');
          *t= (TOKEN) 0;
          *c= '\0';
          return(MACRO);
          break;
        }
        /*}}}  */
        /*{{{  opcode or keyword handling*/
        default :
        {
          /*{{{  local variables*/
          char *s=tk_string;
          keywords *key=keytab;
          OP **a=new_op;
          VARS **v=vars;
          /*}}}  */

          /*{{{  read given character-string*/
          while (   input!=' ' && input!='\n' && input!=')'
                 && input!=',' && input!=EOF && input!='('
                 && input!=';'
                )
          {
            *s++=input;read_in();
          }
          *s='\0';
          /*}}}  */
          if (filename) return(NAME);
          /*{{{  search as keyword*/
          while (key->name && strcmp(key->name,tk_string)) key++;
          if (key->value!=ERROR) return(key->value);
          /*}}}  */
          /*{{{  if fullscan, search as opcode, macro, var or number*/
          if (fullscan)
           {
             /*{{{  search as opcode*/
             tk_key=bindings;
             while(tk_key->name && strcmp(tk_key->name,tk_string)) tk_key++;
             if (tk_key->name) return(OPCODE);
             /*}}}  */
             /*{{{  search as operation*/
             while (*a && strcmp((*a)->op_name,tk_string)) a++;
             if (*a) { tk_operation = *a; return(OPERATION); }
             /*}}}  */
             /*{{{  search as variable*/
             while (*v && strcmp((*v)->var_name,tk_string)) v++;
             if (*v) { tk_var = *v; return(VARIABLE); }
             /*}}}  */
             /*{{{  is it a number*/
             s=tk_string;
             while (*s && isdigit(*s)) s++;
             if (!*s)
              { tk_val=atoi(tk_string);
                return(NUMBER);
              }
             /*}}}  */
           }
          /*}}}  */
          return(NAME);
        }
        /*}}}  */
      }
      /*}}}  */
    }
  }
  error_po();
  fprintf(stderr,M_CRASH);
  return(ERROR);
}
/*}}}  */

private tokens get_ff_token(bool code)
{ tokens t=get_single_token(code,FALSE);

  switch (t) {
     /*{{{  O_CALL_FIX*/
     case OPCODE:
      { if (tk_key->num==O_CALL_FIX)
         /*{{{  handle numbered macro-calls*/
         { static KEYNAME x;
           static char na[80];

           x.name=na;
           strcpy(na,tk_key->name);
           strcat(na," ");
           /*{{{  get correct buffer-place*/
           switch (get_single_token(code,FALSE))
            {
              /*{{{  number*/
              case NUMBER:
               { x.num=O_CALL_FIX+tk_val-1;
                 break;
               }
              /*}}}  */
              /*{{{  defined macro*/
              case OPERATION:
               { if (tk_operation->place)
                  { x.num=O_CALL_FIX+tk_operation->place+1;
                    break;
                  }
               }
              /*}}}  */
              /*{{{  else error*/
              default:
               { error_po();
                 fprintf(stderr,M_NOADDCOUNTER);
                 return(ERROR);
               }
              /*}}}  */
            }
           if (x.num<0)
            { error_po();
              return(ERROR);
            }
           /*}}}  */
           strcat(na,tk_string);
           if (x.num>(macro_pos+O_EXE_MACRO-2)) macro_pos=x.num-O_EXE_MACRO+2;
           tk_key= &x;
           return(OPCODE);
         }
         /*}}}  */
        else
           return(t);
      }
     /*}}}  */
     /*{{{  ENDFILE -> goto upper level, if any*/
     case ENDFILE:
        if (f_s_ptr)
         { close_source(in,FALSE);
           free(name_stack[f_s_ptr]);
           in=file_stack[--f_s_ptr];
           current_line_no=po_stack[f_s_ptr];
           cur_y_po=y_stack[f_s_ptr];
           nl=nl_stack[f_s_ptr];
           input=inp_stack[f_s_ptr];
           return(get_ff_token(code));
         }
        else
           return(ENDFILE);
     /*}}}  */
     /*{{{  INCLUDE -> go to lower level*/
     case INCLUDE:
       if (fullscan)
        {
          /*{{{  check if correct include*/
          if (get_single_token(FALSE,TRUE)!=NAME)
           { error_po();fprintf(stderr,M_NOFNAME);return(ERROR); }
          if (f_s_ptr==f_s_depth)
           { fprintf(stderr,M_DEPTH);return(ERROR); }
          /*}}}  */
          /*{{{  store file-info*/
          po_stack[f_s_ptr]=current_line_no;
          y_stack[f_s_ptr]=cur_y_po;
          inp_stack[f_s_ptr]=input;
          nl_stack[f_s_ptr]=nl;
          file_stack[f_s_ptr++]=in;
          name_stack[f_s_ptr]=malloc(strlen(tk_string)+1);
          strcpy(name_stack[f_s_ptr],tk_string);
          /*}}}  */
          /*{{{  try to open*/
          if (!(in=open_source(tk_string,FALSE)))
           /*{{{  free the file-stack-entry and return error*/
           { in=file_stack[--f_s_ptr];
             fprintf(stderr,F_INCLUDE,tk_string);
             return(ERROR);
           }
           /*}}}  */
          /*}}}  */
          /*{{{  start reading*/
          current_line_no=1;
          nl=FALSE;
          cur_y_po=0;
          read_in();
          return(get_ff_token(code));
          /*}}}  */
        }
     /*}}}  */
     default: return(t);
  }
}
/*}}}  */
/*{{{  tag_handling*/
/*{{{  comment*/
/*
  set=TRUE: the tags in list are set
            return=-1: syntax-error
            return=0:  tag is set
            return=1:  tag was already set
           if the list starts with ``not'', the return-values 1 and o
           are exchanged!
 set=FALSE: look, if one of the listed tags is set
            return=-1: syntax-error
            return=0:  no set tag found
            return=1:  one of the tags is set
*/
/*}}}  */
private int tag_handling(bool set)
{ tokens t;
  bool found=FALSE;
  bool reverse=FALSE;

  /*{{{  correct begin given?*/
  t=get_ff_token(FALSE);
  if (t==NOT) {t=get_ff_token(FALSE);reverse=TRUE;}
  if (t!=BEGIN)
   { error_po();fprintf(stderr,M_OPPTAG);return(-1); }
  /*}}}  */
  while ((t=get_ff_token(FALSE))!=END)
  /*{{{  handle one tag*/
  if (t==NAME)
   { int no=tags_used;
     bool local_found=FALSE;

     /*{{{  look for this tag in taglist*/
     while (no && !local_found)
        if (!strcmp(tk_string,tags[--no]))
         { local_found=TRUE;break; }
     /*}}}  */
     /*{{{  set and tag not in list, tag->list*/
     if (set && !reverse && !local_found)
      { tags[tags_used]=malloc(strlen(tk_string)+1);
        if (!tags[tags_used])
         { error_po();
           fprintf(stderr,M_NOMEMORY);
           return(-1);
         }
        strcpy(tags[tags_used++],tk_string);
        if (verbose) fprintf(stderr,F_USESET,tk_string);
      }
     /*}}}  */
     /*{{{  unset and tag in list, remove tag from list*/
     if (set && reverse && local_found)
      {
        if (no>=tags_nofree)
         { free(tags[no]);tags[no]=tags[--tags_used]; }
        else
           tags[no]="";
        if (verbose) fprintf(stderr,F_UNSET,tk_string);
      }
     /*}}}  */
     found |= local_found;
   }
  else
   /*{{{  incorrect tag-entry*/
   { error_po();fprintf(stderr,M_OPPTAG);return(-1);}
   /*}}}  */
  /*}}}  */
  if (reverse) return(found ? 0 : 1); else return(found ? 1 : 0);
}
/*}}}  */

public tokens get_token(bool code)
{
  tokens t;
  int x;

  for (;;)
   { if ((t=get_ff_token(code))==COMPPRE)
      /*{{{  handle opp-statement*/
      switch (t=get_ff_token(code))
       {
         /*{{{  if no set tag listed, overread else store number of missing ends*/
         case COMPIF:
          { if ((x=tag_handling(FALSE))==-1) return(ERROR);
            if (x)
             { missing_gnisu++;
               /*{{{  verbose-message*/
               if (verbose) fprintf(stderr,F_USECOMP,
                                           f_s_ptr?name_stack[f_s_ptr]:source,
                                           current_line_no);
               /*}}}  */
             }
            else
             /*{{{  overread the block*/
             { int use_depth=0;

               /*{{{  verbose-message*/
               if (verbose) fprintf(stderr,F_IGNORING,
                                           f_s_ptr?name_stack[f_s_ptr]:source,
                                           current_line_no);
               /*}}}  */
               use_depth=1;
               fullscan=FALSE;
               t= !ENDFILE;
               while (use_depth && t!=ENDFILE)
                  /*{{{  only parse opp-statements if-using/gnisu-fi*/
                  if ((t=get_ff_token(code))==COMPPRE)
                   { if ((t=get_ff_token(FALSE))==COMPIF)
                        use_depth++;
                     else if (t==FI)
                        use_depth--;
                   }
                  else if (t==ENDFILE)
                     break;
                  /*}}}  */
               if (t!=ENDFILE)
                { fullscan=TRUE;
                  /*{{{  verbose-message*/
                  if (verbose) fprintf(stderr,F_AGAIN,
                                              f_s_ptr?name_stack[f_s_ptr]:source,
                                              current_line_no);
                  /*}}}  */
                }
               else
                  missing_gnisu++;
             }
             /*}}}  */
            break;
          }
         /*}}}  */
         /*{{{  set tags*/
         case COMPUSE:
          { if (tag_handling(TRUE)==-1) return(ERROR);
            break;
          }
         /*}}}  */
         /*{{{  print the reference*/
         case STARTREF:
          { char line[reflg+2];
            int lg;
            char *s;
            char *r;

            for (;;)
             {
               /*{{{  read line*/
               /*{{{  read the line*/
               r=s=line;
               lg=reflg;
               do
                { if ((*s=read_in())=='\t') *s=' '; }
               while ((*s++!='\n') && lg--);
               *(s-1)='\0';
               /*}}}  */
               /*{{{  cut trailing spaces*/
               r=s=line;
               while (*r) if (*r!=' ') s= ++r; else r++;
               *s='\0';
               /*}}}  */
               /*}}}  */
               s=line;
               while (*s==' ') s++;
               if (*s=='@' && !strcmp(end_ref,s+1))
                  break;
               else if (ref)
                { fputs(line,ref);fputc('\n',ref); }
             }
            break;
          }
         /*}}}  */
         /*{{{  handle the end of a block*/
         case FI:
            if (missing_gnisu)
             /*{{{  handle the end of a block*/
             { missing_gnisu--;
               /*{{{  verbose-message*/
               if (verbose) fprintf(stderr,F_USEEND,
                                           f_s_ptr?name_stack[f_s_ptr]:source,
                                           current_line_no);
               /*}}}  */
               break;
             }
             /*}}}  */
         /*}}}  */
         default:
         /*{{{  wrong opp-statement*/
         { error_po();
           fprintf(stderr,t==FI ? M_ENDUSE : M_OPP);
           return(ERROR);
         }
         /*}}}  */
       }
      /*}}}  */
     else
        break;
   }
  /*{{{  check missing fi*/
  if (t==ENDFILE && missing_gnisu)
   { error_po();fprintf(stderr,M_BEGINUSE);return(ERROR);}
  /*}}}  */
  return(t);
}
/*}}}  */
