… | |
… | |
2 | #include "perl.h" |
2 | #include "perl.h" |
3 | #include "XSUB.h" |
3 | #include "XSUB.h" |
4 | |
4 | |
5 | #include <string.h> |
5 | #include <string.h> |
6 | #include <setjmp.h> |
6 | #include <setjmp.h> |
|
|
7 | |
|
|
8 | #include <magic.h> |
7 | |
9 | |
8 | #include <jpeglib.h> |
10 | #include <jpeglib.h> |
9 | #include <glib.h> |
11 | #include <glib.h> |
10 | #include <gtk/gtk.h> |
12 | #include <gtk/gtk.h> |
11 | #include <gdk-pixbuf/gdk-pixbuf.h> |
13 | #include <gdk-pixbuf/gdk-pixbuf.h> |
… | |
… | |
143 | } |
145 | } |
144 | |
146 | |
145 | OUTPUT: |
147 | OUTPUT: |
146 | RETVAL |
148 | RETVAL |
147 | |
149 | |
|
|
150 | const char * |
|
|
151 | magic (const char *path) |
|
|
152 | CODE: |
|
|
153 | { |
|
|
154 | static magic_t cookie; |
|
|
155 | |
|
|
156 | if (!cookie) |
|
|
157 | { |
|
|
158 | cookie = magic_open (MAGIC_MIME); |
|
|
159 | |
|
|
160 | if (cookie) |
|
|
161 | magic_load (cookie, 0); |
|
|
162 | else |
|
|
163 | XSRETURN_UNDEF; |
|
|
164 | } |
|
|
165 | |
|
|
166 | RETVAL = magic_file (cookie, path); |
|
|
167 | } |
|
|
168 | OUTPUT: |
|
|
169 | RETVAL |
|
|
170 | |
148 | # missing in Gtk2 perl module |
171 | # missing in Gtk2 perl module |
149 | |
172 | |
150 | gboolean |
173 | gboolean |
151 | gdk_net_wm_supports (GdkAtom property) |
174 | gdk_net_wm_supports (GdkAtom property) |
152 | CODE: |
175 | CODE: |