Changeset 10802
- Timestamp:
- Dec 17, 2006, 10:09:31 AM (20 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 8 edited
-
kapa/event/CheckPipe.c (modified) (1 diff)
-
kapa/graph/PSObjects.c (modified) (2 diffs)
-
kapa/include/constants.h (modified) (1 diff)
-
libkapa/include/kapa.h (modified) (1 diff)
-
libkapa/src/KiiConvert.c (modified) (2 diffs)
-
opihi/cmd.data/ps.c (modified) (2 diffs)
-
relastro/src/plotstuff.c (modified) (1 diff)
-
relphot/src/plotstuff.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa/event/CheckPipe.c
r5852 r10802 46 46 if (!strcmp (buffer, "PSNS")) { 47 47 status = PSit (NOSCALE); 48 write (sock, "DONE", 4); 49 return (status); 50 } 51 52 if (!strcmp (buffer, "PSNP")) { 53 status = PSit (NEWPAGE); 48 54 write (sock, "DONE", 4); 49 55 return (status); -
trunk/Ohana/src/kapa/graph/PSObjects.c
r9845 r10802 20 20 filename[status] = 0; /* make the string easy to parse */ 21 21 22 f = fopen (filename, "w"); 22 if (mode == NEWPAGE) { 23 f = fopen (filename, "a"); 24 } else { 25 f = fopen (filename, "w"); 26 } 27 23 28 if (f == (FILE *) NULL) { 24 29 fprintf (stderr, "can't open output file %s\n", filename); … … 34 39 } 35 40 36 if (mode != RAW) { 37 fprintf (f, "%%!PS-Adobe-2.0 EPSF-2.0\n"); 38 fprintf (f, "%%%%Title: Kapa Plot\n"); 39 fprintf (f, "%%%%Creator: Kapa (0.95)\n"); 40 fprintf (f, "%%%%BoundingBox: %d %d %.0f %.0f\n", 41 XOFFSET, YOFFSET, XOFFSET + scale*graphic.dx, YOFFSET + scale*graphic.dy); 42 fprintf (f, "%%%%Pages: 1\n"); 43 fprintf (f, "%%%%DocumentFonts:\n"); 44 fprintf (f, "%%%%EndComments\n"); 45 fprintf (f, "%%%%EndProlog\n"); 46 fprintf (f, "%%%%Page: 1 1\n\n"); 41 switch (mode) { 42 case NEWPAGE: 43 fprintf (f, "%%%%Page: foobar\n\n"); 44 break; 45 46 case SCALE: 47 case NOSCALE: 48 fprintf (f, "%%!PS-Adobe-2.0 EPSF-2.0\n"); 49 fprintf (f, "%%%%Title: Kapa Plot\n"); 50 fprintf (f, "%%%%Creator: Kapa (0.95)\n"); 51 fprintf (f, "%%%%BoundingBox: %d %d %.0f %.0f\n", 52 XOFFSET, YOFFSET, XOFFSET + scale*graphic.dx, YOFFSET + scale*graphic.dy); 53 fprintf (f, "%%%%Pages: 1\n"); 54 fprintf (f, "%%%%DocumentFonts:\n"); 55 fprintf (f, "%%%%EndComments\n"); 56 fprintf (f, "%%%%EndProlog\n"); 57 fprintf (f, "%%%%Page: foobar\n\n"); 58 break; 59 60 case RAW: 61 break; 47 62 } 48 63 fprintf (f, "gsave %% encloses picture\n"); -
trunk/Ohana/src/kapa/include/constants.h
r6684 r10802 26 26 # define LABELLR 7 27 27 28 enum {SCALE, NOSCALE, RAW };28 enum {SCALE, NOSCALE, RAW, NEWPAGE}; 29 29 30 30 /* EVENT_MASK consists of: -
trunk/Ohana/src/libkapa/include/kapa.h
r10337 r10802 110 110 111 111 /* KiiConvert.c */ 112 int KiiPS (int fd, int scale, int raw, char *filename);112 int KiiPS (int fd, int scale, int raw, int newpage, char *filename); 113 113 int KiiJPEG (int fd, char *filename); 114 114 int KapaPNG (int fd, char *filename); -
trunk/Ohana/src/libkapa/src/KiiConvert.c
r5852 r10802 37 37 } 38 38 39 int KiiPS (int fd, int scale, int raw, char *filename) {39 int KiiPS (int fd, int scale, int raw, int newpage, char *filename) { 40 40 41 41 char buffer[20]; … … 49 49 goto name; 50 50 } 51 if ( !raw && !scale) {52 KiiSendCommand (fd, 4, "PS IT");51 if (newpage) { 52 KiiSendCommand (fd, 4, "PSNP"); 53 53 goto name; 54 54 } 55 /* the default operation */ 56 KiiSendCommand (fd, 4, "PSIT"); 55 57 56 58 name: -
trunk/Ohana/src/opihi/cmd.data/ps.c
r7917 r10802 4 4 5 5 char filename[1024]; 6 int N, Source, Nsource, RawImage, NoScale, IsImage;6 int N, Source, Nsource, RawImage, NoScale, NewPage, IsImage; 7 7 8 8 if ((N = get_argument (argc, argv, "--help"))) goto help; 9 9 if ((N = get_argument (argc, argv, "-h"))) goto help; 10 10 11 /* raw image? */ 12 NewPage = FALSE; 13 if ((N = get_argument (argc, argv, "-newpage"))) { 14 remove_argument (N, &argc, argv); 15 NewPage = TRUE; 16 } 11 17 /* raw image? */ 12 18 RawImage = FALSE; … … 54 60 55 61 /* tell Ximage/Xgraph to ps the image */ 56 KiiPS (Source, NoScale, RawImage, filename);62 KiiPS (Source, NoScale, RawImage, NewPage, filename); 57 63 return (TRUE); 58 64 -
trunk/Ohana/src/relastro/src/plotstuff.c
r6808 r10802 49 49 if (Xgraph[N] == 0) return; 50 50 51 KiiPS (Xgraph[N], FALSE, FALSE, filename);51 KiiPS (Xgraph[N], FALSE, FALSE, FALSE, filename); 52 52 return; 53 53 } -
trunk/Ohana/src/relphot/src/plotstuff.c
r8646 r10802 49 49 if (Xgraph[N] == 0) return; 50 50 51 KiiPS (Xgraph[N], FALSE, FALSE, filename);51 KiiPS (Xgraph[N], FALSE, FALSE, FALSE, filename); 52 52 return; 53 53 }
Note:
See TracChangeset
for help on using the changeset viewer.
