Jabber WindowGram Client (JWGC)

Introduction Screenshots Installation Downloads
Documentation Browse Source Resources Project Site

Stable Version
-none-

Latest Version
beta5



Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

notice.h

Go to the documentation of this file.
00001 #ifndef notice_MODULE
00002 #define notice_MODULE
00003 
00004 /*
00005  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
00006  *      For copying and distribution information, see the file
00007  *      "mit-copyright.h".
00008  *
00009  *      Modified for jwgc by Daniel Henninger.
00010  */
00011 
00012 #include "mit-copyright.h"
00013 
00014 #include "new_string.h"
00015 
00016 /*
00017  *    int count_nulls(char *data, int length)
00018  *        Requires: length>=0
00019  *        Effects: Returns the # of nulls in data[0]..data[length-1]
00020  */
00021 
00022 extern int count_nulls();
00023 
00024 /*
00025  *    string get_next_field(char **data_p, int *length_p)
00026  *        Requires: *length_p >= 0
00027  *        Modifies: *data_p, *length_p
00028  *        Effects: Treats (*data_p)[0], (*data_p)[1], ... (*data_p)[length-1]
00029  *                 as a series of null-seperated fields.  This function
00030  *                 returns a copy of the first field on the heap.  This
00031  *                 string must eventually be freed.  Also, *data_p is
00032  *                 advanced and *length_p decreased so that another
00033  *                 call to this procedure with the same arguments will
00034  *                 return the second field.  The next call will return
00035  *                 the third field, etc.  "" is returned if 0 fields
00036  *                 remain.  (this is the case when *length_p == 0)
00037  */
00038 
00039 extern string get_next_field();
00040 
00041 /*
00042  *    string get_field(char *data, int length, int num)
00043  *        Requires: length>=0, num>0
00044  *        Effects: Treats data[0]..data[length-1] as a series of
00045  *                 null-seperated fields.  This function returns a copy of
00046  *                 the num'th field (numbered from 1 in this case) on the
00047  *                 heap.  This string must eventually be freed.  If there
00048  *                 is no num'th field (because num<1 or num># of fields),
00049  *                 "" is returned.
00050  */
00051 
00052 extern string get_field();
00053 
00054 /*
00055  *    string convert_nulls_to_newlines(data, length)
00056  *       Requires: length>=0, malloc never returns NULL
00057  *       Effects: Takes data[0]..data[length-1], converts all nulls to
00058  *                newlines ('\n') and returns the result as a null-terminated
00059  *                string on the heap.  The returned string must eventually
00060  *                be freed.
00061  */
00062 
00063 extern string convert_nulls_to_newlines();
00064 
00065 
00066 extern char *decode_notice();
00067 
00068 #endif


Last updated at Tue Dec 18 21:07:42 PST 2007. This site and project hosted by...SourceForge.net Logo
Source Perspective by Fisheye