/*POSTX.C*/#include "GLOBALS.H";extern char *malloc();extern int columns;post(f)FILELX *f;$(  FILELX frec;  char buf[MAXL], *ptr, c;  int i, j, k, sp, entline, esc;  poke(82,0);  poke(752,0);  printf("\n");  frec.lnhead = NULL;  ptr = buf;  j = 0;  esc = entline = 1;  sp = -1;  while(entline)  $(    k = j;    while(((c=getkey()) != 155) && esc)    $(      if(c >=32 && c <=127)      $(        if(j == columns)        $(          if(sp >= 0)            ptr[sp] = '\0';          else ptr[j] = '\0';          if(addcon(ptr,&frec))          $(            if(sp>=0)            $(              j = j-sp-1;              for(i=0;i<j;i++)              $(                ptr[i] = ptr[sp+1+i];                putchar(ptr[i]);                ptr[sp+1+i] = 32;              $)              sp = -1;            $)            else j = 0;            ptr[j++] = c;            putchar(c);          $)          else esc = 0;        $)        else        $(          switch(c)          $(            case 126:            if(j>k)            $(              putchar(c);              j--;            $)            break;            case 32:            $(              sp = j;              putchar(c);              ptr[j++] = c;            $)            break;            case 92: case 96: case 123: case 125:              ;            break;            default:            $(              putchar(c);              ptr[j++] = c;            $)            break;          $)/* end switch */        $)/* end else of if j=cols */      $)/* escape exits here */      if(c == 27) esc = 0;    $)/* while c != 155 && esc */    entline = esc;    if(entline)    $(      putchar('\n');      ptr[j] = '\0';      if(addcon(ptr,&frec))        j = 0;      else entline = 0;    $)  $)/* while entline */  (*f).lnhead = frec.lnhead;  (*f).endln = frec.endln;$)addcon(curr,frc)char *curr;FILELX *frc;$(  CONN *new;  char *t, *rec;  int bts, n, slist;  n = 0;  rec = curr;  bts = strlen(rec)+1;  slist = sizeof(CONN);  t = malloc(bts+slist);  if(t != NULL)  $(    move(rec,t,bts);    new = (CONN *)(bts + (int)t);    new->dat  = t;    new->typ = 'C';    new->next = NULL;    if((*frc).lnhead == NULL)      (*frc).lnhead = new;    else (*frc).endln->next = new;    (*frc).endln = new;    n = 1;  $)  return(n);$)