Changeset 1019 for trunk/examples/c-example/plotc.c
- Timestamp:
- Jun 8, 2008, 6:32:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/c-example/plotc.c
r555 r1019 13 13 #include <math.h> 14 14 15 int main(int argc, char * argv[]) 15 #ifdef DEBUG 16 static int debug = 1; 17 #else 18 static int debug = 0; 19 #endif 20 21 int 22 main(int argc, char **argv) 16 23 { 17 24 … … 37 44 filePath = argv[1]; 38 45 39 if ( DEBUG)46 if (debug) 40 47 printf("filePath: %s:\n", filePath); 41 48 … … 44 51 45 52 if (lib) { 46 if( DEBUG) {53 if(debug) { 47 54 printf("created Rappture Library successfully\n"); 48 55 } … … 57 64 err = rpXml(lib,&xmltext); 58 65 if( !err ) { 59 if( DEBUG) {66 if(debug) { 60 67 //printf("XML file content:\n"); 61 68 //printf("%s\n", xmltext); … … 79 86 // it will live in rappture's memory until the next call to getString() 80 87 81 if( DEBUG) {82 printf("xml min: %s: len=%d\n", xmltext,strlen(xmltext));88 if(debug) { 89 printf("xml min: %s: len=%d\n", xmltext, (int)strlen(xmltext)); 83 90 } 84 91 85 92 fmin = atof(xmltext); 86 93 // fmin = getDouble(lib,"input.number(min).current"); 87 if( DEBUG) {94 if(debug) { 88 95 printf("min: %f\n", fmin); 89 96 } … … 91 98 // get the max 92 99 rpGetDouble(lib,"input.(max).current",&fmax); 93 if( DEBUG) {100 if(debug) { 94 101 printf("max: %f\n", fmax); 95 102 }
Note: See TracChangeset
for help on using the changeset viewer.