Last change
on this file since 597 was
597,
checked in by dkearney, 18 years ago
|
adjusted core makefile to not remove setup.py when doing a make clean
adjusted putFile and putData commands and flags in matlab, octave,fortran,perl
changed the RPLIB_[TEXT,BINARY] flags to RPLIB_COMPRESS and RPLIB_NO_COMPRESS flags
adjusted the c-example for compress to incorporate newly named flags.
adjusted rappture library header to find rappture buffer header files in rappture2 directory.
|
File size:
1.2 KB
|
Rev | Line | |
---|
[589] | 1 | // ====================================================================== |
---|
| 2 | // Copyright (c) 2004-2007 Purdue Research Foundation |
---|
| 3 | // See the file "license.terms" for information on usage and |
---|
| 4 | // redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
| 5 | // ====================================================================== |
---|
| 6 | |
---|
| 7 | #include "rappture.h" |
---|
| 8 | |
---|
| 9 | #include <stdio.h> |
---|
| 10 | |
---|
| 11 | int main(int argc, char * argv[]) |
---|
| 12 | { |
---|
| 13 | |
---|
| 14 | RpLibrary* lib = NULL; |
---|
| 15 | |
---|
| 16 | const char* xmlFilePath = NULL; |
---|
| 17 | const char* dxFilePath = NULL; |
---|
| 18 | |
---|
| 19 | if (argc < 3) { |
---|
| 20 | printf("usage: %s driver.xml picture.dx\n", argv[0]); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | xmlFilePath = argv[1]; |
---|
| 24 | dxFilePath = argv[2]; |
---|
| 25 | |
---|
| 26 | // create a rappture library from the file filePath |
---|
| 27 | lib = rpLibrary(xmlFilePath); |
---|
| 28 | |
---|
| 29 | if (lib == NULL) { |
---|
| 30 | // cannot open file or out of memory |
---|
| 31 | printf("FAILED creating Rappture Library\n"); |
---|
| 32 | return 1; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | // label the graph with a title |
---|
| 36 | rpPutString(lib,"output.field(dxFile1).about.label", |
---|
| 37 | "Example loading of a DX file",RPLIB_OVERWRITE); |
---|
| 38 | rpPutFile(lib,"output.field(dxFile1).component.dx", |
---|
[597] | 39 | dxFilePath,RPLIB_COMPRESS,RPLIB_OVERWRITE); |
---|
[589] | 40 | |
---|
| 41 | // write output to run file and signal |
---|
| 42 | rpResult(lib); |
---|
| 43 | |
---|
| 44 | return 0; |
---|
| 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.