LIBG
This library collects invocations to primitive FabGL subroutines for easier use.
Below are the individual modules to be filled in individually and then linked in the LIBG.LIB library
/* gbrush.c */ #include <stdio.h> #include <stdlib.h> void gbrush(r, g, b) int r,g,b; { printf("%c_GBRUSH%u;%u;%u$",27,r,g,b); }
/* gclear.c */ #include <stdio.h> #include <stdlib.h> void gclear(void) { printf("%c_GCLEAR$",27); }
/* gclrterm.c */ #include <stdio.h> #include <stdlib.h> void gclrterm() void; { printf("%c_B$",27); }
/* gcursoff.c */ #include <stdio.h> #include <stdlib.h> void gcursoff(void) { printf("%c_E0$",27); }
/* gcurson.c */ #include <stdio.h> #include <stdlib.h> void gcurson(void) { printf("%c_E1$",27); }
/* gellipse.c */ #include <stdio.h> #include <stdlib.h> void gellipse(x1, y1, w, h) int x1,y1,w, h; { printf("%c_GELLIPSE%u;%u;%u;%u$",27,x1,y1,w,h); }
/* gfillelp.c */ #include <stdio.h> #include <stdlib.h> void gfillelp(x1, y1, w, h) int x1,y1,w,h; { printf("%c_GFILLELLIPSE%u;%u;%u;%u$",27,x1,y1,w,h); }
/* gfillrec.c */ #include <stdio.h> #include <stdlib.h> void gfillrect(x1, y1, x2, y2) int x1,y1, x2, y2; { printf("%c_GFILLRECT%u;%u;%u;%u$",27,x1,y1,x2,y2); }
/* gpath.c */ #include <stdio.h> #include <stdlib.h> void gpath(punti) char *punti; { printf("%c_GPATH%s",27,punti); }
/* gfillpth.c */ #include <stdio.h> #include <stdlib.h> void gfillpth(punti) char *punti; { printf("%c_GFILLPATH%s",27,punti); }
/* gpixel.c */ #include <stdio.h> #include <stdlib.h> void gpixel(x, y) int x,y; { printf("%c_GPIXEL%u;%u$",27,x,y); }
/* grect.c */ #include <stdio.h> #include <stdlib.h> void grect(x1, y1, x2, y2) int x1, y1, x2, y2; { printf("%c_GRECT%u;%u;%u;%u$",27,x1,y1,x2,y2); }
/* gline.c */ #include <stdio.h> #include <stdlib.h> void gline(x1, y1, x2, y2, r, g, b) int x1,y1,x2,y2,r,g,b; { printf("%c_GPEN%u;%u;%u$",27,r,g,b); printf("%c_GLINE%u;%u;%u;%u$",27,x1,y1,x2,y2); }
/* gscroll.c */ #include <stdio.h> #include <stdlib.h> void gscroll(x, y) int x,y; { printf("%c_GSCROLL%u;%u$",27,x,y); }
/* gpen.c */ #include <stdio.h> #include <stdlib.h> void gpen(r, g, b) int r,g,b; { printf("%c_GPEN%u;%u;%u$",27,r,g,b); }
/* gpoint.c */ #include <stdio.h> #include <stdlib.h> void gpixel(x, y, r, g, b) int x,y,r,g,b; { printf("%c_GPEN%u;%u;%u$",27,r,g,b); printf("%c_GPIXEL%u;%u$",27,x,y); }
/* gdraw.c */ #include <stdio.h> #include <stdlib.h> void gdraw(x1, y1, x2, y2) int x1,y1,x2,y2; { printf("%c_GLINE%u;%u;%u;%u$",27,x1,y1,x2,y2); }
To facilitate the task of building the library, here are the compilation directives in SUBMIT form:
;---------- LIBG.SUB ---------- c -C -O gcurson.c c -C -O gcursoff.c c -C -O gpen.c c -C -O gpixel.c c -C -O gclear.c c -C -O gellipse.c c -C -O gfillelp.c c -C -O gpath.c c -C -O gfillpth.c c -C -O gscroll.c c -C -O gclrterm.c c -C -O gdraw.c c -C -O gbrush.c c -C -O grect.c c -C -O gfillrect.c c -C -O gline.c c -C -O gpoint.c LIBR R LIBG.LIB gcurson.OBJ LIBR R LIBG.LIB gcursoff.OBJ LIBR R LIBG.LIB gpen.OBJ LIBR R LIBG.LIB gpixel.OBJ LIBR R LIBG.LIB gclear.OBJ LIBR R LIBG.LIB gellipse.OBJ LIBR R LIBG.LIB gfillelp.OBJ LIBR R LIBG.LIB gpath.OBJ LIBR R LIBG.LIB gfillpth.OBJ LIBR R LIBG.LIB gscroll.OBJ LIBR R LIBG.LIB gclrterm.OBJ LIBR R LIBG.LIB gdraw.OBJ LIBR R LIBG.LIB gbrush.OBJ LIBR R LIBG.LIB grect.OBJ LIBR R LIBG.LIB gfillrect.OBJ LIBR R LIBG.LIB gline.obj LIBR R LIBG.LIB gpoint.obj ;---------- fine ---------- LIBR M LIBG.LIB