Changeset 5850 for trunk/Ohana/src/opihi/cmd.data/box.c
- Timestamp:
- Dec 27, 2005, 3:21:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/box.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/box.c
r5849 r5850 4 4 5 5 int i, N, Ngraph, Xgraph; 6 char Ticks[16], Axis[16], Labels[16];7 6 Graphdata graphmode; 8 7 9 strcpy (Ticks, "2222"); 8 if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE); 9 10 strcpy (graphmode.ticks, "2222"); 10 11 if ((N = get_argument (argc, argv, "-ticks"))) { 11 12 remove_argument (N, &argc, argv); 12 strcpy ( Ticks, argv[N]);13 strcpy (graphmode.ticks, argv[N]); 13 14 remove_argument (N, &argc, argv); 14 if (strlen ( Ticks) != 4) { goto usage; }15 for (i = 0; i < strlen ( Ticks); i++) {16 if (( Ticks[i] != '0') && (Ticks[i] != '1') && (Ticks[i] != '2')) { goto usage; }15 if (strlen (graphmode.ticks) != 4) { goto usage; } 16 for (i = 0; i < strlen (graphmode.ticks); i++) { 17 if ((graphmode.ticks[i] != '0') && (graphmode.ticks[i] != '1') && (graphmode.ticks[i] != '2')) { goto usage; } 17 18 } 18 19 } 19 20 20 strcpy ( Labels, "2222");21 strcpy (graphmode.labels, "2222"); 21 22 if ((N = get_argument (argc, argv, "-labels"))) { 22 23 remove_argument (N, &argc, argv); 23 strcpy ( Labels, argv[N]);24 strcpy (graphmode.labels, argv[N]); 24 25 remove_argument (N, &argc, argv); 25 if (strlen ( Labels) != 4) { goto usage; }26 for (i = 0; i < strlen ( Labels); i++) {27 if (( Labels[i] != '0') && (Labels[i] != '1') && (Labels[i] != '2')) { goto usage; }26 if (strlen (graphmode.labels) != 4) { goto usage; } 27 for (i = 0; i < strlen (graphmode.labels); i++) { 28 if ((graphmode.labels[i] != '0') && (graphmode.labels[i] != '1') && (graphmode.labels[i] != '2')) { goto usage; } 28 29 } 29 30 } 30 31 31 strcpy ( Axis, "2222");32 strcpy (graphmode.axis, "2222"); 32 33 if ((N = get_argument (argc, argv, "-axis"))) { 33 34 remove_argument (N, &argc, argv); 34 strcpy ( Axis, argv[N]);35 strcpy (graphmode.axis, argv[N]); 35 36 remove_argument (N, &argc, argv); 36 if (strlen ( Axis) != 4) { goto usage; }37 for (i = 0; i < strlen ( Axis); i++) {38 if (( Axis[i] != '0') && (Axis[i] != '1') && (Axis[i] != '2')) { goto usage; }37 if (strlen (graphmode.axis) != 4) { goto usage; } 38 for (i = 0; i < strlen (graphmode.axis); i++) { 39 if ((graphmode.axis[i] != '0') && (graphmode.axis[i] != '1') && (graphmode.axis[i] != '2')) { goto usage; } 39 40 } 40 41 } … … 46 47 remove_argument (N, &argc, argv); 47 48 } 48 if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);49 49 50 50 if (argc != 1) goto usage; 51 51 52 KapaBox (Xgraph, &graphmode , Axis, Labels, Ticks);52 KapaBox (Xgraph, &graphmode); 53 53 return (TRUE); 54 54 … … 73 73 -labels 1100 74 74 -ticks 1111 75 76 77 75 78 76 messages to kapa:
Note:
See TracChangeset
for help on using the changeset viewer.
