Ignore:
Timestamp:
Oct 14, 2005 9:43:27 AM (19 years ago)
Author:
dkearney
Message:

This update brings us one step closer to being const correct in the RpUnits
class. Added a few more comments. All other files touched were made to
comply with the new const correct RpUnits.[h,cc]

Location:
trunk/examples/c-example
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/c-example/Makefile

    r92 r104  
    1818INCL_RP_DEPS    = -I $(RP_BASE)/include
    1919
     20INCL_FILES      = $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS)
     21
    2022LIB_DIR         = $(RP_BASE)/lib
    2123LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
     
    2527
    2628plot: plot.cc
    27         $(CXX) $(DEBUG) -DDEBUG $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $< $(LIB_RAPPTURE)
     29        $(CXX) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE)
    2830
    2931plotc: plotc.c
    30         $(CC) $(DEBUG) -DDEBUG $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $< $(LIB_RAPPTURE)
     32        $(CC) $(DEBUG) -DDEBUG $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE) -lm
    3133
    3234#### CLEAN UP ############################################################
  • trunk/examples/c-example/plotc.c

    r93 r104  
    11#include "RpLibraryCInterface.h"
    22
    3 //#include <stdlib.h>
     3#include <stdlib.h>
    44#include <string.h>
    55#include <stdio.h>
     6#include <math.h>
    67
    78int main(int argc, char * argv[])
     
    1011    RpLibrary* lib = NULL;
    1112
    12     char* filePath;
    13     char* xmltext = NULL;
     13    const char* filePath;
     14    const char* xmltext = NULL;
    1415    double fmin, fmax;
    1516    char strFormula[100];
     
    4243        // cannot open file or out of memory
    4344        printf("FAILED creating Rappture Library\n");
    44         exit(1);
     45        return(1);
    4546    }
    4647
     
    5455    else {
    5556        printf("xml(lib) failed\n");
    56         exit(1);
     57        return(1);
    5758    }
    5859
     
    6263    if (! (xmltext) ) {
    6364        printf("getString(lib,input.number(xmin).current) returns null\n");
    64         exit(1);
     65        return(1);
    6566    }
    6667
Note: See TracChangeset for help on using the changeset viewer.