OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
os_utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _BOOLEAN_DEFINED
 
#define DOS_EOL_LENGTH   2
 
#define DOS_EOL_STRING   "\r\n"
 
#define FALSE   0
 
#define FF_STRLEN(a)   ((a)?strlen(a):0)
 
#define FF_SUBSTRCMP(a, b)   (((a)&&(b))?strncmp(a,b,min(FF_STRLEN(a),FF_STRLEN(b))):1)
 
#define FLIP_2_BYTES(a)
 
#define FLIP_4_BYTES(a)
 
#define LINESPACE   "\x09\x0b\x0c\x20"
 
#define MAC_EOL_LENGTH   1
 
#define MAC_EOL_STRING   "\r"
 
#define max(a, b)   ((a) > (b) ? (a) : (b))
 
#define min(a, b)   ((a) < (b) ? (a) : (b))
 
#define NATIVE_EOL_LENGTH   UNIX_EOL_LENGTH
 
#define NATIVE_EOL_LENGTH   MAC_EOL_LENGTH
 
#define NATIVE_EOL_LENGTH   DOS_EOL_LENGTH
 
#define NATIVE_EOL_STRING   UNIX_EOL_STRING
 
#define NATIVE_EOL_STRING   MAC_EOL_STRING
 
#define NATIVE_EOL_STRING   DOS_EOL_STRING
 
#define ok_strlen(a)   FF_STRLEN(a) /* phase this out */
 
#define OS_INVERSE_ESCAPE   0
 
#define OS_NORMAL_ESCAPE   1
 
#define osf_strcmp   strcmp
 
#define osf_strcmp   os_strcmpi
 
#define osf_strcmp   os_strcmpi
 
#define ROUND(a)   ((a) < 0 ? ceil((a) - 0.5 - DOUBLE_UP) : floor((a) + 0.5 + DOUBLE_UP))
 
#define TRUE   1
 
#define TRUNC(a)   ((a) < 0 ? ceil(a) : floor(a))
 
#define UNION_EOL_CHARS   "\x0a\x0d"
 
#define UNIX_EOL_LENGTH   1
 
#define UNIX_EOL_STRING   "\n"
 
#define WHITESPACE   "\x09\x0a\x0b\x0c\x0d\x20"
 

Typedefs

typedef short BOOLEAN
 

Functions

BOOLEAN os_file_exist (char *filename)
 
unsigned long os_filelength (char *filename)
 
char * os_get_env (char *variable_name)
 
void * os_mac_load_env (char *buffer)
 
int os_path_cmp_paths (char *s, char *t)
 
void os_path_find_parent (char *path, char **parentdir)
 
void os_path_find_parts (char *path, char **pathname, char **filename, char **fileext)
 
void os_path_get_parts (char *path, char *pathname, char *filename, char *fileext)
 
BOOLEAN os_path_is_native (char *path)
 
char * os_path_make_native (char *native_path, char *path)
 
BOOLEAN os_path_prepend_special (char *in_name, char *home_path, char *out_name)
 
char * os_path_put_parts (char *fullpath, char *dirpath, char *filename, char *fileext)
 
char * os_path_return_ext (char *pfname)
 
char * os_path_return_name (char *pfname)
 
char * os_path_return_path (char *pfname)
 
void os_str_replace_char (char *string, char oldc, char newc)
 
void os_str_replace_escaped_char1_with_char2 (const char escape, char char1, char char2, char *str)
 
void os_str_replace_unescaped_char1_with_char2 (char char1, char char2, char *str)
 
char * os_str_trim_linespace (char *line)
 
char * os_str_trim_whitespace (char *dest, char *source)
 
int os_strcmpi (const char *s1, const char *s2)
 
char * os_strdup (char *)
 
char * os_strlwr (char *string)
 
int os_strncmpi (const char *s1, const char *s2, size_t n)
 
char * os_strrstr (const char *s1, const char *s2)
 
char * os_strupr (char *)
 
Handle PathNameFromFSSpec (FSSpecPtr myFSSPtr)
 

Macro Definition Documentation

#define _BOOLEAN_DEFINED

Definition at line 112 of file os_utils.h.

#define DOS_EOL_LENGTH   2

Definition at line 30 of file os_utils.h.

#define DOS_EOL_STRING   "\r\n"

Definition at line 29 of file os_utils.h.

#define FALSE   0

Definition at line 126 of file os_utils.h.

#define FF_STRLEN (   a)    ((a)?strlen(a):0)

Definition at line 87 of file os_utils.h.

#define FF_SUBSTRCMP (   a,
 
)    (((a)&&(b))?strncmp(a,b,min(FF_STRLEN(a),FF_STRLEN(b))):1)

Definition at line 90 of file os_utils.h.

#define FLIP_2_BYTES (   a)
Value:
( (((unsigned short)(a) & 0xFF00u) >> 8) | \
(((a) & 0x00FFu) << 8) )

Definition at line 106 of file os_utils.h.

#define FLIP_4_BYTES (   a)
Value:
( (((a) & 0x000000FFu) << 24) | \
(((a) & 0x0000FF00u) << 8) | \
(((unsigned long)(a) & 0x00FF0000u) >> 8) | \
(((unsigned long)(a) & 0xFF000000u) >> 24) )

Definition at line 101 of file os_utils.h.

#define LINESPACE   "\x09\x0b\x0c\x20"

Definition at line 98 of file os_utils.h.

#define MAC_EOL_LENGTH   1

Definition at line 27 of file os_utils.h.

#define MAC_EOL_STRING   "\r"

Definition at line 26 of file os_utils.h.

#define min (   a,
 
)    ((a) < (b) ? (a) : (b))
#define NATIVE_EOL_LENGTH   UNIX_EOL_LENGTH

Definition at line 49 of file os_utils.h.

#define NATIVE_EOL_LENGTH   MAC_EOL_LENGTH

Definition at line 49 of file os_utils.h.

#define NATIVE_EOL_LENGTH   DOS_EOL_LENGTH

Definition at line 49 of file os_utils.h.

#define NATIVE_EOL_STRING   UNIX_EOL_STRING

Definition at line 48 of file os_utils.h.

#define NATIVE_EOL_STRING   MAC_EOL_STRING

Definition at line 48 of file os_utils.h.

#define NATIVE_EOL_STRING   DOS_EOL_STRING

Definition at line 48 of file os_utils.h.

#define ok_strlen (   a)    FF_STRLEN(a) /* phase this out */

Definition at line 88 of file os_utils.h.

#define OS_INVERSE_ESCAPE   0

Definition at line 92 of file os_utils.h.

#define OS_NORMAL_ESCAPE   1

Definition at line 93 of file os_utils.h.

#define osf_strcmp   strcmp

Definition at line 63 of file os_utils.h.

#define osf_strcmp   os_strcmpi

Definition at line 63 of file os_utils.h.

#define osf_strcmp   os_strcmpi

Definition at line 63 of file os_utils.h.

#define ROUND (   a)    ((a) < 0 ? ceil((a) - 0.5 - DOUBLE_UP) : floor((a) + 0.5 + DOUBLE_UP))

Definition at line 76 of file os_utils.h.

#define TRUE   1

Definition at line 122 of file os_utils.h.

#define TRUNC (   a)    ((a) < 0 ? ceil(a) : floor(a))

Definition at line 82 of file os_utils.h.

#define UNION_EOL_CHARS   "\x0a\x0d"

Definition at line 95 of file os_utils.h.

#define UNIX_EOL_LENGTH   1

Definition at line 24 of file os_utils.h.

#define UNIX_EOL_STRING   "\n"

Definition at line 23 of file os_utils.h.

#define WHITESPACE   "\x09\x0a\x0b\x0c\x0d\x20"

Definition at line 97 of file os_utils.h.

Typedef Documentation

typedef short BOOLEAN

Definition at line 115 of file os_utils.h.

Function Documentation

BOOLEAN os_file_exist ( char *  filename)
unsigned long os_filelength ( char *  filename)
char* os_get_env ( char *  variable_name)
void* os_mac_load_env ( char *  buffer)
int os_path_cmp_paths ( char *  s,
char *  t 
)
void os_path_find_parent ( char *  path,
char **  parentdir 
)
void os_path_find_parts ( char *  path,
char **  pathname,
char **  filename,
char **  fileext 
)
void os_path_get_parts ( char *  path,
char *  pathname,
char *  filename,
char *  fileext 
)
BOOLEAN os_path_is_native ( char *  path)
char* os_path_make_native ( char *  native_path,
char *  path 
)
BOOLEAN os_path_prepend_special ( char *  in_name,
char *  home_path,
char *  out_name 
)
char* os_path_put_parts ( char *  fullpath,
char *  dirpath,
char *  filename,
char *  fileext 
)
char* os_path_return_ext ( char *  pfname)
char* os_path_return_name ( char *  pfname)
char* os_path_return_path ( char *  pfname)
void os_str_replace_char ( char *  string,
char  oldc,
char  newc 
)
void os_str_replace_escaped_char1_with_char2 ( const char  escape,
char  char1,
char  char2,
char *  str 
)
void os_str_replace_unescaped_char1_with_char2 ( char  char1,
char  char2,
char *  str 
)
char* os_str_trim_linespace ( char *  line)
char* os_str_trim_whitespace ( char *  dest,
char *  source 
)
int os_strcmpi ( const char *  s1,
const char *  s2 
)
char* os_strdup ( char *  )
char* os_strlwr ( char *  string)
int os_strncmpi ( const char *  s1,
const char *  s2,
size_t  n 
)
char* os_strrstr ( const char *  s1,
const char *  s2 
)
char* os_strupr ( char *  )
Handle PathNameFromFSSpec ( FSSpecPtr  myFSSPtr)