[BACK]Return to stringlist.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/stringlist.c between version 1.4 and 1.5

version 1.4, 2003/12/16 21:46:22 version 1.5, 2004/07/20 03:50:26
Line 49 
Line 49 
  * sl_init(): Initialize a string list   * sl_init(): Initialize a string list
  */   */
 StringList *  StringList *
 sl_init()  sl_init(void)
 {  {
         StringList *sl = malloc(sizeof(StringList));          StringList *sl = malloc(sizeof(StringList));
         if (sl == NULL)          if (sl == NULL)
Line 68 
Line 68 
  * sl_add(): Add an item to the string list   * sl_add(): Add an item to the string list
  */   */
 void  void
 sl_add(sl, name)  sl_add(StringList *sl, char *name)
         StringList *sl;  
         char *name;  
 {  {
         if (sl->sl_cur == sl->sl_max - 1) {          if (sl->sl_cur == sl->sl_max - 1) {
                 sl->sl_max += _SL_CHUNKSIZE;                  sl->sl_max += _SL_CHUNKSIZE;
Line 86 
Line 84 
  * sl_free(): Free a stringlist   * sl_free(): Free a stringlist
  */   */
 void  void
 sl_free(sl, all)  sl_free(StringList *sl, int all)
         StringList *sl;  
         int all;  
 {  {
         size_t i;          size_t i;
   
Line 108 
Line 104 
  * sl_find(): Find a name in the string list   * sl_find(): Find a name in the string list
  */   */
 char *  char *
 sl_find(sl, name)  sl_find(StringList *sl, char *name)
         StringList *sl;  
         char *name;  
 {  {
         size_t i;          size_t i;
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5