"Fossies" - the Fresh Open Source Software Archive

Member "gtybalt-1.3.6/eqascii/int.c" (7 May 2001, 994 Bytes) of package /linux/privat/gtybalt-1.3.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "int.c" see the Fossies "Dox" file reference documentation.

    1 /* This code is distributed under the terms of Gnu Publice License */
    2 /* The author is Przemek Borys <pborys@dione.ids.pl> */
    3 #include <string.h>
    4 #include "utils.h"
    5 #include "variables.h"
    6 #include "dim.h"
    7 
    8 int
    9 dimInt (char *found, char **Gpos, Tdim * Our, struct Tgraph *graph)
   10 {
   11 #define gpos (*Gpos)
   12 #define our (*Our)
   13   char *start = found, *end, *tmp;
   14   Tdim out;
   15 
   16   *gpos = 1;            /* mark the prod as #1#8 */
   17   gpos++;
   18   *gpos = 8;
   19   gpos++;
   20   *gpos = 0;
   21   our.x += 4;
   22   if (our.baseline == 0)
   23     {
   24       our.baseline++;
   25       our.y++;
   26     }
   27   if (our.y - our.baseline < 3)
   28     our.y = 3 + our.baseline;
   29   return 3;
   30 
   31 #undef gpos
   32 #undef our
   33 }
   34 void
   35 drawInt (int *Kid, int *Curx, int *Cury, char ***screen, struct Tgraph *graph)
   36 {
   37 #define kid (*Kid)
   38 #define curx (*Curx)
   39 #define cury (*Cury)
   40   (*screen)[cury - 2][curx + 2] = '_';
   41   (*screen)[cury - 1][curx + 1] = '|';
   42   (*screen)[cury][curx + 1] = '|';
   43   (*screen)[cury + 1][curx + 1] = '|';
   44   (*screen)[cury + 1][curx] = '_';
   45   curx += 4;
   46 }