strlib.h

Go to the documentation of this file.
00001 
00007 /*
00008    strlib contains a number of useful routines for doing file I/O
00009    and some basic string manipulation.  These routines are used for 
00010    reading in the parameter and .psf files
00011 */
00012 
00013 #ifndef STRLIB_H
00014 
00015 #define STRLIB_H
00016 
00017 #include <stdio.h>
00018 #include <ctype.h>
00019 #include <stdlib.h>
00020 #include <string.h>
00021 
00022 #ifdef WIN32
00023 #define strcasecmp(s,t) stricmp(s,t)
00024 #define strncasecmp(s,t,n) strnicmp(s,t,n)
00025 #else
00026 #include <strings.h>
00027 #endif
00028 
00029 #include "common.h"
00030 
00031 void    NAMD_truncate(char *);          //  Remove trailing spaces from
00032                                         //  a string
00033 int     NAMD_read_line(FILE *, char *, int bufsize=512); //  Read in a line from a file
00034 int     NAMD_find_word(const char *, const char *); //  Check for given word in a
00035                                         //  string
00036 int     NAMD_blank_string(char *);      //  Check to see if a string
00037                                         //  is blank
00038 void    NAMD_find_first_word(char *, char *);
00039                                         //  Find the first word in a string
00040 int     NAMD_read_int(FILE *, const char *);  //  Read an integer from a file
00041 void    NAMD_pad(char *, size_t);       //  Pad a string with leading spaces
00042 void    NAMD_remove_comment(char *);    //  Remove comments at the end of
00043                                         //  a line demarked by !
00044 
00045 #endif
00046 

Generated on Tue Sep 26 01:17:15 2017 for NAMD by  doxygen 1.4.7