MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
fn_UNIX.cc File Reference
#include "mbconfig.h"
#include "filename.h"
#include "myassert.h"
#include "mynewmem.h"
Include dependency graph for fn_UNIX.cc:

Go to the source code of this file.

Functions

int is_abs_path (const char *const p)
 

Function Documentation

int is_abs_path ( const char *const  p)

Definition at line 206 of file fn_UNIX.cc.

References ASSERT.

Referenced by mbdyn_parse_arguments(), and mbdyn_prepare_files().

207 {
208  ASSERT(p != 0);
209 
210 #ifdef _WIN32
211  if ((strstr(p, ":\\") != 0) || (strstr(p, ":/") != 0)) {
212  return 1;
213  }
214 #else // ! _WIN32
215  if (p[0] == '/') {
216  return 1;
217  }
218 #endif // ! _WIN32
219 
220  return 0;
221 }
#define ASSERT(expression)
Definition: colamd.c:977