Changeset 65e2ce1


Ignore:
Timestamp:
2005-11-28T23:27:09Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
ac55e50
Parents:
b20b32f
Message:

Disable plugin support by default, support compilation with non-C99 compilers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    rb20b32f r65e2ce1  
    5555GSList *connections;
    5656
     57#ifdef WITH_PLUGINS
    5758gboolean load_plugin(char *path)
    5859{
     
    7576        return TRUE;
    7677}
     78
     79void load_plugins(void)
     80{
     81        GDir *dir;
     82        GError *error = NULL;
     83
     84        dir = g_dir_open(PLUGINDIR, 0, &error);
     85
     86        if (dir) {
     87                const gchar *entry;
     88                char *path;
     89
     90                while ((entry = g_dir_read_name(dir))) {
     91                        path = g_build_filename(PLUGINDIR, entry, NULL);
     92                        if(!path) {
     93                                log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry);
     94                                continue;
     95                        }
     96
     97                        load_plugin(path);
     98
     99                        g_free(path);
     100                }
     101
     102                g_dir_close(dir);
     103        }
     104}
     105#endif
    77106
    78107/* nogaim.c */
     
    101130void nogaim_init()
    102131{
    103         GDir *dir;
    104         GError *error = NULL;
     132        extern void msn_init();
     133        extern void oscar_init();
     134        extern void byahoo_init();
     135        extern void jabber_init();
    105136
    106137#ifdef WITH_MSN
    107         extern void msn_init();
    108138        msn_init();
    109139#endif
    110140
    111141#ifdef WITH_OSCAR
    112         extern void oscar_init();
    113142        oscar_init();
    114143#endif
    115144       
    116145#ifdef WITH_YAHOO
    117         extern void byahoo_init();
    118146        byahoo_init();
    119147#endif
    120148       
    121149#ifdef WITH_JABBER
    122         extern void jabber_init();
    123150        jabber_init();
    124151#endif
    125152
    126         dir = g_dir_open(PLUGINDIR, 0, &error);
    127 
    128         if (dir) {
    129                 const gchar *entry;
    130                 char *path;
    131 
    132                 while ((entry = g_dir_read_name(dir))) {
    133                         path = g_build_filename(PLUGINDIR, entry, NULL);
    134                         if(!path) {
    135                                 log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry);
    136                                 continue;
    137                         }
    138 
    139                         load_plugin(path);
    140 
    141                         g_free(path);
    142                 }
    143 
    144                 g_dir_close(dir);
    145         }
     153#ifdef WITH_PLUGINS
     154        load_plugins();
     155#endif
    146156}
    147157
Note: See TracChangeset for help on using the changeset viewer.