Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

util.h

Go to the documentation of this file.
00001  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
00002  * 
00003  * The Lemur toolkit for language modeling and information retrieval.
00004  * Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted for research or educational purposes,
00008  * provided that this copyright notice is maintained and note is made
00009  * of any changes to the source code.
00010  * 
00011  * This is a research system.  The code is distributed on an "as is" basis,
00012  * without any warranty, express or implied. 
00013  * 
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 
00017 #ifndef _UTIL_INCLUDED
00018 #define _UTIL_INCLUDED 1
00019 
00020 #include <stdarg.h>
00021 #include "error.h"
00022 
00023 #define EOS  '\0'
00024 #define CRLF  printf("\n")
00025 #define TRUE  1
00026 #define FALSE 0
00027 
00028 extern const char*  quote (const char *s);
00029 extern char*  dequote (char *s);
00030 extern void   quote_no_matter_what (const char *s, char *t);
00031 extern int    verify (char *s, char *t);
00032 extern char*  strip (char *s);
00033 extern char*  upper (char *s);
00034 extern char*  lower (char *s);
00035 extern int    qfilef (const char *fname); /* TRUE if file exists */
00036 extern int    free_storage (char *fn); /* returns free storage in file system of fn */
00037 extern char*  util_strdup(char *string);
00038 extern void*  util_malloc (int size);
00039 extern void*  util_realloc (void *p, int size);
00040 extern void*  util_calloc (int num, int size);
00041 extern void   util_free (void *p);
00042 extern int    util_space_in_use (void);
00043 extern int    util_pointers_in_use (void);
00044 
00045 #endif

Generated on Wed Nov 3 12:59:07 2004 for Lemur Toolkit by doxygen1.2.18