Changeset 277674c


Ignore:
Timestamp:
2006-01-13T16:41:46Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0298d11, 9d6b229, ac9f0e9, d2cbe0a
Parents:
dd8d4c5
Message:

Got rid of yahoo_list, since GLib has this all already. Couldn't test too well if this breaks anything, but it shouldn't.

Location:
protocols/yahoo
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/Makefile

    rdd8d4c5 r277674c  
    1010
    1111# [SH] Program variables
    12 objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_list.o yahoo_util.o
     12objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o
    1313
    1414CFLAGS += -Wall -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB
  • protocols/yahoo/yahoo_list.h

    rdd8d4c5 r277674c  
    2121 */
    2222
    23 /*
    24  * This is a replacement for the GList.  It only provides functions that
    25  * we use in Ayttm.  Thanks to Meredyyd from everybuddy dev for doing
    26  * most of it.
    27  */
    28 
    2923#ifndef __YLIST_H__
    3024#define __YLIST_H__
    3125
    32 #ifdef __cplusplus
    33 extern "C" {
     26/* GLib has linked list already, so I don't see why libyahoo2 has to copy this... */
     27
     28typedef GList YList;
     29
     30#define y_list_append g_list_append
     31#define y_list_concat g_list_concat
     32#define y_list_copy g_list_copy
     33#define y_list_empty g_list_empty
     34#define y_list_find g_list_find
     35#define y_list_find_custom g_list_find_custom
     36#define y_list_foreach g_list_foreach
     37#define y_list_free g_list_free
     38#define y_list_free_1 g_list_free_1
     39#define y_list_insert_sorted g_list_insert_sorted
     40#define y_list_length g_list_length
     41#define y_list_next g_list_next
     42#define y_list_nth g_list_nth
     43#define y_list_prepend g_list_prepend
     44#define y_list_remove g_list_remove
     45#define y_list_remove_link g_list_remove_link
     46#define y_list_singleton g_list_singleton
     47
    3448#endif
    35 
    36 typedef struct _YList {
    37         struct _YList *next;
    38         struct _YList *prev;
    39         void *data;
    40 } YList;
    41 
    42 typedef int (*YListCompFunc) (const void *, const void *);
    43 typedef void (*YListFunc) (void *, void *);
    44 
    45 YList *y_list_append(YList * list, void *data);
    46 YList *y_list_prepend(YList * list, void *data);
    47 YList *y_list_remove_link(YList * list, const YList * link);
    48 YList *y_list_remove(YList * list, void *data);
    49 
    50 YList *y_list_insert_sorted(YList * list, void * data, YListCompFunc comp);
    51 
    52 YList *y_list_copy(YList * list);
    53 
    54 YList *y_list_concat(YList * list, YList * add);
    55 
    56 YList *y_list_find(YList * list, const void *data);
    57 YList *y_list_find_custom(YList * list, const void *data, YListCompFunc comp);
    58 
    59 YList *y_list_nth(YList * list, int n);
    60 
    61 void y_list_foreach(YList * list, YListFunc fn, void *user_data);
    62 
    63 void y_list_free_1(YList * list);
    64 void y_list_free(YList * list);
    65 int  y_list_length(const YList * list);
    66 int  y_list_empty(const YList * list);
    67 int  y_list_singleton(const YList * list);
    68 
    69 #define y_list_next(list)       list->next
    70 
    71 #ifdef __cplusplus
    72 }
    73 #endif
    74 #endif
Note: See TracChangeset for help on using the changeset viewer.