Mercurial > pidgin
comparison plugins/perl/perl.c @ 5872:059d95c67cda
[gaim-migrate @ 6304]
The legendary Header File Cleanup! Files now only include what they need.
This should reduce the number of files that must recompile when a header
file changes. It's a lot nicer. Trust me on it. I also added a couple new
header files. I hope I didn't break TOO much!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 14 Jun 2003 23:21:02 +0000 |
parents | 171fdd5493b9 |
children | a18e88c4dace |
comparison
equal
deleted
inserted
replaced
5871:508adf90fbb9 | 5872:059d95c67cda |
---|---|
21 * Translated from X-Chat to Gaim by Eric Warmenhoven. | 21 * Translated from X-Chat to Gaim by Eric Warmenhoven. |
22 * Originally by Erik Scrafford <eriks@chilisoft.com>. | 22 * Originally by Erik Scrafford <eriks@chilisoft.com>. |
23 * X-Chat Copyright (C) 1998 Peter Zelezny. | 23 * X-Chat Copyright (C) 1998 Peter Zelezny. |
24 * | 24 * |
25 */ | 25 */ |
26 | |
27 #ifdef HAVE_CONFIG_H | |
28 #include <config.h> | |
29 #ifdef DEBUG | 26 #ifdef DEBUG |
30 #undef DEBUG | 27 # undef DEBUG |
31 #endif | 28 #endif |
32 #endif | 29 |
33 #undef PACKAGE | 30 #undef PACKAGE |
34 | 31 |
35 #define group perl_group | 32 #define group perl_group |
33 | |
36 #ifdef _WIN32 | 34 #ifdef _WIN32 |
37 /* This took me an age to figure out.. without this __declspec(dllimport) | 35 /* This took me an age to figure out.. without this __declspec(dllimport) |
38 * will be ignored. | 36 * will be ignored. |
39 */ | 37 */ |
40 #define HASATTRIBUTE | 38 # define HASATTRIBUTE |
41 #endif | 39 #endif |
40 | |
42 #include <EXTERN.h> | 41 #include <EXTERN.h> |
42 | |
43 #ifndef _SEM_SEMUN_UNDEFINED | 43 #ifndef _SEM_SEMUN_UNDEFINED |
44 #define HAS_UNION_SEMUN | 44 # define HAS_UNION_SEMUN |
45 #endif | 45 #endif |
46 | |
46 #include <perl.h> | 47 #include <perl.h> |
47 #include <XSUB.h> | 48 #include <XSUB.h> |
49 | |
48 #ifndef _WIN32 | 50 #ifndef _WIN32 |
49 #include <sys/mman.h> | 51 # include <sys/mman.h> |
50 #endif | 52 #endif |
51 #include <sys/types.h> | 53 |
52 #include <sys/stat.h> | |
53 #include <fcntl.h> | |
54 #undef PACKAGE | 54 #undef PACKAGE |
55 #include <stdio.h> | 55 |
56 #ifndef _WIN32 | 56 #ifndef _WIN32 |
57 #include <dirent.h> | 57 # include <dirent.h> |
58 #else | 58 #else |
59 /* We're using perl's win32 port of this */ | 59 /* We're using perl's win32 port of this */ |
60 #define dirent direct | 60 # define dirent direct |
61 #endif | 61 #endif |
62 #include <string.h> | |
63 | 62 |
64 #undef group | 63 #undef group |
65 | 64 |
66 /* perl module support */ | 65 /* perl module support */ |
67 #ifdef OLD_PERL | 66 #ifdef OLD_PERL |
70 extern void boot_DynaLoader _((pTHX_ CV * cv)); /* perl is so wacky */ | 69 extern void boot_DynaLoader _((pTHX_ CV * cv)); /* perl is so wacky */ |
71 #endif | 70 #endif |
72 | 71 |
73 #undef _ | 72 #undef _ |
74 #ifdef DEBUG | 73 #ifdef DEBUG |
75 #undef DEBUG | 74 # undef DEBUG |
76 #endif | 75 #endif |
77 #ifdef _WIN32 | 76 #ifdef _WIN32 |
78 #undef pipe | 77 # undef pipe |
79 #endif | 78 #endif |
79 | |
80 #include "internal.h" | |
81 | |
82 #include "debug.h" | |
83 #include "prpl.h" | |
84 #include "notify.h" | |
85 #include "server.h" | |
86 #include "sound.h" | |
87 | |
80 #include "gaim.h" | 88 #include "gaim.h" |
81 #include "prpl.h" | 89 #include "ui.h" |
82 #include "sound.h" | |
83 | 90 |
84 #ifndef call_pv | 91 #ifndef call_pv |
85 # define call_pv(i,j) perl_call_pv((i), (j)) | 92 # define call_pv(i,j) perl_call_pv((i), (j)) |
86 #endif | 93 #endif |
87 | 94 |
1393 NULL, /**< ui_info */ | 1400 NULL, /**< ui_info */ |
1394 &loader_info /**< extra_info */ | 1401 &loader_info /**< extra_info */ |
1395 }; | 1402 }; |
1396 | 1403 |
1397 static void | 1404 static void |
1398 __init_plugin(GaimPlugin *plugin) | 1405 init_plugin(GaimPlugin *plugin) |
1399 { | 1406 { |
1400 my_plugin = plugin; | 1407 my_plugin = plugin; |
1401 | 1408 |
1402 loader_info.exts = g_list_append(loader_info.exts, "pl"); | 1409 loader_info.exts = g_list_append(loader_info.exts, "pl"); |
1403 } | 1410 } |
1404 | 1411 |
1405 GAIM_INIT_PLUGIN(perl, __init_plugin, info); | 1412 GAIM_INIT_PLUGIN(perl, init_plugin, info); |