Gromacs

Cpp replacement

    Table of contents
    No headers

    This is a relatively easy project which will be helpful for computers without real operating systems, like Cray, or Windows boxes. The interface could look like this:

     enum { eCPP_OK, eCPP_FILENOTFOUND, eCPP_EOF, eCPP_SYNTAX, eCPP_UNKNOWN, eCPP_NR };
     /* The possible return codes for these functions */
     int cpp_open_file(char *filenm,void *handle);
     /* Open the file to be processed. The handle variable holds internal info for the cpp emulator. Return integer status */
     int cpp_read_line(void *handle,int n,char buf[]);
     /* Return one whole line from the file into buf which holds at most n characters, for subsequent processing. Returns integer status */
     int cpp_close_file(void *handle);
     /* Close the file! Return integer status. */
     char *cpp_error(int status);
     /* Return a string containing the error message coresponding to status variable */
    

    The code should be able to handle the most common cpp constucts that are used by grompp user:

     #define
     #undef
     #ifdef
     #ifndef
     #else
     #endif
     #include
    

    David van der Spoel is working on this one. This project is now finished. It has been implemented in CVS and will be available in version 4.0. The source code is in src/kernel/gmxcpp.[ch]

    Page last modified 11:10, 21 Mar 2009 by rossen