home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_06 / v7n6012a.txt < prev    next >
Text File  |  1989-07-25  |  2KB  |  62 lines

  1. main()
  2.  
  3.      {
  4.      startup();
  5.      while(ActionStackIsNotEmpty())
  6.           {
  7.           if(!ExecuteNextAction())
  8.                     break;
  9.           }    
  10.      fclose(outfile);
  11.      CursorOn();
  12.      ScClr();
  13.      }
  14.  
  15. startup()
  16.      {
  17.  
  18.      /* This configures the screen into the various windows */
  19.      ConScr("a",0,0,80,25,adnorm,Nullbox,Nullgut);
  20.      ConScr("ab00a1a",0,0,80,1,awhbl,Nullbox,Nullgut);
  21.  
  22.      /* This sets up the individual fields */    
  23.     StEditSpecMember(hdrmems[custname_edit],hdrmast,"ab00a1a",
  24.       (CustNameMaxLength + 1));
  25.         StInputOffset(hdrmems[custname_edit],1);
  26.         StValtype(hdrmems[custname_edit],KiVNone);
  27.         StIsRequiredField(hdrmems[custname_edit]);
  28.         SetUserStConnection(hdrmems[custname_edit],"C %s\n");
  29.  
  30.     StEditSpecMember(hdrmems[custaddr_edit],hdrmast,"ab00a2a",
  31.       (CustAddrMaxLength + 1));
  32.         StInputOffset(hdrmems[custaddr_edit],1);
  33.         StValtype(hdrmems[custaddr_edit],KiVNone);
  34.         StIsRequiredField(hdrmems[custaddr_edit]);
  35.         SetUserStConnection(hdrmems[custaddr_edit],"A %s\n");
  36.     StackAction("another");
  37.     return(1);
  38.      }
  39.  
  40. int another()    /* Do another invoice? */
  41.      {
  42.      int yes;
  43.  
  44.      end_keystroke = ENTER;        /* signal this routine has run */
  45.      yes = num_invoices ? yesno(" Do another invoice?") : 1;
  46.      if (yes)
  47.           {
  48.           fputs("N\n",outfile);
  49.           StackAction("header");
  50.           }          
  51.      else
  52.           UnstackAction();
  53.      return(1);
  54.      }
  55.  
  56.  
  57.  
  58.  
  59.    
  60.  
  61.    
  62.