home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / logo / patch01 / logo.mods < prev    next >
Encoding:
Text File  |  1987-07-06  |  2.3 KB  |  103 lines

  1. The first two changes add the commands fill and textsize.  Fill fills in the
  2. region around the current position of the turtle using the current pen color.
  3. The boundary of the fill can be an arbitrary shape (for instance:
  4. "repeat 4 [fd 100 rt 90] rt 45 fd 10 fill" produces a black square).  If the
  5. boundary has "holes", the whole screen may get filled.  Textsize takes one
  6. argument which is the number of lines you want the text window to be in split
  7. mode.
  8.  
  9. logo.y:98 insert 3 lines
  10.         #ifdef SETCURSOR
  11.         struct object *clrtxt(), *setcur();
  12.         #endif
  13.     ->  #ifdef SUN
  14.     ->  struct object *fill_region(), *text_size();
  15.     ->  #endif
  16.  
  17.         struct lexstruct keywords[] =
  18.         {
  19.  
  20.  
  21. logo.y:203 insert 4 lines
  22.  
  23.             "scrunch",NOOP,scrunch,NULL,
  24.             "setscrunch",ONECOM,setscrunch,"setscrun",
  25.     ->  #ifdef SUN
  26.     ->        "fill",NOCOM,fill_region,NULL,
  27.     ->        "textsize",ONECOM,text_size,"ts",
  28.     ->  #endif
  29.         #endif
  30.             "toplevel",NOCOM,ltopl,NULL,
  31.             "fprint",ONECOM,cmfprint,"fp",
  32.  
  33.  
  34. logoparse.c:142 add 3 lines
  35.  
  36.             else if (ibufptr==NULL) {
  37.             rebuff:
  38.     ->  #ifdef SUN
  39.     ->            sigwinch_on();
  40.     ->  #endif
  41.                 if ((c=read(0,ibuf,IBUFSIZ))==IBUFSIZ)
  42.                     if (ibuf[IBUFSIZ-1]!='\n') {
  43.  
  44.  
  45. logoparse.c:152 add 3 lines
  46.  
  47.                         puts("Your line is too long.");
  48.                         errhand();
  49.                     }
  50.     ->  #ifdef SUN
  51.     ->            sigwinch_off();
  52.     ->  #endif
  53.                 if (c<0) {
  54.                     /* Error return from read.  Probably signal.*/
  55.                     return ('\n');
  56.  
  57. procedit.c:107 add 3 lines
  58.  
  59.                 static char editname[20] = "";
  60.                 static char *editor;
  61.     ->  #ifdef SUN
  62.     ->        int sig_mask;
  63.     ->  #endif
  64.  
  65.             if (editname[0] == '\0') {
  66.                 editor = getenv("EDITOR");
  67.  
  68.  
  69. procedit.c:107 add 3 lines
  70.  
  71.             fflush(stdout);
  72.             signal(SIGINT,SIG_IGN);
  73.             signal(SIGQUIT,SIG_IGN);
  74.     ->  #ifdef SUN
  75.     ->        sig_mask = sigblock(1 << (SIGWINCH-1));
  76.     ->  #endif
  77.             switch (pid=fork()) {
  78.                 case -1:
  79.                     printf("\nCan't fork to editor.\n");
  80.  
  81. procedit.c:120 add 3 lines
  82.                 default:
  83.                     while (wait(&status) != pid) ;
  84.     ->  #ifdef SUN
  85.     ->                sigsetmask(sig_mask);
  86.     ->  #endif
  87.             }
  88.             if (status&0177400) {
  89.  
  90.  
  91. turtle.c:384 add 3 lines
  92.  
  93.                 errhand();
  94.             }
  95.             if (turtdes == 0) dpyinit();    /* free turtle "display */
  96.     ->  #ifdef SUN
  97.     ->        checkwindow();
  98.     ->   #endif
  99.         }
  100.  
  101.         NUMBER posangle(angle)
  102.  
  103.