home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / gle / util / contour / calcomp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-29  |  988 b   |  45 lines

  1. /* some emulation routines for the calcomp plotting calls */
  2.  
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. #include <ctype.h>
  6. #include <string.h>
  7. #include <assert.h>
  8. #include <math.h>
  9.  
  10. #define true (!false)
  11. #define false 0
  12.  
  13. /*main(int argc, char **argv)
  14. */
  15.  
  16. number_(float *x, float *y, float *z, float *v, float *c1, long *c2)
  17. {    
  18.     printf("! Number %g %g %g {%g} %g %d \n",(double) *x,(double) *y,(double) 
  19.         *z,(double) *v,(double) *c1,c2);
  20.     printf("amove %g %g \n",(double) *x,(double) *y);
  21.     printf("text %g \n",(double) *v);
  22.     
  23. }
  24. symbol_(float *x, float *y, float *z, char *s, float *c1, long *c2, long c3)
  25. {    
  26.     printf("!Symbol %g %g %g {%s} %g %d %d \n",*x,*y,*z,s,*c1,*c2,c3);
  27.     printf("amove %g %g \n",(double) *x,(double) *y);
  28.     printf("text %c \n",*s);
  29. }
  30. plot_(float *x1, float *y1, int *cmd)
  31. {
  32.     switch (*cmd) {
  33.       case 2:
  34.         printf("aline %g %g \n",*x1,*y1);
  35.         break;
  36.       case 3:
  37.         printf("amove %g %g \n",*x1,*y1);
  38.         break;
  39.       default:
  40.         printf("! %d %g %g \n",*cmd,*x1,*y1);
  41.         break;
  42.     }
  43. }
  44.  
  45.