"Fossies" - the Fresh Open Source Software Archive

Member "tcpproxy-2.0.0-beta15/lib.h" (15 Sep 2005, 1576 Bytes) of package /linux/privat/old/tcpproxy-2.0.0-beta15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "lib.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 
    3     File: lib.h
    4  
    5     Copyright (C) 1999 by Wolfgang Zekoll  <wzk@quietsche-entchen.de>
    6 
    7     This source is free software; you can redistribute it and/or modify
    8     it under the terms of the GNU General Public License as published by
    9     the Free Software Foundation; either version 2, or (at your option)
   10     any later version.
   11 
   12     This source is distributed in the hope that it will be useful,
   13     but WITHOUT ANY WARRANTY; without even the implied warranty of
   14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15     GNU General Public License for more details.
   16 
   17     You should have received a copy of the GNU General Public License
   18     along with this program; if not, write to the Free Software
   19     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   20 
   21 */
   22 
   23 #ifndef _LIB_INCLUDED
   24 #define _LIB_INCLUDED
   25 
   26 
   27 extern char *program;
   28 extern int verbose;
   29 
   30 typedef struct _string {
   31     int     len, max;
   32     char    *ptr;
   33     } string_t;
   34 
   35 
   36 void *allocate(size_t size);
   37 void *reallocate(void *p, size_t size);
   38 
   39 unsigned int uppercase(unsigned int c);
   40 int isuppercase(unsigned int c);
   41 unsigned int lowercase(unsigned int c);
   42 int islowercase(unsigned int c);
   43 char *strlwr(char *string);
   44 char *strupr(char *string);
   45 char *skip_ws(char *string);
   46 char *noctrl(char *buffer);
   47 char *get_word(char **from, char *to, int maxlen);
   48 char *get_quoted(char **from, int delim, char *to, int max);
   49 int split(char *line, char *ptr[], int seq, int max);
   50 char *copy_string(char *y, char *x, int len);
   51 
   52 char *clearstr(string_t *s);
   53 char *append(string_t *s, char *p, char *q);
   54 
   55 #endif
   56