/[packages]/cauldron/mplayerplugin/current/SOURCES/mplayerplug-in-3.55-cvs20090908.patch
ViewVC logotype

Contents of /cauldron/mplayerplugin/current/SOURCES/mplayerplug-in-3.55-cvs20090908.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81470 - (show annotations) (download)
Wed Apr 6 17:24:58 2011 UTC (13 years ago) by steletch
File size: 362414 byte(s)
imported package mplayerplugin
1 diff -Naur mplayerplug-in-3.55/CVS/Entries mplayerplug-in.tpg/CVS/Entries
2 --- mplayerplug-in-3.55/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
3 +++ mplayerplug-in.tpg/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
4 @@ -0,0 +1,21 @@
5 +/ChangeLog/1.578/Sun May 3 16:22:40 2009//
6 +/INSTALL/1.11/Thu May 18 17:30:22 2006//
7 +/LICENSE/1.1.1.1/Thu Feb 5 00:34:44 2004//
8 +/Makefile.in/1.41/Mon Dec 8 22:43:02 2008//
9 +/README/1.5/Mon Apr 17 14:18:36 2006//
10 +/TODO/1.6/Mon Jan 24 18:42:16 2005//
11 +/config.h.in/1.12/Thu Jul 20 18:20:42 2006//
12 +/configure/1.88/Tue Dec 9 14:00:54 2008//
13 +/configure.in/1.87/Tue Dec 9 14:00:54 2008//
14 +/dist.sh/1.3/Tue Dec 4 16:50:20 2007//
15 +/dist.sh.in/1.4/Tue Dec 4 16:50:21 2007//
16 +/install.sh/1.37/Fri Apr 3 15:39:47 2009//
17 +/install.sh.in/1.9/Thu Jul 20 20:14:45 2006//
18 +/mplayerplug-in.conf/1.8/Thu Aug 18 00:05:20 2005//
19 +/mplayerplug-in.spec/1.54/Tue Dec 4 16:50:22 2007//
20 +/mplayerplug-in.spec.in/1.4/Tue Dec 4 16:50:23 2007//
21 +/mplayerplug-in.types/1.12/Mon Sep 18 22:01:36 2006//
22 +/uninstall.sh/1.19/Fri Apr 3 15:39:47 2009//
23 +/uninstall.sh.in/1.3/Fri Nov 10 15:08:06 2006//
24 +/whatoptions.sh/1.8/Thu Jan 11 17:36:46 2007//
25 +D
26 diff -Naur mplayerplug-in-3.55/CVS/Entries.Log mplayerplug-in.tpg/CVS/Entries.Log
27 --- mplayerplug-in-3.55/CVS/Entries.Log 1970-01-01 01:00:00.000000000 +0100
28 +++ mplayerplug-in.tpg/CVS/Entries.Log 2009-09-08 23:54:24.000000000 +0200
29 @@ -0,0 +1,10 @@
30 +A D/DOCS////
31 +A D/Source////
32 +A D/common////
33 +A D/debian////
34 +A D/extras////
35 +A D/include////
36 +A D/pixmaps////
37 +A D/plugingate////
38 +A D/po////
39 +A D/specfiles////
40 diff -Naur mplayerplug-in-3.55/CVS/Repository mplayerplug-in.tpg/CVS/Repository
41 --- mplayerplug-in-3.55/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
42 +++ mplayerplug-in.tpg/CVS/Repository 2009-09-08 23:54:23.000000000 +0200
43 @@ -0,0 +1 @@
44 +mplayerplug-in
45 diff -Naur mplayerplug-in-3.55/CVS/Root mplayerplug-in.tpg/CVS/Root
46 --- mplayerplug-in-3.55/CVS/Root 1970-01-01 01:00:00.000000000 +0100
47 +++ mplayerplug-in.tpg/CVS/Root 2009-09-08 23:54:23.000000000 +0200
48 @@ -0,0 +1 @@
49 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
50 diff -Naur mplayerplug-in-3.55/ChangeLog mplayerplug-in.tpg/ChangeLog
51 --- mplayerplug-in-3.55/ChangeLog 2008-06-24 15:15:05.000000000 +0200
52 +++ mplayerplug-in.tpg/ChangeLog 2009-05-03 18:22:40.000000000 +0200
53 @@ -1,3 +1,10 @@
54 +Development
55 + Alternate patch to rmda file references
56 + Fix some compile issues on Fedora 11
57 + Merge in some patches from FreeBSD
58 + Fix a couple of translation issues
59 + Fix Gentoo bug # 233863, minimum cache setting
60 + Add in audio mp4 mime types
61 3.55
62 Take patch from gecko-mediaplayer to compile idl file at compile time
63 Converted one gtk_ call to g_idle_ event may fix crash in thread on some systems
64 diff -Naur mplayerplug-in-3.55/DOCS/CVS/Entries mplayerplug-in.tpg/DOCS/CVS/Entries
65 --- mplayerplug-in-3.55/DOCS/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
66 +++ mplayerplug-in.tpg/DOCS/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
67 @@ -0,0 +1 @@
68 +D
69 diff -Naur mplayerplug-in-3.55/DOCS/CVS/Entries.Log mplayerplug-in.tpg/DOCS/CVS/Entries.Log
70 --- mplayerplug-in-3.55/DOCS/CVS/Entries.Log 1970-01-01 01:00:00.000000000 +0100
71 +++ mplayerplug-in.tpg/DOCS/CVS/Entries.Log 2009-09-08 23:54:24.000000000 +0200
72 @@ -0,0 +1 @@
73 +A D/tech////
74 diff -Naur mplayerplug-in-3.55/DOCS/CVS/Repository mplayerplug-in.tpg/DOCS/CVS/Repository
75 --- mplayerplug-in-3.55/DOCS/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
76 +++ mplayerplug-in.tpg/DOCS/CVS/Repository 2009-09-08 23:54:24.000000000 +0200
77 @@ -0,0 +1 @@
78 +mplayerplug-in/DOCS
79 diff -Naur mplayerplug-in-3.55/DOCS/CVS/Root mplayerplug-in.tpg/DOCS/CVS/Root
80 --- mplayerplug-in-3.55/DOCS/CVS/Root 1970-01-01 01:00:00.000000000 +0100
81 +++ mplayerplug-in.tpg/DOCS/CVS/Root 2009-09-08 23:54:24.000000000 +0200
82 @@ -0,0 +1 @@
83 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
84 diff -Naur mplayerplug-in-3.55/DOCS/tech/CVS/Entries mplayerplug-in.tpg/DOCS/tech/CVS/Entries
85 --- mplayerplug-in-3.55/DOCS/tech/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
86 +++ mplayerplug-in.tpg/DOCS/tech/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
87 @@ -0,0 +1,3 @@
88 +/javascript.txt/1.8/Wed Jan 24 15:31:01 2007//
89 +/locking_rules.txt/1.1/Sat Mar 20 15:57:47 2004//
90 +D
91 diff -Naur mplayerplug-in-3.55/DOCS/tech/CVS/Repository mplayerplug-in.tpg/DOCS/tech/CVS/Repository
92 --- mplayerplug-in-3.55/DOCS/tech/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
93 +++ mplayerplug-in.tpg/DOCS/tech/CVS/Repository 2009-09-08 23:54:24.000000000 +0200
94 @@ -0,0 +1 @@
95 +mplayerplug-in/DOCS/tech
96 diff -Naur mplayerplug-in-3.55/DOCS/tech/CVS/Root mplayerplug-in.tpg/DOCS/tech/CVS/Root
97 --- mplayerplug-in-3.55/DOCS/tech/CVS/Root 1970-01-01 01:00:00.000000000 +0100
98 +++ mplayerplug-in.tpg/DOCS/tech/CVS/Root 2009-09-08 23:54:24.000000000 +0200
99 @@ -0,0 +1 @@
100 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
101 diff -Naur mplayerplug-in-3.55/DOCS/tech/javascript.txt mplayerplug-in.tpg/DOCS/tech/javascript.txt
102 --- mplayerplug-in-3.55/DOCS/tech/javascript.txt 1970-01-01 01:00:00.000000000 +0100
103 +++ mplayerplug-in.tpg/DOCS/tech/javascript.txt 2007-01-24 16:31:01.000000000 +0100
104 @@ -0,0 +1,203 @@
105 +mplayerplug-in supports the following javascript methods, properties and events
106 +
107 +
108 +methods:
109 +
110 + void Play();
111 + void PlayAt(in double value);
112 + void Pause();
113 + void Stop();
114 + void quit();
115 + void DoPlay();
116 + void DoPause();
117 + void FastForward();
118 + void FastReverse();
119 + void ff();
120 + void rew();
121 + void rewind();
122 + void Seek(in double value);
123 + void Open(in string filename);
124 + void SetFileName(in string filename);
125 + double getTime();
126 + double getDuration();
127 + double getPercent();
128 + void SetVolume(in double value);
129 + double GetVolume();
130 +
131 + void controls.play();
132 + void controls.pause();
133 + void controls.stop();
134 +
135 +properties:
136 +
137 + attribute string filename;
138 + readonly attribute long playState;
139 + attribute boolean ShowControls;
140 + attribute boolean fullscreen;
141 + attribute boolean showlogo;
142 + boolean isplaying();
143 +
144 +events:
145 +
146 + onMediaComplete
147 + onMediaCompleteWithError(error)
148 + onEndOfStream
149 + onVisible
150 + onHidden
151 + onDestroy
152 + onClick
153 + onMouseDown(button)
154 + onMouseUp(button)
155 +
156 +Detail:
157 +
158 + Play(), DoPlay(), controls.play()
159 +
160 + plays the current media
161 +
162 + PlayAt(value)
163 + plays the current media, starting at value seconds into the media
164 +
165 + Pause(), DoPause(), controls.pause()
166 +
167 + pauses the playing media
168 +
169 + Stop(), controls.stop()
170 +
171 + stops the playing media
172 + quit()
173 +
174 + cancels the media player triggers onMediaComplete and onEndOfStream events
175 +
176 + FastForward(),ff()
177 +
178 + Seeks forward 10 seconds in the media
179 +
180 + FastReverse(),rew(),rewind()
181 +
182 + Seeks backwards 10 seconds in the media
183 +
184 + Seek(value)
185 +
186 + Seeks "value" seconds into the media
187 +
188 + Open(filename),SetFileName()
189 +
190 + Opens "filename", but does not start it
191 +
192 + getTime()
193 +
194 + Returns the number of seconds into the media
195 +
196 + getDuration()
197 +
198 + Returns the number of seconds the media is long
199 +
200 + getPercent()
201 +
202 + Gets percentage of media played 0 = 0% 100= 100%
203 + Will return 0 for some media types since duration is not always
204 + available from mplayer
205 +
206 + SetVolume(value)
207 + Sets the volume to % value. So setting this to 50 sets the volume to 50% of max
208 +
209 + GetVolume()
210 + Returns the percentage of max volume.
211 +
212 + filename
213 +
214 + Able to get and set this property
215 + x = filename, puts the URL of the current media in x
216 + filename = "x", opens URL x, like Open("x")
217 +
218 + isplaying()
219 +
220 + Returns true if playState > 1 and < 7
221 +
222 + playState
223 +
224 + read only property
225 + Possible return values and meanings
226 +
227 + UNDEFINED 0
228 + STOPPED 1
229 + PAUSED 2
230 + PLAYING 3
231 + SCANFORWARD 4
232 + SCANREVERSE 5
233 + BUFFERING 6
234 + WAITING 7
235 + MEDIAENDED 8
236 + TRANSITIONING 9
237 + READY 10
238 + RECONNECTING 11
239 + INITIALIZING 12
240 +
241 + ShowControls
242 +
243 + Boolean property to make the player controls visible or not
244 +
245 + fullscreen
246 + Boolean property to make the player go fullscreen or not
247 +
248 + showlogo
249 + Boolean property to make the logo visible or not
250 +
251 + onMediaComplete, onEndOfStream
252 +
253 + Events that are triggered when the playlist is empty
254 +
255 + example:
256 +
257 + <embed onEndOfStream='alert("media done");' src="http://host/some/media.mov"></embed>
258 +
259 + onMediaCompleteWithError(error)
260 +
261 + Events that are triggered when the playlist is empty
262 + error is an integer
263 + ERROR_NO_ERROR 0
264 + ERROR_NO_STREAM 1
265 + ERROR_CODEC_FAILURE ERROR_NO_STREAM << 1
266 + ERROR_EXPLICIT_KILL ERROR_NO_STREAM << 2
267 + ERROR_PLAYER_INTERRUPTED ERROR_NO_STREAM << 3
268 + ERROR_EXECV ERROR_NO_STREAM << 4
269 + ERROR_NOT_PLAYLIST ERROR_NO_STREAM << 5
270 + ERROR_FILE_NOT_FOUND ERROR_NO_STREAM << 6
271 +
272 + example:
273 +
274 + <embed onMediaCompleteWithError='error_handler(error)' src="http://host/some/media.mov"></embed>
275 +
276 + onVisible
277 +
278 + Event that is triggered when video media is uncovered by a window, might want to use
279 + with the nopauseonhide embed attribute
280 +
281 + <embed onVisible='someMethod();' nopauseonhide=true src="http://host/some/media.mov"></embed>
282 +
283 + onHidden
284 +
285 + Event that is triggered when video media is covered by a window, might want to use
286 + with the nopauseonhide embed attribute
287 +
288 + <embed onHidden='someMethod();' nopauseonhide=true src="http://host/some/media.mov"></embed>
289 +
290 + onDestroy
291 +
292 + Event that is triggered when the embedded mplayerplug-in is destroyed, best used when mplayerplug-in
293 + is in a frame and the frame is destroyed/hidden.
294 +
295 + onClick
296 +
297 + Event that is triggered when mouse button one is clicked over the plugin.
298 +
299 + onMouseDown(button)
300 +
301 + Event that is triggered when the mouse button is down over the plugin.
302 + button is an integer that is the button that is down
303 +
304 + onMouseUp(button)
305 +
306 + Event that is triggered when the mouse button is released over the plugin.
307 + button is an integer that is the button that is down
308 diff -Naur mplayerplug-in-3.55/DOCS/tech/locking_rules.txt mplayerplug-in.tpg/DOCS/tech/locking_rules.txt
309 --- mplayerplug-in-3.55/DOCS/tech/locking_rules.txt 1970-01-01 01:00:00.000000000 +0100
310 +++ mplayerplug-in.tpg/DOCS/tech/locking_rules.txt 2004-03-20 16:57:47.000000000 +0100
311 @@ -0,0 +1,88 @@
312 +LOCKING RULES AND INVARIANTS:
313 +
314 +invariants:
315 +
316 +meaning of js_state are the following:
317 +
318 +JS_STATE_UNDEFINED means no player thread.
319 +JS_STATE_BUFFERING means thread is waiting on the condition variable.
320 +JS_STATE_INITIALIZING means thread was just started, but did not start
321 + waiting on the condition variable yet.
322 +JS_STATE_TRANSITIONING means player thread is about to close the
323 + connection and accessing control pipe is unsafe
324 + (or control == 0).
325 +JS_STATE_PLAYING etc have the obvious meanings.
326 +
327 +Locking Rules:
328 +
329 +(0) Rule: when player thread is dead (i.e. in shut after the
330 + pthread_join), no locking is needed (and no locking rules apply)..
331 +
332 +(1) Rule: all read or write access to instance->js_state (in all threads) must
333 + be protected by control_mutex.
334 +
335 +(2) Rule: all read and write access to the playlist (i.e. td->list) must
336 + be protected by playlist_mutex.
337 +
338 +(3) Rule: No thread may block with control_mutex held.
339 +
340 +(4) Rule: If one needs to acquire both playlist_mutex and control_mutex,
341 + playlist_mutex must be acquired first. Doing it in the other order
342 + will deadlock.
343 +
344 +(5) Rule: all access to instance->control (from both threads) must be protected
345 + by control_mutex.
346 +
347 +(6) Exception to last rule: when js_state == JS_STATE_TRANSITIONING
348 + player thread does not need locks for instance->control,
349 + but access by main thread is prohibuted.
350 +
351 +
352 +
353 +(7) Rule: In the player thread, any code which looks like
354 +
355 + pthread_mutex_lock(&some_lock);
356 +
357 + .... do stuff ....
358 +
359 + pthread_mutex_unlock(&some_lock);
360 +
361 + where the ... do stuff ... includes a cancellation point,
362 +
363 + must be protected by pthread_cleanup_push(pthread_mutex_unlock, some_lock)
364 + and pthread_cleanup_pop(0)
365 +
366 + Recall that pthread_test_cancel(), pthread_cond_wait() and any
367 + blocking system call/libc function is a cancellation point.
368 +
369 +
370 +
371 +(8) Rule: instance->player is owned by the player thread. The only time
372 + main thread can access it is when the player thread is already
373 + dead (e.g. in shut after the pthread_join).
374 +
375 +
376 +(9) Corollary to above rules:
377 + All calls to sendCommand have to protected by control_mutex. Also
378 + in player thread, calls to sendCommand have to be
379 + protected by cleanup_push/cleanup_pop as well.
380 +
381 +(10) Rule: Player thread may be started if there isn't one currently
382 + (i.e. js_state == JS_STATE_UNDEFINED). To start player thread, must do:
383 +
384 + pthread_lock(&control_mutex);
385 + pthread_create(....)
386 + js_state = JS_STATE_INITIALIZING;
387 + pthread_unlock(&control_mutex);
388 +
389 +(11) Rule: to signal player thread, must use the signalPlayerThread()
390 + function.
391 +
392 +(12) Rule: to kill player thread, must do:
393 +
394 + pthread_cancel(&player_thread);
395 + pthread_join(&player_thread);
396 + js_state = JS_STATE_UNDEFINED;
397 +
398 +
399 +
400 diff -Naur mplayerplug-in-3.55/LICENSE mplayerplug-in.tpg/LICENSE
401 --- mplayerplug-in-3.55/LICENSE 1970-01-01 01:00:00.000000000 +0100
402 +++ mplayerplug-in.tpg/LICENSE 2004-02-05 01:34:44.000000000 +0100
403 @@ -0,0 +1,340 @@
404 + GNU GENERAL PUBLIC LICENSE
405 + Version 2, June 1991
406 +
407 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
408 + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
409 + Everyone is permitted to copy and distribute verbatim copies
410 + of this license document, but changing it is not allowed.
411 +
412 + Preamble
413 +
414 + The licenses for most software are designed to take away your
415 +freedom to share and change it. By contrast, the GNU General Public
416 +License is intended to guarantee your freedom to share and change free
417 +software--to make sure the software is free for all its users. This
418 +General Public License applies to most of the Free Software
419 +Foundation's software and to any other program whose authors commit to
420 +using it. (Some other Free Software Foundation software is covered by
421 +the GNU Library General Public License instead.) You can apply it to
422 +your programs, too.
423 +
424 + When we speak of free software, we are referring to freedom, not
425 +price. Our General Public Licenses are designed to make sure that you
426 +have the freedom to distribute copies of free software (and charge for
427 +this service if you wish), that you receive source code or can get it
428 +if you want it, that you can change the software or use pieces of it
429 +in new free programs; and that you know you can do these things.
430 +
431 + To protect your rights, we need to make restrictions that forbid
432 +anyone to deny you these rights or to ask you to surrender the rights.
433 +These restrictions translate to certain responsibilities for you if you
434 +distribute copies of the software, or if you modify it.
435 +
436 + For example, if you distribute copies of such a program, whether
437 +gratis or for a fee, you must give the recipients all the rights that
438 +you have. You must make sure that they, too, receive or can get the
439 +source code. And you must show them these terms so they know their
440 +rights.
441 +
442 + We protect your rights with two steps: (1) copyright the software, and
443 +(2) offer you this license which gives you legal permission to copy,
444 +distribute and/or modify the software.
445 +
446 + Also, for each author's protection and ours, we want to make certain
447 +that everyone understands that there is no warranty for this free
448 +software. If the software is modified by someone else and passed on, we
449 +want its recipients to know that what they have is not the original, so
450 +that any problems introduced by others will not reflect on the original
451 +authors' reputations.
452 +
453 + Finally, any free program is threatened constantly by software
454 +patents. We wish to avoid the danger that redistributors of a free
455 +program will individually obtain patent licenses, in effect making the
456 +program proprietary. To prevent this, we have made it clear that any
457 +patent must be licensed for everyone's free use or not licensed at all.
458 +
459 + The precise terms and conditions for copying, distribution and
460 +modification follow.
461 +
462 + GNU GENERAL PUBLIC LICENSE
463 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
464 +
465 + 0. This License applies to any program or other work which contains
466 +a notice placed by the copyright holder saying it may be distributed
467 +under the terms of this General Public License. The "Program", below,
468 +refers to any such program or work, and a "work based on the Program"
469 +means either the Program or any derivative work under copyright law:
470 +that is to say, a work containing the Program or a portion of it,
471 +either verbatim or with modifications and/or translated into another
472 +language. (Hereinafter, translation is included without limitation in
473 +the term "modification".) Each licensee is addressed as "you".
474 +
475 +Activities other than copying, distribution and modification are not
476 +covered by this License; they are outside its scope. The act of
477 +running the Program is not restricted, and the output from the Program
478 +is covered only if its contents constitute a work based on the
479 +Program (independent of having been made by running the Program).
480 +Whether that is true depends on what the Program does.
481 +
482 + 1. You may copy and distribute verbatim copies of the Program's
483 +source code as you receive it, in any medium, provided that you
484 +conspicuously and appropriately publish on each copy an appropriate
485 +copyright notice and disclaimer of warranty; keep intact all the
486 +notices that refer to this License and to the absence of any warranty;
487 +and give any other recipients of the Program a copy of this License
488 +along with the Program.
489 +
490 +You may charge a fee for the physical act of transferring a copy, and
491 +you may at your option offer warranty protection in exchange for a fee.
492 +
493 + 2. You may modify your copy or copies of the Program or any portion
494 +of it, thus forming a work based on the Program, and copy and
495 +distribute such modifications or work under the terms of Section 1
496 +above, provided that you also meet all of these conditions:
497 +
498 + a) You must cause the modified files to carry prominent notices
499 + stating that you changed the files and the date of any change.
500 +
501 + b) You must cause any work that you distribute or publish, that in
502 + whole or in part contains or is derived from the Program or any
503 + part thereof, to be licensed as a whole at no charge to all third
504 + parties under the terms of this License.
505 +
506 + c) If the modified program normally reads commands interactively
507 + when run, you must cause it, when started running for such
508 + interactive use in the most ordinary way, to print or display an
509 + announcement including an appropriate copyright notice and a
510 + notice that there is no warranty (or else, saying that you provide
511 + a warranty) and that users may redistribute the program under
512 + these conditions, and telling the user how to view a copy of this
513 + License. (Exception: if the Program itself is interactive but
514 + does not normally print such an announcement, your work based on
515 + the Program is not required to print an announcement.)
516 +
517 +These requirements apply to the modified work as a whole. If
518 +identifiable sections of that work are not derived from the Program,
519 +and can be reasonably considered independent and separate works in
520 +themselves, then this License, and its terms, do not apply to those
521 +sections when you distribute them as separate works. But when you
522 +distribute the same sections as part of a whole which is a work based
523 +on the Program, the distribution of the whole must be on the terms of
524 +this License, whose permissions for other licensees extend to the
525 +entire whole, and thus to each and every part regardless of who wrote it.
526 +
527 +Thus, it is not the intent of this section to claim rights or contest
528 +your rights to work written entirely by you; rather, the intent is to
529 +exercise the right to control the distribution of derivative or
530 +collective works based on the Program.
531 +
532 +In addition, mere aggregation of another work not based on the Program
533 +with the Program (or with a work based on the Program) on a volume of
534 +a storage or distribution medium does not bring the other work under
535 +the scope of this License.
536 +
537 + 3. You may copy and distribute the Program (or a work based on it,
538 +under Section 2) in object code or executable form under the terms of
539 +Sections 1 and 2 above provided that you also do one of the following:
540 +
541 + a) Accompany it with the complete corresponding machine-readable
542 + source code, which must be distributed under the terms of Sections
543 + 1 and 2 above on a medium customarily used for software interchange; or,
544 +
545 + b) Accompany it with a written offer, valid for at least three
546 + years, to give any third party, for a charge no more than your
547 + cost of physically performing source distribution, a complete
548 + machine-readable copy of the corresponding source code, to be
549 + distributed under the terms of Sections 1 and 2 above on a medium
550 + customarily used for software interchange; or,
551 +
552 + c) Accompany it with the information you received as to the offer
553 + to distribute corresponding source code. (This alternative is
554 + allowed only for noncommercial distribution and only if you
555 + received the program in object code or executable form with such
556 + an offer, in accord with Subsection b above.)
557 +
558 +The source code for a work means the preferred form of the work for
559 +making modifications to it. For an executable work, complete source
560 +code means all the source code for all modules it contains, plus any
561 +associated interface definition files, plus the scripts used to
562 +control compilation and installation of the executable. However, as a
563 +special exception, the source code distributed need not include
564 +anything that is normally distributed (in either source or binary
565 +form) with the major components (compiler, kernel, and so on) of the
566 +operating system on which the executable runs, unless that component
567 +itself accompanies the executable.
568 +
569 +If distribution of executable or object code is made by offering
570 +access to copy from a designated place, then offering equivalent
571 +access to copy the source code from the same place counts as
572 +distribution of the source code, even though third parties are not
573 +compelled to copy the source along with the object code.
574 +
575 + 4. You may not copy, modify, sublicense, or distribute the Program
576 +except as expressly provided under this License. Any attempt
577 +otherwise to copy, modify, sublicense or distribute the Program is
578 +void, and will automatically terminate your rights under this License.
579 +However, parties who have received copies, or rights, from you under
580 +this License will not have their licenses terminated so long as such
581 +parties remain in full compliance.
582 +
583 + 5. You are not required to accept this License, since you have not
584 +signed it. However, nothing else grants you permission to modify or
585 +distribute the Program or its derivative works. These actions are
586 +prohibited by law if you do not accept this License. Therefore, by
587 +modifying or distributing the Program (or any work based on the
588 +Program), you indicate your acceptance of this License to do so, and
589 +all its terms and conditions for copying, distributing or modifying
590 +the Program or works based on it.
591 +
592 + 6. Each time you redistribute the Program (or any work based on the
593 +Program), the recipient automatically receives a license from the
594 +original licensor to copy, distribute or modify the Program subject to
595 +these terms and conditions. You may not impose any further
596 +restrictions on the recipients' exercise of the rights granted herein.
597 +You are not responsible for enforcing compliance by third parties to
598 +this License.
599 +
600 + 7. If, as a consequence of a court judgment or allegation of patent
601 +infringement or for any other reason (not limited to patent issues),
602 +conditions are imposed on you (whether by court order, agreement or
603 +otherwise) that contradict the conditions of this License, they do not
604 +excuse you from the conditions of this License. If you cannot
605 +distribute so as to satisfy simultaneously your obligations under this
606 +License and any other pertinent obligations, then as a consequence you
607 +may not distribute the Program at all. For example, if a patent
608 +license would not permit royalty-free redistribution of the Program by
609 +all those who receive copies directly or indirectly through you, then
610 +the only way you could satisfy both it and this License would be to
611 +refrain entirely from distribution of the Program.
612 +
613 +If any portion of this section is held invalid or unenforceable under
614 +any particular circumstance, the balance of the section is intended to
615 +apply and the section as a whole is intended to apply in other
616 +circumstances.
617 +
618 +It is not the purpose of this section to induce you to infringe any
619 +patents or other property right claims or to contest validity of any
620 +such claims; this section has the sole purpose of protecting the
621 +integrity of the free software distribution system, which is
622 +implemented by public license practices. Many people have made
623 +generous contributions to the wide range of software distributed
624 +through that system in reliance on consistent application of that
625 +system; it is up to the author/donor to decide if he or she is willing
626 +to distribute software through any other system and a licensee cannot
627 +impose that choice.
628 +
629 +This section is intended to make thoroughly clear what is believed to
630 +be a consequence of the rest of this License.
631 +
632 + 8. If the distribution and/or use of the Program is restricted in
633 +certain countries either by patents or by copyrighted interfaces, the
634 +original copyright holder who places the Program under this License
635 +may add an explicit geographical distribution limitation excluding
636 +those countries, so that distribution is permitted only in or among
637 +countries not thus excluded. In such case, this License incorporates
638 +the limitation as if written in the body of this License.
639 +
640 + 9. The Free Software Foundation may publish revised and/or new versions
641 +of the General Public License from time to time. Such new versions will
642 +be similar in spirit to the present version, but may differ in detail to
643 +address new problems or concerns.
644 +
645 +Each version is given a distinguishing version number. If the Program
646 +specifies a version number of this License which applies to it and "any
647 +later version", you have the option of following the terms and conditions
648 +either of that version or of any later version published by the Free
649 +Software Foundation. If the Program does not specify a version number of
650 +this License, you may choose any version ever published by the Free Software
651 +Foundation.
652 +
653 + 10. If you wish to incorporate parts of the Program into other free
654 +programs whose distribution conditions are different, write to the author
655 +to ask for permission. For software which is copyrighted by the Free
656 +Software Foundation, write to the Free Software Foundation; we sometimes
657 +make exceptions for this. Our decision will be guided by the two goals
658 +of preserving the free status of all derivatives of our free software and
659 +of promoting the sharing and reuse of software generally.
660 +
661 + NO WARRANTY
662 +
663 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
664 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
665 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
666 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
667 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
668 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
669 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
670 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
671 +REPAIR OR CORRECTION.
672 +
673 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
674 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
675 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
676 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
677 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
678 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
679 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
680 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
681 +POSSIBILITY OF SUCH DAMAGES.
682 +
683 + END OF TERMS AND CONDITIONS
684 +
685 + How to Apply These Terms to Your New Programs
686 +
687 + If you develop a new program, and you want it to be of the greatest
688 +possible use to the public, the best way to achieve this is to make it
689 +free software which everyone can redistribute and change under these terms.
690 +
691 + To do so, attach the following notices to the program. It is safest
692 +to attach them to the start of each source file to most effectively
693 +convey the exclusion of warranty; and each file should have at least
694 +the "copyright" line and a pointer to where the full notice is found.
695 +
696 + <one line to give the program's name and a brief idea of what it does.>
697 + Copyright (C) <year> <name of author>
698 +
699 + This program is free software; you can redistribute it and/or modify
700 + it under the terms of the GNU General Public License as published by
701 + the Free Software Foundation; either version 2 of the License, or
702 + (at your option) any later version.
703 +
704 + This program is distributed in the hope that it will be useful,
705 + but WITHOUT ANY WARRANTY; without even the implied warranty of
706 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
707 + GNU General Public License for more details.
708 +
709 + You should have received a copy of the GNU General Public License
710 + along with this program; if not, write to the Free Software
711 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
712 +
713 +
714 +Also add information on how to contact you by electronic and paper mail.
715 +
716 +If the program is interactive, make it output a short notice like this
717 +when it starts in an interactive mode:
718 +
719 + Gnomovision version 69, Copyright (C) year name of author
720 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
721 + This is free software, and you are welcome to redistribute it
722 + under certain conditions; type `show c' for details.
723 +
724 +The hypothetical commands `show w' and `show c' should show the appropriate
725 +parts of the General Public License. Of course, the commands you use may
726 +be called something other than `show w' and `show c'; they could even be
727 +mouse-clicks or menu items--whatever suits your program.
728 +
729 +You should also get your employer (if you work as a programmer) or your
730 +school, if any, to sign a "copyright disclaimer" for the program, if
731 +necessary. Here is a sample; alter the names:
732 +
733 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
734 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
735 +
736 + <signature of Ty Coon>, 1 April 1989
737 + Ty Coon, President of Vice
738 +
739 +This General Public License does not permit incorporating your program into
740 +proprietary programs. If your program is a subroutine library, you may
741 +consider it more useful to permit linking proprietary applications with the
742 +library. If this is what you want to do, use the GNU Library General
743 +Public License instead of this License.
744 diff -Naur mplayerplug-in-3.55/Makefile.in mplayerplug-in.tpg/Makefile.in
745 --- mplayerplug-in-3.55/Makefile.in 2008-01-03 01:20:33.000000000 +0100
746 +++ mplayerplug-in.tpg/Makefile.in 2008-12-08 23:43:02.000000000 +0100
747 @@ -147,7 +147,7 @@
748 cd po; $(MAKE) clean
749
750 distclean: clean
751 - $(RM) install.sh uninstall.sh po/Makefile
752 + $(RM) po/Makefile
753 $(RM) config.log config.status config.h Makefile
754
755 install: all
756 diff -Naur mplayerplug-in-3.55/Source/CVS/Entries mplayerplug-in.tpg/Source/CVS/Entries
757 --- mplayerplug-in-3.55/Source/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
758 +++ mplayerplug-in.tpg/Source/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
759 @@ -0,0 +1,14 @@
760 +/nsIScriptableMplayerPlugin.h/1.24/Fri Apr 3 15:39:47 2009//
761 +/nsIScriptableMplayerPlugin.idl/1.20/Wed Oct 24 13:34:43 2007//
762 +/nsIScriptableMplayerPlugin.xpt/1.21/Fri Apr 3 15:39:48 2009//
763 +/nsScriptablePeer.cpp/1.35/Thu Dec 6 18:48:57 2007//
764 +/nsScriptablePeer.h/1.22/Wed Dec 5 21:09:32 2007//
765 +/plugin-list.cpp/1.80/Sun May 3 16:22:40 2009//
766 +/plugin-setup.cpp/1.148/Sat Jul 12 21:15:28 2008//
767 +/plugin-setup.h/1.69/Thu Jun 12 14:21:14 2008//
768 +/plugin-support.cpp/1.109/Fri Apr 3 15:39:48 2009//
769 +/plugin-threads.cpp/1.281/Tue Feb 17 14:19:53 2009//
770 +/plugin-ui.cpp/1.257/Mon May 4 00:03:19 2009//
771 +/plugin.cpp/1.344/Mon Dec 3 17:34:08 2007//
772 +/plugin.h/1.113/Fri Dec 7 02:44:00 2007//
773 +D
774 diff -Naur mplayerplug-in-3.55/Source/CVS/Repository mplayerplug-in.tpg/Source/CVS/Repository
775 --- mplayerplug-in-3.55/Source/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
776 +++ mplayerplug-in.tpg/Source/CVS/Repository 2009-09-08 23:54:24.000000000 +0200
777 @@ -0,0 +1 @@
778 +mplayerplug-in/Source
779 diff -Naur mplayerplug-in-3.55/Source/CVS/Root mplayerplug-in.tpg/Source/CVS/Root
780 --- mplayerplug-in-3.55/Source/CVS/Root 1970-01-01 01:00:00.000000000 +0100
781 +++ mplayerplug-in.tpg/Source/CVS/Root 2009-09-08 23:54:24.000000000 +0200
782 @@ -0,0 +1 @@
783 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
784 diff -Naur mplayerplug-in-3.55/Source/nsIScriptableMplayerPlugin.h mplayerplug-in.tpg/Source/nsIScriptableMplayerPlugin.h
785 --- mplayerplug-in-3.55/Source/nsIScriptableMplayerPlugin.h 2008-06-24 15:12:54.000000000 +0200
786 +++ mplayerplug-in.tpg/Source/nsIScriptableMplayerPlugin.h 2009-04-03 17:39:47.000000000 +0200
787 @@ -22,39 +22,41 @@
788 {0xf728830e, 0x1dd1, 0x4444, \
789 { 0x66, 0x66, 0xfb, 0x9f, 0x41, 0x4f, 0x24, 0x65 }}
790
791 -class NS_NO_VTABLE nsIScriptableWMPPlugin : public nsISupports {
792 +class NS_NO_VTABLE NS_SCRIPTABLE nsIScriptableWMPPlugin : public nsISupports {
793 public:
794
795 - NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEWMPPLUGIN_IID)
796 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEWMPPLUGIN_IID)
797
798 /* void play (); */
799 - NS_IMETHOD Play(void) = 0;
800 + NS_SCRIPTABLE NS_IMETHOD Play(void) = 0;
801
802 /* void pause (); */
803 - NS_IMETHOD Pause(void) = 0;
804 + NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
805
806 /* void stop (); */
807 - NS_IMETHOD Stop(void) = 0;
808 + NS_SCRIPTABLE NS_IMETHOD Stop(void) = 0;
809
810 };
811
812 + NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptableWMPPlugin, NS_ISCRIPTABLEWMPPLUGIN_IID)
813 +
814 /* Use this macro when declaring classes that implement this interface. */
815 #define NS_DECL_NSISCRIPTABLEWMPPLUGIN \
816 - NS_IMETHOD Play(void); \
817 - NS_IMETHOD Pause(void); \
818 - NS_IMETHOD Stop(void);
819 + NS_SCRIPTABLE NS_IMETHOD Play(void); \
820 + NS_SCRIPTABLE NS_IMETHOD Pause(void); \
821 + NS_SCRIPTABLE NS_IMETHOD Stop(void);
822
823 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
824 #define NS_FORWARD_NSISCRIPTABLEWMPPLUGIN(_to) \
825 - NS_IMETHOD Play(void) { return _to Play(); } \
826 - NS_IMETHOD Pause(void) { return _to Pause(); } \
827 - NS_IMETHOD Stop(void) { return _to Stop(); }
828 + NS_SCRIPTABLE NS_IMETHOD Play(void) { return _to Play(); } \
829 + NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
830 + NS_SCRIPTABLE NS_IMETHOD Stop(void) { return _to Stop(); }
831
832 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
833 #define NS_FORWARD_SAFE_NSISCRIPTABLEWMPPLUGIN(_to) \
834 - NS_IMETHOD Play(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(); } \
835 - NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
836 - NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); }
837 + NS_SCRIPTABLE NS_IMETHOD Play(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(); } \
838 + NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
839 + NS_SCRIPTABLE NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); }
840
841 #if 0
842 /* Use the code below as a template for the implementation class for this interface. */
843 @@ -117,281 +119,283 @@
844 {0xf728830f, 0x1dd1, 0x4444, \
845 { 0x66, 0x66, 0xfb, 0x9f, 0x41, 0x4f, 0x24, 0x65 }}
846
847 -class NS_NO_VTABLE nsIScriptableMplayerPlugin : public nsISupports {
848 +class NS_NO_VTABLE NS_SCRIPTABLE nsIScriptableMplayerPlugin : public nsISupports {
849 public:
850
851 - NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEMPLAYERPLUGIN_IID)
852 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEMPLAYERPLUGIN_IID)
853
854 /* void Play (); */
855 - NS_IMETHOD Play(void) = 0;
856 + NS_SCRIPTABLE NS_IMETHOD Play(void) = 0;
857
858 /* void PlayAt (in double value); */
859 - NS_IMETHOD PlayAt(double value) = 0;
860 + NS_SCRIPTABLE NS_IMETHOD PlayAt(double value) = 0;
861
862 /* void Pause (); */
863 - NS_IMETHOD Pause(void) = 0;
864 + NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
865
866 /* void Stop (); */
867 - NS_IMETHOD Stop(void) = 0;
868 + NS_SCRIPTABLE NS_IMETHOD Stop(void) = 0;
869
870 /* void quit (); */
871 - NS_IMETHOD Quit(void) = 0;
872 + NS_SCRIPTABLE NS_IMETHOD Quit(void) = 0;
873
874 /* void DoPlay (); */
875 - NS_IMETHOD DoPlay(void) = 0;
876 + NS_SCRIPTABLE NS_IMETHOD DoPlay(void) = 0;
877
878 /* void DoPause (); */
879 - NS_IMETHOD DoPause(void) = 0;
880 + NS_SCRIPTABLE NS_IMETHOD DoPause(void) = 0;
881
882 /* void FastForward (); */
883 - NS_IMETHOD FastForward(void) = 0;
884 + NS_SCRIPTABLE NS_IMETHOD FastForward(void) = 0;
885
886 /* void FastReverse (); */
887 - NS_IMETHOD FastReverse(void) = 0;
888 + NS_SCRIPTABLE NS_IMETHOD FastReverse(void) = 0;
889
890 /* void ff (); */
891 - NS_IMETHOD Ff(void) = 0;
892 + NS_SCRIPTABLE NS_IMETHOD Ff(void) = 0;
893
894 /* void rew (); */
895 - NS_IMETHOD Rew(void) = 0;
896 + NS_SCRIPTABLE NS_IMETHOD Rew(void) = 0;
897
898 /* void rewind (); */
899 - NS_IMETHOD Rewind(void) = 0;
900 + NS_SCRIPTABLE NS_IMETHOD Rewind(void) = 0;
901
902 /* void Seek (in double value); */
903 - NS_IMETHOD Seek(double value) = 0;
904 + NS_SCRIPTABLE NS_IMETHOD Seek(double value) = 0;
905
906 /* void Open (in string filename); */
907 - NS_IMETHOD Open(const char *filename) = 0;
908 + NS_SCRIPTABLE NS_IMETHOD Open(const char *filename) = 0;
909
910 /* void SetVolume (in double value); */
911 - NS_IMETHOD SetVolume(double value) = 0;
912 + NS_SCRIPTABLE NS_IMETHOD SetVolume(double value) = 0;
913
914 /* double GetVolume (); */
915 - NS_IMETHOD GetVolume(double *_retval) = 0;
916 + NS_SCRIPTABLE NS_IMETHOD GetVolume(double *_retval NS_OUTPARAM) = 0;
917
918 /* void SetFileName (in string filename); */
919 - NS_IMETHOD SetFileName(const char *filename) = 0;
920 + NS_SCRIPTABLE NS_IMETHOD SetFileName(const char *filename) = 0;
921
922 /* void SetIsLooping (in boolean loop); */
923 - NS_IMETHOD SetIsLooping(PRBool loop) = 0;
924 + NS_SCRIPTABLE NS_IMETHOD SetIsLooping(PRBool loop) = 0;
925
926 /* boolean GetIsLooping (); */
927 - NS_IMETHOD GetIsLooping(PRBool *_retval) = 0;
928 + NS_SCRIPTABLE NS_IMETHOD GetIsLooping(PRBool *_retval NS_OUTPARAM) = 0;
929
930 /* void SetAutoPlay (in boolean autoPlay); */
931 - NS_IMETHOD SetAutoPlay(PRBool autoPlay) = 0;
932 + NS_SCRIPTABLE NS_IMETHOD SetAutoPlay(PRBool autoPlay) = 0;
933
934 /* boolean GetAutoPlay (); */
935 - NS_IMETHOD GetAutoPlay(PRBool *_retval) = 0;
936 + NS_SCRIPTABLE NS_IMETHOD GetAutoPlay(PRBool *_retval NS_OUTPARAM) = 0;
937
938 /* void SetHREF (in string url); */
939 - NS_IMETHOD SetHREF(const char *url) = 0;
940 + NS_SCRIPTABLE NS_IMETHOD SetHREF(const char *url) = 0;
941
942 /* string GetHREF (); */
943 - NS_IMETHOD GetHREF(char **_retval) = 0;
944 + NS_SCRIPTABLE NS_IMETHOD GetHREF(char **_retval NS_OUTPARAM) = 0;
945
946 /* void SetURL (in string url); */
947 - NS_IMETHOD SetURL(const char *url) = 0;
948 + NS_SCRIPTABLE NS_IMETHOD SetURL(const char *url) = 0;
949
950 /* string GetURL (); */
951 - NS_IMETHOD GetURL(char **_retval) = 0;
952 + NS_SCRIPTABLE NS_IMETHOD GetURL(char **_retval NS_OUTPARAM) = 0;
953
954 /* string GetMIMEType (); */
955 - NS_IMETHOD GetMIMEType(char **_retval) = 0;
956 + NS_SCRIPTABLE NS_IMETHOD GetMIMEType(char **_retval NS_OUTPARAM) = 0;
957
958 /* double getTime (); */
959 - NS_IMETHOD GetTime(double *_retval) = 0;
960 + NS_SCRIPTABLE NS_IMETHOD GetTime(double *_retval NS_OUTPARAM) = 0;
961
962 /* double getDuration (); */
963 - NS_IMETHOD GetDuration(double *_retval) = 0;
964 + NS_SCRIPTABLE NS_IMETHOD GetDuration(double *_retval NS_OUTPARAM) = 0;
965
966 /* double getPercent (); */
967 - NS_IMETHOD GetPercent(double *_retval) = 0;
968 + NS_SCRIPTABLE NS_IMETHOD GetPercent(double *_retval NS_OUTPARAM) = 0;
969
970 /* boolean isplaying (); */
971 - NS_IMETHOD Isplaying(PRBool *_retval) = 0;
972 + NS_SCRIPTABLE NS_IMETHOD Isplaying(PRBool *_retval NS_OUTPARAM) = 0;
973
974 /* void playlistAppend (in string item); */
975 - NS_IMETHOD PlaylistAppend(const char *item) = 0;
976 + NS_SCRIPTABLE NS_IMETHOD PlaylistAppend(const char *item) = 0;
977
978 /* boolean playlistClear (); */
979 - NS_IMETHOD PlaylistClear(PRBool *_retval) = 0;
980 + NS_SCRIPTABLE NS_IMETHOD PlaylistClear(PRBool *_retval NS_OUTPARAM) = 0;
981
982 /* attribute string filename; */
983 - NS_IMETHOD GetFilename(char * *aFilename) = 0;
984 - NS_IMETHOD SetFilename(const char * aFilename) = 0;
985 + NS_SCRIPTABLE NS_IMETHOD GetFilename(char * *aFilename) = 0;
986 + NS_SCRIPTABLE NS_IMETHOD SetFilename(const char * aFilename) = 0;
987
988 /* attribute string src; */
989 - NS_IMETHOD GetSrc(char * *aSrc) = 0;
990 - NS_IMETHOD SetSrc(const char * aSrc) = 0;
991 + NS_SCRIPTABLE NS_IMETHOD GetSrc(char * *aSrc) = 0;
992 + NS_SCRIPTABLE NS_IMETHOD SetSrc(const char * aSrc) = 0;
993
994 /* attribute boolean ShowControls; */
995 - NS_IMETHOD GetShowControls(PRBool *aShowControls) = 0;
996 - NS_IMETHOD SetShowControls(PRBool aShowControls) = 0;
997 + NS_SCRIPTABLE NS_IMETHOD GetShowControls(PRBool *aShowControls) = 0;
998 + NS_SCRIPTABLE NS_IMETHOD SetShowControls(PRBool aShowControls) = 0;
999
1000 /* attribute boolean fullscreen; */
1001 - NS_IMETHOD GetFullscreen(PRBool *aFullscreen) = 0;
1002 - NS_IMETHOD SetFullscreen(PRBool aFullscreen) = 0;
1003 + NS_SCRIPTABLE NS_IMETHOD GetFullscreen(PRBool *aFullscreen) = 0;
1004 + NS_SCRIPTABLE NS_IMETHOD SetFullscreen(PRBool aFullscreen) = 0;
1005
1006 /* attribute boolean showlogo; */
1007 - NS_IMETHOD GetShowlogo(PRBool *aShowlogo) = 0;
1008 - NS_IMETHOD SetShowlogo(PRBool aShowlogo) = 0;
1009 + NS_SCRIPTABLE NS_IMETHOD GetShowlogo(PRBool *aShowlogo) = 0;
1010 + NS_SCRIPTABLE NS_IMETHOD SetShowlogo(PRBool aShowlogo) = 0;
1011
1012 /* readonly attribute long playState; */
1013 - NS_IMETHOD GetPlayState(PRInt32 *aPlayState) = 0;
1014 + NS_SCRIPTABLE NS_IMETHOD GetPlayState(PRInt32 *aPlayState) = 0;
1015
1016 /* readonly attribute nsIScriptableWMPPlugin controls; */
1017 - NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) = 0;
1018 + NS_SCRIPTABLE NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) = 0;
1019
1020 /* void onClick (in string event); */
1021 - NS_IMETHOD OnClick(const char *event) = 0;
1022 + NS_SCRIPTABLE NS_IMETHOD OnClick(const char *event) = 0;
1023
1024 };
1025
1026 + NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptableMplayerPlugin, NS_ISCRIPTABLEMPLAYERPLUGIN_IID)
1027 +
1028 /* Use this macro when declaring classes that implement this interface. */
1029 #define NS_DECL_NSISCRIPTABLEMPLAYERPLUGIN \
1030 - NS_IMETHOD Play(void); \
1031 - NS_IMETHOD PlayAt(double value); \
1032 - NS_IMETHOD Pause(void); \
1033 - NS_IMETHOD Stop(void); \
1034 - NS_IMETHOD Quit(void); \
1035 - NS_IMETHOD DoPlay(void); \
1036 - NS_IMETHOD DoPause(void); \
1037 - NS_IMETHOD FastForward(void); \
1038 - NS_IMETHOD FastReverse(void); \
1039 - NS_IMETHOD Ff(void); \
1040 - NS_IMETHOD Rew(void); \
1041 - NS_IMETHOD Rewind(void); \
1042 - NS_IMETHOD Seek(double value); \
1043 - NS_IMETHOD Open(const char *filename); \
1044 - NS_IMETHOD SetVolume(double value); \
1045 - NS_IMETHOD GetVolume(double *_retval); \
1046 - NS_IMETHOD SetFileName(const char *filename); \
1047 - NS_IMETHOD SetIsLooping(PRBool loop); \
1048 - NS_IMETHOD GetIsLooping(PRBool *_retval); \
1049 - NS_IMETHOD SetAutoPlay(PRBool autoPlay); \
1050 - NS_IMETHOD GetAutoPlay(PRBool *_retval); \
1051 - NS_IMETHOD SetHREF(const char *url); \
1052 - NS_IMETHOD GetHREF(char **_retval); \
1053 - NS_IMETHOD SetURL(const char *url); \
1054 - NS_IMETHOD GetURL(char **_retval); \
1055 - NS_IMETHOD GetMIMEType(char **_retval); \
1056 - NS_IMETHOD GetTime(double *_retval); \
1057 - NS_IMETHOD GetDuration(double *_retval); \
1058 - NS_IMETHOD GetPercent(double *_retval); \
1059 - NS_IMETHOD Isplaying(PRBool *_retval); \
1060 - NS_IMETHOD PlaylistAppend(const char *item); \
1061 - NS_IMETHOD PlaylistClear(PRBool *_retval); \
1062 - NS_IMETHOD GetFilename(char * *aFilename); \
1063 - NS_IMETHOD SetFilename(const char * aFilename); \
1064 - NS_IMETHOD GetSrc(char * *aSrc); \
1065 - NS_IMETHOD SetSrc(const char * aSrc); \
1066 - NS_IMETHOD GetShowControls(PRBool *aShowControls); \
1067 - NS_IMETHOD SetShowControls(PRBool aShowControls); \
1068 - NS_IMETHOD GetFullscreen(PRBool *aFullscreen); \
1069 - NS_IMETHOD SetFullscreen(PRBool aFullscreen); \
1070 - NS_IMETHOD GetShowlogo(PRBool *aShowlogo); \
1071 - NS_IMETHOD SetShowlogo(PRBool aShowlogo); \
1072 - NS_IMETHOD GetPlayState(PRInt32 *aPlayState); \
1073 - NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls); \
1074 - NS_IMETHOD OnClick(const char *event);
1075 + NS_SCRIPTABLE NS_IMETHOD Play(void); \
1076 + NS_SCRIPTABLE NS_IMETHOD PlayAt(double value); \
1077 + NS_SCRIPTABLE NS_IMETHOD Pause(void); \
1078 + NS_SCRIPTABLE NS_IMETHOD Stop(void); \
1079 + NS_SCRIPTABLE NS_IMETHOD Quit(void); \
1080 + NS_SCRIPTABLE NS_IMETHOD DoPlay(void); \
1081 + NS_SCRIPTABLE NS_IMETHOD DoPause(void); \
1082 + NS_SCRIPTABLE NS_IMETHOD FastForward(void); \
1083 + NS_SCRIPTABLE NS_IMETHOD FastReverse(void); \
1084 + NS_SCRIPTABLE NS_IMETHOD Ff(void); \
1085 + NS_SCRIPTABLE NS_IMETHOD Rew(void); \
1086 + NS_SCRIPTABLE NS_IMETHOD Rewind(void); \
1087 + NS_SCRIPTABLE NS_IMETHOD Seek(double value); \
1088 + NS_SCRIPTABLE NS_IMETHOD Open(const char *filename); \
1089 + NS_SCRIPTABLE NS_IMETHOD SetVolume(double value); \
1090 + NS_SCRIPTABLE NS_IMETHOD GetVolume(double *_retval NS_OUTPARAM); \
1091 + NS_SCRIPTABLE NS_IMETHOD SetFileName(const char *filename); \
1092 + NS_SCRIPTABLE NS_IMETHOD SetIsLooping(PRBool loop); \
1093 + NS_SCRIPTABLE NS_IMETHOD GetIsLooping(PRBool *_retval NS_OUTPARAM); \
1094 + NS_SCRIPTABLE NS_IMETHOD SetAutoPlay(PRBool autoPlay); \
1095 + NS_SCRIPTABLE NS_IMETHOD GetAutoPlay(PRBool *_retval NS_OUTPARAM); \
1096 + NS_SCRIPTABLE NS_IMETHOD SetHREF(const char *url); \
1097 + NS_SCRIPTABLE NS_IMETHOD GetHREF(char **_retval NS_OUTPARAM); \
1098 + NS_SCRIPTABLE NS_IMETHOD SetURL(const char *url); \
1099 + NS_SCRIPTABLE NS_IMETHOD GetURL(char **_retval NS_OUTPARAM); \
1100 + NS_SCRIPTABLE NS_IMETHOD GetMIMEType(char **_retval NS_OUTPARAM); \
1101 + NS_SCRIPTABLE NS_IMETHOD GetTime(double *_retval NS_OUTPARAM); \
1102 + NS_SCRIPTABLE NS_IMETHOD GetDuration(double *_retval NS_OUTPARAM); \
1103 + NS_SCRIPTABLE NS_IMETHOD GetPercent(double *_retval NS_OUTPARAM); \
1104 + NS_SCRIPTABLE NS_IMETHOD Isplaying(PRBool *_retval NS_OUTPARAM); \
1105 + NS_SCRIPTABLE NS_IMETHOD PlaylistAppend(const char *item); \
1106 + NS_SCRIPTABLE NS_IMETHOD PlaylistClear(PRBool *_retval NS_OUTPARAM); \
1107 + NS_SCRIPTABLE NS_IMETHOD GetFilename(char * *aFilename); \
1108 + NS_SCRIPTABLE NS_IMETHOD SetFilename(const char * aFilename); \
1109 + NS_SCRIPTABLE NS_IMETHOD GetSrc(char * *aSrc); \
1110 + NS_SCRIPTABLE NS_IMETHOD SetSrc(const char * aSrc); \
1111 + NS_SCRIPTABLE NS_IMETHOD GetShowControls(PRBool *aShowControls); \
1112 + NS_SCRIPTABLE NS_IMETHOD SetShowControls(PRBool aShowControls); \
1113 + NS_SCRIPTABLE NS_IMETHOD GetFullscreen(PRBool *aFullscreen); \
1114 + NS_SCRIPTABLE NS_IMETHOD SetFullscreen(PRBool aFullscreen); \
1115 + NS_SCRIPTABLE NS_IMETHOD GetShowlogo(PRBool *aShowlogo); \
1116 + NS_SCRIPTABLE NS_IMETHOD SetShowlogo(PRBool aShowlogo); \
1117 + NS_SCRIPTABLE NS_IMETHOD GetPlayState(PRInt32 *aPlayState); \
1118 + NS_SCRIPTABLE NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls); \
1119 + NS_SCRIPTABLE NS_IMETHOD OnClick(const char *event);
1120
1121 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
1122 #define NS_FORWARD_NSISCRIPTABLEMPLAYERPLUGIN(_to) \
1123 - NS_IMETHOD Play(void) { return _to Play(); } \
1124 - NS_IMETHOD PlayAt(double value) { return _to PlayAt(value); } \
1125 - NS_IMETHOD Pause(void) { return _to Pause(); } \
1126 - NS_IMETHOD Stop(void) { return _to Stop(); } \
1127 - NS_IMETHOD Quit(void) { return _to Quit(); } \
1128 - NS_IMETHOD DoPlay(void) { return _to DoPlay(); } \
1129 - NS_IMETHOD DoPause(void) { return _to DoPause(); } \
1130 - NS_IMETHOD FastForward(void) { return _to FastForward(); } \
1131 - NS_IMETHOD FastReverse(void) { return _to FastReverse(); } \
1132 - NS_IMETHOD Ff(void) { return _to Ff(); } \
1133 - NS_IMETHOD Rew(void) { return _to Rew(); } \
1134 - NS_IMETHOD Rewind(void) { return _to Rewind(); } \
1135 - NS_IMETHOD Seek(double value) { return _to Seek(value); } \
1136 - NS_IMETHOD Open(const char *filename) { return _to Open(filename); } \
1137 - NS_IMETHOD SetVolume(double value) { return _to SetVolume(value); } \
1138 - NS_IMETHOD GetVolume(double *_retval) { return _to GetVolume(_retval); } \
1139 - NS_IMETHOD SetFileName(const char *filename) { return _to SetFileName(filename); } \
1140 - NS_IMETHOD SetIsLooping(PRBool loop) { return _to SetIsLooping(loop); } \
1141 - NS_IMETHOD GetIsLooping(PRBool *_retval) { return _to GetIsLooping(_retval); } \
1142 - NS_IMETHOD SetAutoPlay(PRBool autoPlay) { return _to SetAutoPlay(autoPlay); } \
1143 - NS_IMETHOD GetAutoPlay(PRBool *_retval) { return _to GetAutoPlay(_retval); } \
1144 - NS_IMETHOD SetHREF(const char *url) { return _to SetHREF(url); } \
1145 - NS_IMETHOD GetHREF(char **_retval) { return _to GetHREF(_retval); } \
1146 - NS_IMETHOD SetURL(const char *url) { return _to SetURL(url); } \
1147 - NS_IMETHOD GetURL(char **_retval) { return _to GetURL(_retval); } \
1148 - NS_IMETHOD GetMIMEType(char **_retval) { return _to GetMIMEType(_retval); } \
1149 - NS_IMETHOD GetTime(double *_retval) { return _to GetTime(_retval); } \
1150 - NS_IMETHOD GetDuration(double *_retval) { return _to GetDuration(_retval); } \
1151 - NS_IMETHOD GetPercent(double *_retval) { return _to GetPercent(_retval); } \
1152 - NS_IMETHOD Isplaying(PRBool *_retval) { return _to Isplaying(_retval); } \
1153 - NS_IMETHOD PlaylistAppend(const char *item) { return _to PlaylistAppend(item); } \
1154 - NS_IMETHOD PlaylistClear(PRBool *_retval) { return _to PlaylistClear(_retval); } \
1155 - NS_IMETHOD GetFilename(char * *aFilename) { return _to GetFilename(aFilename); } \
1156 - NS_IMETHOD SetFilename(const char * aFilename) { return _to SetFilename(aFilename); } \
1157 - NS_IMETHOD GetSrc(char * *aSrc) { return _to GetSrc(aSrc); } \
1158 - NS_IMETHOD SetSrc(const char * aSrc) { return _to SetSrc(aSrc); } \
1159 - NS_IMETHOD GetShowControls(PRBool *aShowControls) { return _to GetShowControls(aShowControls); } \
1160 - NS_IMETHOD SetShowControls(PRBool aShowControls) { return _to SetShowControls(aShowControls); } \
1161 - NS_IMETHOD GetFullscreen(PRBool *aFullscreen) { return _to GetFullscreen(aFullscreen); } \
1162 - NS_IMETHOD SetFullscreen(PRBool aFullscreen) { return _to SetFullscreen(aFullscreen); } \
1163 - NS_IMETHOD GetShowlogo(PRBool *aShowlogo) { return _to GetShowlogo(aShowlogo); } \
1164 - NS_IMETHOD SetShowlogo(PRBool aShowlogo) { return _to SetShowlogo(aShowlogo); } \
1165 - NS_IMETHOD GetPlayState(PRInt32 *aPlayState) { return _to GetPlayState(aPlayState); } \
1166 - NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) { return _to GetControls(aControls); } \
1167 - NS_IMETHOD OnClick(const char *event) { return _to OnClick(event); }
1168 + NS_SCRIPTABLE NS_IMETHOD Play(void) { return _to Play(); } \
1169 + NS_SCRIPTABLE NS_IMETHOD PlayAt(double value) { return _to PlayAt(value); } \
1170 + NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
1171 + NS_SCRIPTABLE NS_IMETHOD Stop(void) { return _to Stop(); } \
1172 + NS_SCRIPTABLE NS_IMETHOD Quit(void) { return _to Quit(); } \
1173 + NS_SCRIPTABLE NS_IMETHOD DoPlay(void) { return _to DoPlay(); } \
1174 + NS_SCRIPTABLE NS_IMETHOD DoPause(void) { return _to DoPause(); } \
1175 + NS_SCRIPTABLE NS_IMETHOD FastForward(void) { return _to FastForward(); } \
1176 + NS_SCRIPTABLE NS_IMETHOD FastReverse(void) { return _to FastReverse(); } \
1177 + NS_SCRIPTABLE NS_IMETHOD Ff(void) { return _to Ff(); } \
1178 + NS_SCRIPTABLE NS_IMETHOD Rew(void) { return _to Rew(); } \
1179 + NS_SCRIPTABLE NS_IMETHOD Rewind(void) { return _to Rewind(); } \
1180 + NS_SCRIPTABLE NS_IMETHOD Seek(double value) { return _to Seek(value); } \
1181 + NS_SCRIPTABLE NS_IMETHOD Open(const char *filename) { return _to Open(filename); } \
1182 + NS_SCRIPTABLE NS_IMETHOD SetVolume(double value) { return _to SetVolume(value); } \
1183 + NS_SCRIPTABLE NS_IMETHOD GetVolume(double *_retval NS_OUTPARAM) { return _to GetVolume(_retval); } \
1184 + NS_SCRIPTABLE NS_IMETHOD SetFileName(const char *filename) { return _to SetFileName(filename); } \
1185 + NS_SCRIPTABLE NS_IMETHOD SetIsLooping(PRBool loop) { return _to SetIsLooping(loop); } \
1186 + NS_SCRIPTABLE NS_IMETHOD GetIsLooping(PRBool *_retval NS_OUTPARAM) { return _to GetIsLooping(_retval); } \
1187 + NS_SCRIPTABLE NS_IMETHOD SetAutoPlay(PRBool autoPlay) { return _to SetAutoPlay(autoPlay); } \
1188 + NS_SCRIPTABLE NS_IMETHOD GetAutoPlay(PRBool *_retval NS_OUTPARAM) { return _to GetAutoPlay(_retval); } \
1189 + NS_SCRIPTABLE NS_IMETHOD SetHREF(const char *url) { return _to SetHREF(url); } \
1190 + NS_SCRIPTABLE NS_IMETHOD GetHREF(char **_retval NS_OUTPARAM) { return _to GetHREF(_retval); } \
1191 + NS_SCRIPTABLE NS_IMETHOD SetURL(const char *url) { return _to SetURL(url); } \
1192 + NS_SCRIPTABLE NS_IMETHOD GetURL(char **_retval NS_OUTPARAM) { return _to GetURL(_retval); } \
1193 + NS_SCRIPTABLE NS_IMETHOD GetMIMEType(char **_retval NS_OUTPARAM) { return _to GetMIMEType(_retval); } \
1194 + NS_SCRIPTABLE NS_IMETHOD GetTime(double *_retval NS_OUTPARAM) { return _to GetTime(_retval); } \
1195 + NS_SCRIPTABLE NS_IMETHOD GetDuration(double *_retval NS_OUTPARAM) { return _to GetDuration(_retval); } \
1196 + NS_SCRIPTABLE NS_IMETHOD GetPercent(double *_retval NS_OUTPARAM) { return _to GetPercent(_retval); } \
1197 + NS_SCRIPTABLE NS_IMETHOD Isplaying(PRBool *_retval NS_OUTPARAM) { return _to Isplaying(_retval); } \
1198 + NS_SCRIPTABLE NS_IMETHOD PlaylistAppend(const char *item) { return _to PlaylistAppend(item); } \
1199 + NS_SCRIPTABLE NS_IMETHOD PlaylistClear(PRBool *_retval NS_OUTPARAM) { return _to PlaylistClear(_retval); } \
1200 + NS_SCRIPTABLE NS_IMETHOD GetFilename(char * *aFilename) { return _to GetFilename(aFilename); } \
1201 + NS_SCRIPTABLE NS_IMETHOD SetFilename(const char * aFilename) { return _to SetFilename(aFilename); } \
1202 + NS_SCRIPTABLE NS_IMETHOD GetSrc(char * *aSrc) { return _to GetSrc(aSrc); } \
1203 + NS_SCRIPTABLE NS_IMETHOD SetSrc(const char * aSrc) { return _to SetSrc(aSrc); } \
1204 + NS_SCRIPTABLE NS_IMETHOD GetShowControls(PRBool *aShowControls) { return _to GetShowControls(aShowControls); } \
1205 + NS_SCRIPTABLE NS_IMETHOD SetShowControls(PRBool aShowControls) { return _to SetShowControls(aShowControls); } \
1206 + NS_SCRIPTABLE NS_IMETHOD GetFullscreen(PRBool *aFullscreen) { return _to GetFullscreen(aFullscreen); } \
1207 + NS_SCRIPTABLE NS_IMETHOD SetFullscreen(PRBool aFullscreen) { return _to SetFullscreen(aFullscreen); } \
1208 + NS_SCRIPTABLE NS_IMETHOD GetShowlogo(PRBool *aShowlogo) { return _to GetShowlogo(aShowlogo); } \
1209 + NS_SCRIPTABLE NS_IMETHOD SetShowlogo(PRBool aShowlogo) { return _to SetShowlogo(aShowlogo); } \
1210 + NS_SCRIPTABLE NS_IMETHOD GetPlayState(PRInt32 *aPlayState) { return _to GetPlayState(aPlayState); } \
1211 + NS_SCRIPTABLE NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) { return _to GetControls(aControls); } \
1212 + NS_SCRIPTABLE NS_IMETHOD OnClick(const char *event) { return _to OnClick(event); }
1213
1214 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
1215 #define NS_FORWARD_SAFE_NSISCRIPTABLEMPLAYERPLUGIN(_to) \
1216 - NS_IMETHOD Play(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(); } \
1217 - NS_IMETHOD PlayAt(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlayAt(value); } \
1218 - NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
1219 - NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); } \
1220 - NS_IMETHOD Quit(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Quit(); } \
1221 - NS_IMETHOD DoPlay(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoPlay(); } \
1222 - NS_IMETHOD DoPause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoPause(); } \
1223 - NS_IMETHOD FastForward(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FastForward(); } \
1224 - NS_IMETHOD FastReverse(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FastReverse(); } \
1225 - NS_IMETHOD Ff(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Ff(); } \
1226 - NS_IMETHOD Rew(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rew(); } \
1227 - NS_IMETHOD Rewind(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rewind(); } \
1228 - NS_IMETHOD Seek(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->Seek(value); } \
1229 - NS_IMETHOD Open(const char *filename) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(filename); } \
1230 - NS_IMETHOD SetVolume(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVolume(value); } \
1231 - NS_IMETHOD GetVolume(double *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVolume(_retval); } \
1232 - NS_IMETHOD SetFileName(const char *filename) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileName(filename); } \
1233 - NS_IMETHOD SetIsLooping(PRBool loop) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsLooping(loop); } \
1234 - NS_IMETHOD GetIsLooping(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLooping(_retval); } \
1235 - NS_IMETHOD SetAutoPlay(PRBool autoPlay) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAutoPlay(autoPlay); } \
1236 - NS_IMETHOD GetAutoPlay(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoPlay(_retval); } \
1237 - NS_IMETHOD SetHREF(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHREF(url); } \
1238 - NS_IMETHOD GetHREF(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHREF(_retval); } \
1239 - NS_IMETHOD SetURL(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetURL(url); } \
1240 - NS_IMETHOD GetURL(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(_retval); } \
1241 - NS_IMETHOD GetMIMEType(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(_retval); } \
1242 - NS_IMETHOD GetTime(double *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTime(_retval); } \
1243 - NS_IMETHOD GetDuration(double *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDuration(_retval); } \
1244 - NS_IMETHOD GetPercent(double *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPercent(_retval); } \
1245 - NS_IMETHOD Isplaying(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Isplaying(_retval); } \
1246 - NS_IMETHOD PlaylistAppend(const char *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaylistAppend(item); } \
1247 - NS_IMETHOD PlaylistClear(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaylistClear(_retval); } \
1248 - NS_IMETHOD GetFilename(char * *aFilename) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilename(aFilename); } \
1249 - NS_IMETHOD SetFilename(const char * aFilename) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilename(aFilename); } \
1250 - NS_IMETHOD GetSrc(char * *aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \
1251 - NS_IMETHOD SetSrc(const char * aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \
1252 - NS_IMETHOD GetShowControls(PRBool *aShowControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShowControls(aShowControls); } \
1253 - NS_IMETHOD SetShowControls(PRBool aShowControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShowControls(aShowControls); } \
1254 - NS_IMETHOD GetFullscreen(PRBool *aFullscreen) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFullscreen(aFullscreen); } \
1255 - NS_IMETHOD SetFullscreen(PRBool aFullscreen) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFullscreen(aFullscreen); } \
1256 - NS_IMETHOD GetShowlogo(PRBool *aShowlogo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShowlogo(aShowlogo); } \
1257 - NS_IMETHOD SetShowlogo(PRBool aShowlogo) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShowlogo(aShowlogo); } \
1258 - NS_IMETHOD GetPlayState(PRInt32 *aPlayState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPlayState(aPlayState); } \
1259 - NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetControls(aControls); } \
1260 - NS_IMETHOD OnClick(const char *event) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnClick(event); }
1261 + NS_SCRIPTABLE NS_IMETHOD Play(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(); } \
1262 + NS_SCRIPTABLE NS_IMETHOD PlayAt(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlayAt(value); } \
1263 + NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
1264 + NS_SCRIPTABLE NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); } \
1265 + NS_SCRIPTABLE NS_IMETHOD Quit(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Quit(); } \
1266 + NS_SCRIPTABLE NS_IMETHOD DoPlay(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoPlay(); } \
1267 + NS_SCRIPTABLE NS_IMETHOD DoPause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoPause(); } \
1268 + NS_SCRIPTABLE NS_IMETHOD FastForward(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FastForward(); } \
1269 + NS_SCRIPTABLE NS_IMETHOD FastReverse(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FastReverse(); } \
1270 + NS_SCRIPTABLE NS_IMETHOD Ff(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Ff(); } \
1271 + NS_SCRIPTABLE NS_IMETHOD Rew(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rew(); } \
1272 + NS_SCRIPTABLE NS_IMETHOD Rewind(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rewind(); } \
1273 + NS_SCRIPTABLE NS_IMETHOD Seek(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->Seek(value); } \
1274 + NS_SCRIPTABLE NS_IMETHOD Open(const char *filename) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(filename); } \
1275 + NS_SCRIPTABLE NS_IMETHOD SetVolume(double value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVolume(value); } \
1276 + NS_SCRIPTABLE NS_IMETHOD GetVolume(double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVolume(_retval); } \
1277 + NS_SCRIPTABLE NS_IMETHOD SetFileName(const char *filename) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileName(filename); } \
1278 + NS_SCRIPTABLE NS_IMETHOD SetIsLooping(PRBool loop) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsLooping(loop); } \
1279 + NS_SCRIPTABLE NS_IMETHOD GetIsLooping(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLooping(_retval); } \
1280 + NS_SCRIPTABLE NS_IMETHOD SetAutoPlay(PRBool autoPlay) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAutoPlay(autoPlay); } \
1281 + NS_SCRIPTABLE NS_IMETHOD GetAutoPlay(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoPlay(_retval); } \
1282 + NS_SCRIPTABLE NS_IMETHOD SetHREF(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHREF(url); } \
1283 + NS_SCRIPTABLE NS_IMETHOD GetHREF(char **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHREF(_retval); } \
1284 + NS_SCRIPTABLE NS_IMETHOD SetURL(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetURL(url); } \
1285 + NS_SCRIPTABLE NS_IMETHOD GetURL(char **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(_retval); } \
1286 + NS_SCRIPTABLE NS_IMETHOD GetMIMEType(char **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(_retval); } \
1287 + NS_SCRIPTABLE NS_IMETHOD GetTime(double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTime(_retval); } \
1288 + NS_SCRIPTABLE NS_IMETHOD GetDuration(double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDuration(_retval); } \
1289 + NS_SCRIPTABLE NS_IMETHOD GetPercent(double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPercent(_retval); } \
1290 + NS_SCRIPTABLE NS_IMETHOD Isplaying(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Isplaying(_retval); } \
1291 + NS_SCRIPTABLE NS_IMETHOD PlaylistAppend(const char *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaylistAppend(item); } \
1292 + NS_SCRIPTABLE NS_IMETHOD PlaylistClear(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaylistClear(_retval); } \
1293 + NS_SCRIPTABLE NS_IMETHOD GetFilename(char * *aFilename) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilename(aFilename); } \
1294 + NS_SCRIPTABLE NS_IMETHOD SetFilename(const char * aFilename) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilename(aFilename); } \
1295 + NS_SCRIPTABLE NS_IMETHOD GetSrc(char * *aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \
1296 + NS_SCRIPTABLE NS_IMETHOD SetSrc(const char * aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \
1297 + NS_SCRIPTABLE NS_IMETHOD GetShowControls(PRBool *aShowControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShowControls(aShowControls); } \
1298 + NS_SCRIPTABLE NS_IMETHOD SetShowControls(PRBool aShowControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShowControls(aShowControls); } \
1299 + NS_SCRIPTABLE NS_IMETHOD GetFullscreen(PRBool *aFullscreen) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFullscreen(aFullscreen); } \
1300 + NS_SCRIPTABLE NS_IMETHOD SetFullscreen(PRBool aFullscreen) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFullscreen(aFullscreen); } \
1301 + NS_SCRIPTABLE NS_IMETHOD GetShowlogo(PRBool *aShowlogo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShowlogo(aShowlogo); } \
1302 + NS_SCRIPTABLE NS_IMETHOD SetShowlogo(PRBool aShowlogo) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShowlogo(aShowlogo); } \
1303 + NS_SCRIPTABLE NS_IMETHOD GetPlayState(PRInt32 *aPlayState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPlayState(aPlayState); } \
1304 + NS_SCRIPTABLE NS_IMETHOD GetControls(nsIScriptableWMPPlugin * *aControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetControls(aControls); } \
1305 + NS_SCRIPTABLE NS_IMETHOD OnClick(const char *event) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnClick(event); }
1306
1307 #if 0
1308 /* Use the code below as a template for the implementation class for this interface. */
1309 @@ -516,7 +520,7 @@
1310 }
1311
1312 /* double GetVolume (); */
1313 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetVolume(double *_retval)
1314 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetVolume(double *_retval NS_OUTPARAM)
1315 {
1316 return NS_ERROR_NOT_IMPLEMENTED;
1317 }
1318 @@ -534,7 +538,7 @@
1319 }
1320
1321 /* boolean GetIsLooping (); */
1322 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetIsLooping(PRBool *_retval)
1323 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetIsLooping(PRBool *_retval NS_OUTPARAM)
1324 {
1325 return NS_ERROR_NOT_IMPLEMENTED;
1326 }
1327 @@ -546,7 +550,7 @@
1328 }
1329
1330 /* boolean GetAutoPlay (); */
1331 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetAutoPlay(PRBool *_retval)
1332 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetAutoPlay(PRBool *_retval NS_OUTPARAM)
1333 {
1334 return NS_ERROR_NOT_IMPLEMENTED;
1335 }
1336 @@ -558,7 +562,7 @@
1337 }
1338
1339 /* string GetHREF (); */
1340 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetHREF(char **_retval)
1341 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetHREF(char **_retval NS_OUTPARAM)
1342 {
1343 return NS_ERROR_NOT_IMPLEMENTED;
1344 }
1345 @@ -570,37 +574,37 @@
1346 }
1347
1348 /* string GetURL (); */
1349 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetURL(char **_retval)
1350 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetURL(char **_retval NS_OUTPARAM)
1351 {
1352 return NS_ERROR_NOT_IMPLEMENTED;
1353 }
1354
1355 /* string GetMIMEType (); */
1356 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetMIMEType(char **_retval)
1357 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetMIMEType(char **_retval NS_OUTPARAM)
1358 {
1359 return NS_ERROR_NOT_IMPLEMENTED;
1360 }
1361
1362 /* double getTime (); */
1363 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetTime(double *_retval)
1364 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetTime(double *_retval NS_OUTPARAM)
1365 {
1366 return NS_ERROR_NOT_IMPLEMENTED;
1367 }
1368
1369 /* double getDuration (); */
1370 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetDuration(double *_retval)
1371 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetDuration(double *_retval NS_OUTPARAM)
1372 {
1373 return NS_ERROR_NOT_IMPLEMENTED;
1374 }
1375
1376 /* double getPercent (); */
1377 -NS_IMETHODIMP nsScriptableMplayerPlugin::GetPercent(double *_retval)
1378 +NS_IMETHODIMP nsScriptableMplayerPlugin::GetPercent(double *_retval NS_OUTPARAM)
1379 {
1380 return NS_ERROR_NOT_IMPLEMENTED;
1381 }
1382
1383 /* boolean isplaying (); */
1384 -NS_IMETHODIMP nsScriptableMplayerPlugin::Isplaying(PRBool *_retval)
1385 +NS_IMETHODIMP nsScriptableMplayerPlugin::Isplaying(PRBool *_retval NS_OUTPARAM)
1386 {
1387 return NS_ERROR_NOT_IMPLEMENTED;
1388 }
1389 @@ -612,7 +616,7 @@
1390 }
1391
1392 /* boolean playlistClear (); */
1393 -NS_IMETHODIMP nsScriptableMplayerPlugin::PlaylistClear(PRBool *_retval)
1394 +NS_IMETHODIMP nsScriptableMplayerPlugin::PlaylistClear(PRBool *_retval NS_OUTPARAM)
1395 {
1396 return NS_ERROR_NOT_IMPLEMENTED;
1397 }
1398 diff -Naur mplayerplug-in-3.55/Source/plugin-list.cpp mplayerplug-in.tpg/Source/plugin-list.cpp
1399 --- mplayerplug-in-3.55/Source/plugin-list.cpp 2008-01-03 01:20:34.000000000 +0100
1400 +++ mplayerplug-in.tpg/Source/plugin-list.cpp 2009-05-03 18:22:40.000000000 +0200
1401 @@ -140,8 +140,8 @@
1402 char tagtarget[128];
1403 char tagurl[4096];
1404
1405 - endvideo = strstr(smilbuffer, "</video");
1406 - startarea = strstr(smilbuffer, "<area");
1407 + endvideo = strstr((char *)smilbuffer, "</video");
1408 + startarea = strstr((char *)smilbuffer, "<area");
1409
1410 while (startarea && startarea < endvideo) {
1411 start = strstr(startarea + 5, "begin=");
1412 @@ -408,16 +408,17 @@
1413 code = 0;
1414 }
1415 }
1416 - if ((nextrmda - size) == p)
1417 - break;
1418 p = nextrmda + 4;
1419 - nextrmda =
1420 - (char *) memmem(p,
1421 - size - ((long) p - (long) buffer),
1422 - "rmda", 4);
1423 - if (nextrmda == NULL)
1424 - nextrmda = buffer + size;
1425 -
1426 + if (p > (buffer + size)) {
1427 + p = NULL;
1428 + } else {
1429 + nextrmda =
1430 + (char *) memmem(p,
1431 + size - ((long) p - (long) buffer),
1432 + "rmda", 4);
1433 + if (nextrmda == NULL)
1434 + nextrmda = buffer + size;
1435 + }
1436 }
1437
1438 break; // End QT Reference file
1439 diff -Naur mplayerplug-in-3.55/Source/plugin-setup.cpp mplayerplug-in.tpg/Source/plugin-setup.cpp
1440 --- mplayerplug-in-3.55/Source/plugin-setup.cpp 2008-05-13 23:42:58.000000000 +0200
1441 +++ mplayerplug-in.tpg/Source/plugin-setup.cpp 2008-07-12 23:15:28.000000000 +0200
1442 @@ -348,6 +348,8 @@
1443 "audio/x-mpeg:mpg,mpeg:MPEG;"
1444 "audio/mpeg2:mp2:MPEG audio;"
1445 "audio/x-mpeg2:mp2:MPEG audio;"
1446 + "audio/mp4:mp4:MPEG 4 audio;"
1447 + "audio/x-mp4:mp4:MPEG 4 audio;"
1448 "video/mp4:mp4:MPEG 4 Video;"
1449 "video/3gpp:mp4,3gp:MPEG 4 Video;", sizeof(MimeTypes));
1450
1451 diff -Naur mplayerplug-in-3.55/Source/plugin-support.cpp mplayerplug-in.tpg/Source/plugin-support.cpp
1452 --- mplayerplug-in-3.55/Source/plugin-support.cpp 2008-05-28 16:50:46.000000000 +0200
1453 +++ mplayerplug-in.tpg/Source/plugin-support.cpp 2009-04-03 17:39:48.000000000 +0200
1454 @@ -121,7 +121,7 @@
1455 if (len == 0)
1456 return NULL;
1457 filename = (char *) NPN_MemAlloc(sizeof(char) * (len + 1));
1458 - tmp = rindex(url, '/');
1459 + tmp = rindex((char *)url, '/');
1460 if (tmp == NULL) {
1461 strcpy(filename, url);
1462 return filename;
1463 @@ -505,9 +505,13 @@
1464 if (instance->paused == 1)
1465 sendCommand(instance, "pause\n");
1466 sendCommand(instance, "quit\n");
1467 +#ifndef BSD
1468 pthread_mutex_lock(&(instance->read_mutex));
1469 +#endif
1470 instance->cancelled = 1;
1471 +#ifndef BSD
1472 pthread_mutex_unlock(&(instance->read_mutex));
1473 +#endif
1474
1475 /* count = 0;
1476 while (count < 500) {
1477 diff -Naur mplayerplug-in-3.55/Source/plugin-threads.cpp mplayerplug-in.tpg/Source/plugin-threads.cpp
1478 --- mplayerplug-in-3.55/Source/plugin-threads.cpp 2008-06-13 05:38:37.000000000 +0200
1479 +++ mplayerplug-in.tpg/Source/plugin-threads.cpp 2009-02-17 15:19:53.000000000 +0100
1480 @@ -16,6 +16,12 @@
1481 {
1482 // Not used, so commented out
1483 // wait(NULL);
1484 + pid_t pid;
1485 + int status;
1486 +
1487 + pid = wait(&status);
1488 + return;
1489 +
1490 }
1491
1492
1493 diff -Naur mplayerplug-in-3.55/Source/plugin-ui.cpp mplayerplug-in.tpg/Source/plugin-ui.cpp
1494 --- mplayerplug-in-3.55/Source/plugin-ui.cpp 2008-06-12 16:18:01.000000000 +0200
1495 +++ mplayerplug-in.tpg/Source/plugin-ui.cpp 2009-05-04 02:03:19.000000000 +0200
1496 @@ -1134,12 +1134,13 @@
1497 instance->panel_height = instance->window_height;
1498 if (instance->panel_height > 16)
1499 instance->panel_height = 16;
1500 - if (instance->panel_height <= 0)
1501 + if (instance->panel_height <= 0) {
1502 if (instance->showcontrols) {
1503 instance->panel_height = 16;
1504 } else {
1505 instance->panel_height = 0;
1506 }
1507 + }
1508 if (DEBUG) {
1509 printf("drawing panel\n height = %i panel= %i\n",
1510 win_height, instance->panel_height);
1511 @@ -2865,7 +2866,7 @@
1512 gtk_table_attach_defaults(GTK_TABLE(conf_table), conf_label, 0, 1,
1513 3, 4);
1514 gtk_widget_show(conf_label);
1515 - instance->conf_cachesize = gtk_hscale_new_with_range(0, 32767, 512);
1516 + instance->conf_cachesize = gtk_hscale_new_with_range(32, 32767, 512);
1517 gtk_table_attach_defaults(GTK_TABLE(conf_table),
1518 instance->conf_cachesize, 1, 2, 3, 4);
1519 gtk_range_set_value(GTK_RANGE(instance->conf_cachesize),
1520 @@ -3362,6 +3363,7 @@
1521 if (GTK_IS_WIDGET(instance->src_event_box)) {
1522 gtk_widget_show(instance->src_event_box);
1523 }
1524 + return FALSE;
1525
1526 }
1527 #endif // GTK_ENABLED
1528 diff -Naur mplayerplug-in-3.55/common/CVS/Entries mplayerplug-in.tpg/common/CVS/Entries
1529 --- mplayerplug-in-3.55/common/CVS/Entries 2007-09-21 22:39:34.000000000 +0200
1530 +++ mplayerplug-in.tpg/common/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
1531 @@ -1,4 +1,4 @@
1532 -/npmac.cpp/1.1.1.1/Mon Sep 11 19:32:04 2006//
1533 -/npunix.c/1.1.1.1/Mon Sep 11 19:32:04 2006//
1534 -/npwin.cpp/1.1.1.1/Mon Sep 11 19:32:04 2006//
1535 +/npmac.cpp/1.1.1.1/Thu Feb 5 00:34:45 2004//
1536 +/npunix.c/1.1.1.1/Thu Feb 5 00:34:45 2004//
1537 +/npwin.cpp/1.1.1.1/Thu Feb 5 00:34:46 2004//
1538 D
1539 diff -Naur mplayerplug-in-3.55/common/CVS/Root mplayerplug-in.tpg/common/CVS/Root
1540 --- mplayerplug-in-3.55/common/CVS/Root 2006-09-11 21:32:04.000000000 +0200
1541 +++ mplayerplug-in.tpg/common/CVS/Root 2009-09-08 23:54:24.000000000 +0200
1542 @@ -1 +1 @@
1543 -:ext:kdekorte@mplayerplug-in.cvs.sourceforge.net/cvsroot/mplayerplug-in
1544 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
1545 diff -Naur mplayerplug-in-3.55/configure mplayerplug-in.tpg/configure
1546 --- mplayerplug-in-3.55/configure 2008-06-24 15:15:05.000000000 +0200
1547 +++ mplayerplug-in.tpg/configure 2008-12-09 15:00:54.000000000 +0100
1548 @@ -3265,6 +3265,8 @@
1549 MOZPLUG_CFLAGS="-I${GECKO_SDK_PREFIX} -I${GECKO_SDK_PREFIX}/include -I${GECKO_SDK_PREFIX}/include/plugin -I${GECKO_SDK_PREFIX}/include/xpcom -I${GECKO_SDK_PREFIX}/include/nspr -I${GECKO_SDK_PREFIX}/include/string -I${GECKO_SDK_PREFIX}/include/java"
1550 GECKO_DEFINES="-DXPCOM_GLUE -DMOZILLA_STRICT_API"
1551
1552 + GECKO_IDLDIR="${GECKO_SDK_PREFIX}/idl"
1553 + MOZILLA_HOME="${GECKO_SDK_PREFIX}/bin"
1554 fi
1555 # Check whether --enable-rpath was given.
1556 if test "${enable_rpath+set}" = set; then
1557 diff -Naur mplayerplug-in-3.55/configure.in mplayerplug-in.tpg/configure.in
1558 --- mplayerplug-in-3.55/configure.in 2008-06-24 15:12:43.000000000 +0200
1559 +++ mplayerplug-in.tpg/configure.in 2008-12-09 15:00:54.000000000 +0100
1560 @@ -43,6 +43,8 @@
1561 MOZPLUG_CFLAGS="-I${GECKO_SDK_PREFIX} -I${GECKO_SDK_PREFIX}/include -I${GECKO_SDK_PREFIX}/include/plugin -I${GECKO_SDK_PREFIX}/include/xpcom -I${GECKO_SDK_PREFIX}/include/nspr -I${GECKO_SDK_PREFIX}/include/string -I${GECKO_SDK_PREFIX}/include/java"
1562 GECKO_DEFINES="-DXPCOM_GLUE -DMOZILLA_STRICT_API"
1563 AC_SUBST(GECKO_DEFINES)
1564 + GECKO_IDLDIR="${GECKO_SDK_PREFIX}/idl"
1565 + MOZILLA_HOME="${GECKO_SDK_PREFIX}/bin"
1566 fi
1567 AC_ARG_ENABLE(rpath,
1568 AC_HELP_STRING([--enable-rpath], [Add gecko-sdk bin and lib directories to the rpath]),
1569 diff -Naur mplayerplug-in-3.55/debian/CVS/Entries mplayerplug-in.tpg/debian/CVS/Entries
1570 --- mplayerplug-in-3.55/debian/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
1571 +++ mplayerplug-in.tpg/debian/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
1572 @@ -0,0 +1 @@
1573 +D
1574 diff -Naur mplayerplug-in-3.55/debian/CVS/Repository mplayerplug-in.tpg/debian/CVS/Repository
1575 --- mplayerplug-in-3.55/debian/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
1576 +++ mplayerplug-in.tpg/debian/CVS/Repository 2009-09-08 23:54:24.000000000 +0200
1577 @@ -0,0 +1 @@
1578 +mplayerplug-in/debian
1579 diff -Naur mplayerplug-in-3.55/debian/CVS/Root mplayerplug-in.tpg/debian/CVS/Root
1580 --- mplayerplug-in-3.55/debian/CVS/Root 1970-01-01 01:00:00.000000000 +0100
1581 +++ mplayerplug-in.tpg/debian/CVS/Root 2009-09-08 23:54:24.000000000 +0200
1582 @@ -0,0 +1 @@
1583 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
1584 diff -Naur mplayerplug-in-3.55/extras/CVS/Entries mplayerplug-in.tpg/extras/CVS/Entries
1585 --- mplayerplug-in-3.55/extras/CVS/Entries 2007-09-21 22:39:34.000000000 +0200
1586 +++ mplayerplug-in.tpg/extras/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
1587 @@ -1,4 +1,4 @@
1588 -/memmem.c/1.3/Mon Sep 11 19:32:09 2006//
1589 -/strlcat.c/1.1.1.1/Mon Sep 11 19:32:09 2006//
1590 -/strlcpy.c/1.1.1.1/Mon Sep 11 19:32:09 2006//
1591 +/memmem.c/1.3/Sat Feb 14 15:29:20 2004//
1592 +/strlcat.c/1.1.1.1/Thu Feb 5 00:34:46 2004//
1593 +/strlcpy.c/1.1.1.1/Thu Feb 5 00:34:46 2004//
1594 D
1595 diff -Naur mplayerplug-in-3.55/extras/CVS/Root mplayerplug-in.tpg/extras/CVS/Root
1596 --- mplayerplug-in-3.55/extras/CVS/Root 2006-09-11 21:32:09.000000000 +0200
1597 +++ mplayerplug-in.tpg/extras/CVS/Root 2009-09-08 23:54:24.000000000 +0200
1598 @@ -1 +1 @@
1599 -:ext:kdekorte@mplayerplug-in.cvs.sourceforge.net/cvsroot/mplayerplug-in
1600 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
1601 diff -Naur mplayerplug-in-3.55/extras/gdksuperwin.h mplayerplug-in.tpg/extras/gdksuperwin.h
1602 --- mplayerplug-in-3.55/extras/gdksuperwin.h 2006-09-11 21:32:09.000000000 +0200
1603 +++ mplayerplug-in.tpg/extras/gdksuperwin.h 1970-01-01 01:00:00.000000000 +0100
1604 @@ -1,104 +0,0 @@
1605 -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
1606 - *
1607 - * The contents of this file are subject to the Mozilla Public License
1608 - * Version 1.1 (the "License"); you may not use this file except in
1609 - * compliance with the License. You may obtain a copy of the License
1610 - * at http://www.mozilla.org/MPL/
1611 - *
1612 - * Software distributed under the License is distributed on an "AS
1613 - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1614 - * implied. See the License for the specific language governing
1615 - * rights and limitations under the License.
1616 - *
1617 - * The Initial Developers of this code under the MPL are Owen Taylor
1618 - * <otaylor@redhat.com> and Christopher Blizzard <blizzard@redhat.com>.
1619 - * Portions created by the Initial Developers are Copyright (C) 1999
1620 - * Owen Taylor and Christopher Blizzard. All Rights Reserved. */
1621 -
1622 -#ifndef __GDK_SUPERWIN_H__
1623 -#define __GDK_SUPERWIN_H__
1624 -
1625 -#include <gdk/gdk.h>
1626 -#include <gdk/gdkx.h>
1627 -#include <gtk/gtkobject.h>
1628 -
1629 -#ifdef __cplusplus
1630 -extern "C" {
1631 -#endif /* __cplusplus */
1632 -
1633 -typedef struct _GdkSuperWin GdkSuperWin;
1634 -typedef struct _GdkSuperWinClass GdkSuperWinClass;
1635 -
1636 -#define GDK_TYPE_SUPERWIN (gdk_superwin_get_type())
1637 -#define GDK_SUPERWIN(obj) (GTK_CHECK_CAST((obj), GDK_TYPE_SUPERWIN, GdkSuperWin))
1638 -#define GDK_SUPERWIN_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GDK_TYPE_SUPERWIN, GdkSuperWinClass))
1639 -#define GDK_IS_SUPERWIN(obj) (GTK_CHECK_TYPE((obj), GDK_TYPE_SUPERWIN))
1640 -#define GDK_IS_SUPERWIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GDK_TYPE_SUPERWIN))
1641 -
1642 -typedef void (*GdkSuperWinFunc) (GdkSuperWin *super_win,
1643 - XEvent *event,
1644 - gpointer data);
1645 -
1646 -typedef void (*GdkSuperWinPaintFunc) (gint x, gint y,
1647 - gint width, gint height,
1648 - gpointer data);
1649 -typedef void (*GdkSuperWinPaintFlushFunc) (gpointer data);
1650 -
1651 -typedef void (*GdkSuperWinKeyPressFunc) (XKeyEvent *event);
1652 -typedef void (*GdkSuperWinKeyReleaseFunc) (XKeyEvent *event);
1653 -
1654 -struct _GdkSuperWin
1655 -{
1656 - GtkObject object;
1657 - GdkWindow *shell_window;
1658 - GdkWindow *bin_window;
1659 -
1660 - /* Private */
1661 - GSList *translate_queue;
1662 - GdkSuperWinFunc shell_func;
1663 - GdkSuperWinPaintFunc paint_func;
1664 - GdkSuperWinPaintFlushFunc flush_func;
1665 - GdkSuperWinKeyPressFunc keyprs_func;
1666 - GdkSuperWinKeyReleaseFunc keyrel_func;
1667 - gpointer func_data;
1668 - GDestroyNotify notify;
1669 -
1670 - GdkVisibilityState visibility;
1671 -};
1672 -
1673 -struct _GdkSuperWinClass
1674 -{
1675 - GtkObjectClass object_class;
1676 -};
1677 -
1678 -GtkType gdk_superwin_get_type(void);
1679 -
1680 -GdkSuperWin *gdk_superwin_new (GdkWindow *parent_window,
1681 - guint x,
1682 - guint y,
1683 - guint width,
1684 - guint height);
1685 -
1686 -void
1687 -gdk_superwin_set_event_funcs (GdkSuperWin *superwin,
1688 - GdkSuperWinFunc shell_func,
1689 - GdkSuperWinPaintFunc paint_func,
1690 - GdkSuperWinPaintFlushFunc flush_func,
1691 - GdkSuperWinKeyPressFunc keyprs_func,
1692 - GdkSuperWinKeyReleaseFunc keyrel_func,
1693 - gpointer func_data,
1694 - GDestroyNotify notify);
1695 -
1696 -void gdk_superwin_scroll (GdkSuperWin *superwin,
1697 - gint dx,
1698 - gint dy);
1699 -void gdk_superwin_resize (GdkSuperWin *superwin,
1700 - gint width,
1701 - gint height);
1702 -
1703 -#ifdef __cplusplus
1704 -}
1705 -#endif /* __cplusplus */
1706 -
1707 -#endif /* _GDK_SUPERWIN_H__ */
1708 -
1709 diff -Naur mplayerplug-in-3.55/extras/memmem.c~ mplayerplug-in.tpg/extras/memmem.c~
1710 --- mplayerplug-in-3.55/extras/memmem.c~ 2006-09-11 21:32:09.000000000 +0200
1711 +++ mplayerplug-in.tpg/extras/memmem.c~ 1970-01-01 01:00:00.000000000 +0100
1712 @@ -1,135 +0,0 @@
1713 -/* This file implements memmem, a function to find the first occurrence
1714 - of the contents of a memory area in another memory area.
1715 - Copyright (C) 2003 Martin Dickopp
1716 -
1717 - This file is free software; you can redistribute it and/or modify
1718 - it under the terms of the GNU General Public License as published by
1719 - the Free Software Foundation; either version 2 of the License, or
1720 - (at your option) any later version.
1721 -
1722 - This file is distributed in the hope that it will be useful,
1723 - but WITHOUT ANY WARRANTY; without even the implied warranty of
1724 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1725 - GNU General Public License for more details.
1726 -
1727 - You should have received a copy of the GNU General Public License
1728 - along with this file; if not, write to the Free Software
1729 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
1730 - USA. */
1731 -
1732 -#include <stddef.h>
1733 -#include <stdlib.h>
1734 -
1735 -
1736 -
1737 -/* This function implements the Boyer-Moore algorithm.
1738 - It is assumed that chars have eight bits. */
1739 -void *memmem(const void *haystack, const size_t haystack_len,
1740 - const void *needle, const size_t needle_len)
1741 -{
1742 - const unsigned char *const haystack_endptr =
1743 - (const unsigned char *) haystack + haystack_len;
1744 - const unsigned char *const needle_endptr =
1745 - (const unsigned char *) needle + needle_len;
1746 - const unsigned char *haystack_shifting_ptr;
1747 -
1748 - size_t *shift_good_suffix;
1749 - size_t shift_last_occurrence[256];
1750 -
1751 -
1752 -printf("memmem called\n");
1753 - if (needle_len > haystack_len)
1754 - return 0;
1755 -
1756 - haystack_shifting_ptr = (const unsigned char *) haystack + needle_len;
1757 -
1758 -
1759 - /* Compute good suffix function. */
1760 - shift_good_suffix = (size_t*)malloc(2 * needle_len * sizeof *shift_good_suffix);
1761 - if (shift_good_suffix != 0) {
1762 - const unsigned char *needle_ptr;
1763 - size_t i, j;
1764 -
1765 - shift_good_suffix[0] = 0;
1766 - needle_ptr = (const unsigned char *) needle + 1;
1767 - for (i = 1, j = 0; i < needle_len; ++i) {
1768 - while (j > 0
1769 - && ((const unsigned char *) needle)[j] != *needle_ptr)
1770 - j = shift_good_suffix[j - 1];
1771 - if (((const unsigned char *) needle)[j] == *needle_ptr)
1772 - ++j;
1773 - shift_good_suffix[i] = j;
1774 - ++needle_ptr;
1775 - }
1776 -
1777 - shift_good_suffix[needle_len] = 0;
1778 - needle_ptr = (const unsigned char *) needle + needle_len - 1;
1779 - for (i = 1, j = 0; i < needle_len; ++i) {
1780 - --needle_ptr;
1781 - while (j > 0
1782 - && ((const unsigned char *) needle)[needle_len - 1 -
1783 - j] != *needle_ptr)
1784 - j = shift_good_suffix[needle_len - 1 + j];
1785 - if (((const unsigned char *) needle)[needle_len - 1 - j] ==
1786 - *needle_ptr)
1787 - ++j;
1788 - shift_good_suffix[needle_len + i] = j;
1789 - }
1790 -
1791 - for (i = 0; i < needle_len; ++i)
1792 - shift_good_suffix[i] = needle_len - shift_good_suffix[i];
1793 -
1794 - for (i = 0; i < needle_len; ++i) {
1795 - j = needle_len - 1 - shift_good_suffix[needle_len + i];
1796 - if (shift_good_suffix[j] >
1797 - i + 1 - shift_good_suffix[needle_len + i])
1798 - shift_good_suffix[j] =
1799 - i + 1 - shift_good_suffix[needle_len + i];
1800 - }
1801 - }
1802 -
1803 -
1804 - /* Compute last occurence function. */
1805 - {
1806 - const unsigned char *needle_ptr = (const unsigned char *)needle;
1807 - size_t i;
1808 -
1809 - for (i = 0; i < 256; ++i)
1810 - shift_last_occurrence[i] = 0;
1811 - for (i = 0; i < needle_len; ++i)
1812 - shift_last_occurrence[*needle_ptr++] = i + 1;
1813 - }
1814 -
1815 -
1816 - /* Matching algorithm. */
1817 - while (haystack_shifting_ptr <= haystack_endptr) {
1818 - const unsigned char *haystack_ptr = haystack_shifting_ptr;
1819 - const unsigned char *needle_ptr = needle_endptr;
1820 - size_t len = needle_len;
1821 -
1822 - while (len > 0 && *--haystack_ptr == *--needle_ptr)
1823 - --len;
1824 -
1825 - if (len == 0) {
1826 - if (shift_good_suffix != 0)
1827 - free(shift_good_suffix);
1828 - return (void *) haystack_ptr;
1829 - }
1830 -
1831 - {
1832 - const size_t shift1 =
1833 - shift_good_suffix != 0 ? shift_good_suffix[len - 1] : 1;
1834 - const size_t shift2 =
1835 - (len > shift_last_occurrence[*haystack_ptr]
1836 - ? len - shift_last_occurrence[*haystack_ptr] : 1);
1837 -
1838 - haystack_shifting_ptr += shift1 > shift2 ? shift1 : shift2;
1839 - }
1840 - }
1841 -
1842 -
1843 - if (shift_good_suffix != 0)
1844 - free(shift_good_suffix);
1845 -printf("memmem exited\n");
1846 - return 0;
1847 -}
1848 diff -Naur mplayerplug-in-3.55/include/CVS/Entries mplayerplug-in.tpg/include/CVS/Entries
1849 --- mplayerplug-in-3.55/include/CVS/Entries 2007-09-21 22:39:34.000000000 +0200
1850 +++ mplayerplug-in.tpg/include/CVS/Entries 2009-09-08 23:54:24.000000000 +0200
1851 @@ -1,3 +1,4 @@
1852 -/npplat.h/1.1.1.1/Mon Sep 11 19:32:07 2006//
1853 -/pluginbase.h/1.1.1.1/Mon Sep 11 19:32:07 2006//
1854 +/npplat.h/1.1.1.1/Thu Feb 5 00:34:46 2004//
1855 +/npupp.h/1.1/Fri Apr 3 15:39:48 2009//
1856 +/pluginbase.h/1.1.1.1/Thu Feb 5 00:34:46 2004//
1857 D
1858 diff -Naur mplayerplug-in-3.55/include/CVS/Root mplayerplug-in.tpg/include/CVS/Root
1859 --- mplayerplug-in-3.55/include/CVS/Root 2006-09-11 21:32:07.000000000 +0200
1860 +++ mplayerplug-in.tpg/include/CVS/Root 2009-09-08 23:54:24.000000000 +0200
1861 @@ -1 +1 @@
1862 -:ext:kdekorte@mplayerplug-in.cvs.sourceforge.net/cvsroot/mplayerplug-in
1863 +:pserver:anonymous@mplayerplug-in.cvs.sourceforge.net:/cvsroot/mplayerplug-in
1864 diff -Naur mplayerplug-in-3.55/include/npupp.h mplayerplug-in.tpg/include/npupp.h
1865 --- mplayerplug-in-3.55/include/npupp.h 1970-01-01 01:00:00.000000000 +0100
1866 +++ mplayerplug-in.tpg/include/npupp.h 2009-04-03 17:39:48.000000000 +0200
1867 @@ -0,0 +1,727 @@
1868 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1869 +/* ***** BEGIN LICENSE BLOCK *****
1870 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1871 + *
1872 + * The contents of this file are subject to the Mozilla Public License Version
1873 + * 1.1 (the "License"); you may not use this file except in compliance with
1874 + * the License. You may obtain a copy of the License at
1875 + * http://www.mozilla.org/MPL/
1876 + *
1877 + * Software distributed under the License is distributed on an "AS IS" basis,
1878 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1879 + * for the specific language governing rights and limitations under the
1880 + * License.
1881 + *
1882 + * The Original Code is mozilla.org code.
1883 + *
1884 + * The Initial Developer of the Original Code is
1885 + * Netscape Communications Corporation.
1886 + * Portions created by the Initial Developer are Copyright (C) 1998
1887 + * the Initial Developer. All Rights Reserved.
1888 + *
1889 + * Contributor(s):
1890 + *
1891 + * Alternatively, the contents of this file may be used under the terms of
1892 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1893 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1894 + * in which case the provisions of the GPL or the LGPL are applicable instead
1895 + * of those above. If you wish to allow use of your version of this file only
1896 + * under the terms of either the GPL or the LGPL, and not to allow others to
1897 + * use your version of this file under the terms of the MPL, indicate your
1898 + * decision by deleting the provisions above and replace them with the notice
1899 + * and other provisions required by the GPL or the LGPL. If you do not delete
1900 + * the provisions above, a recipient may use your version of this file under
1901 + * the terms of any one of the MPL, the GPL or the LGPL.
1902 + *
1903 + * ***** END LICENSE BLOCK ***** */
1904 +
1905 +
1906 +/*
1907 + * npupp.h $Revision: 1.1 $
1908 + * function call mecahnics needed by platform specific glue code.
1909 + */
1910 +
1911 +
1912 +#ifndef _NPUPP_H_
1913 +#define _NPUPP_H_
1914 +
1915 +#if defined(__OS2__)
1916 +#pragma pack(1)
1917 +#endif
1918 +
1919 +#ifndef GENERATINGCFM
1920 +#define GENERATINGCFM 0
1921 +#endif
1922 +
1923 +#ifndef _NPAPI_H_
1924 +#include "npapi.h"
1925 +#endif
1926 +
1927 +#include "npruntime.h"
1928 +
1929 +#include "jri.h"
1930 +
1931 +
1932 +/******************************************************************************************
1933 + plug-in function table macros
1934 + for each function in and out of the plugin API we define
1935 + typedef NPP_FooUPP
1936 + #define NewNPP_FooProc
1937 + #define CallNPP_FooProc
1938 + *******************************************************************************************/
1939 +
1940 +
1941 +/* NPP_Initialize */
1942 +typedef void (*NP_LOADDS NPP_InitializeUPP) (void);
1943 +#define NewNPP_InitializeProc(FUNC) \
1944 + ((NPP_InitializeUPP) (FUNC))
1945 +#define CallNPP_InitializeProc(FUNC) \
1946 + (*(FUNC))()
1947 +
1948 +/* NPP_Shutdown */
1949 +typedef void (*NP_LOADDS NPP_ShutdownUPP) (void);
1950 +#define NewNPP_ShutdownProc(FUNC) \
1951 + ((NPP_ShutdownUPP) (FUNC))
1952 +#define CallNPP_ShutdownProc(FUNC) \
1953 + (*(FUNC))()
1954 +
1955 +/* NPP_New */
1956 +typedef NPError(*NP_LOADDS NPP_NewUPP) (NPMIMEType pluginType, NPP instance, uint16 mode,
1957 + int16 argc, char *argn[], char *argv[],
1958 + NPSavedData * saved);
1959 +#define NewNPP_NewProc(FUNC) \
1960 + ((NPP_NewUPP) (FUNC))
1961 +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
1962 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
1963 +
1964 +/* NPP_Destroy */
1965 +typedef NPError(*NP_LOADDS NPP_DestroyUPP) (NPP instance, NPSavedData ** save);
1966 +#define NewNPP_DestroyProc(FUNC) \
1967 + ((NPP_DestroyUPP) (FUNC))
1968 +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \
1969 + (*(FUNC))((ARG1), (ARG2))
1970 +
1971 +/* NPP_SetWindow */
1972 +typedef NPError(*NP_LOADDS NPP_SetWindowUPP) (NPP instance, NPWindow * window);
1973 +#define NewNPP_SetWindowProc(FUNC) \
1974 + ((NPP_SetWindowUPP) (FUNC))
1975 +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \
1976 + (*(FUNC))((ARG1), (ARG2))
1977 +
1978 +/* NPP_NewStream */
1979 +typedef NPError(*NP_LOADDS NPP_NewStreamUPP) (NPP instance, NPMIMEType type, NPStream * stream,
1980 + NPBool seekable, uint16 * stype);
1981 +#define NewNPP_NewStreamProc(FUNC) \
1982 + ((NPP_NewStreamUPP) (FUNC))
1983 +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
1984 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
1985 +
1986 +/* NPP_DestroyStream */
1987 +typedef NPError(*NP_LOADDS NPP_DestroyStreamUPP) (NPP instance, NPStream * stream, NPReason reason);
1988 +#define NewNPP_DestroyStreamProc(FUNC) \
1989 + ((NPP_DestroyStreamUPP) (FUNC))
1990 +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \
1991 + (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg))
1992 +
1993 +/* NPP_WriteReady */
1994 +typedef int32(*NP_LOADDS NPP_WriteReadyUPP) (NPP instance, NPStream * stream);
1995 +#define NewNPP_WriteReadyProc(FUNC) \
1996 + ((NPP_WriteReadyUPP) (FUNC))
1997 +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \
1998 + (*(FUNC))((NPParg), (NPStreamPtr))
1999 +
2000 +/* NPP_Write */
2001 +typedef int32(*NP_LOADDS NPP_WriteUPP) (NPP instance, NPStream * stream, int32 offset, int32 len,
2002 + void *buffer);
2003 +#define NewNPP_WriteProc(FUNC) \
2004 + ((NPP_WriteUPP) (FUNC))
2005 +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \
2006 + (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))
2007 +
2008 +/* NPP_StreamAsFile */
2009 +typedef void (*NP_LOADDS NPP_StreamAsFileUPP) (NPP instance, NPStream * stream, const char *fname);
2010 +#define NewNPP_StreamAsFileProc(FUNC) \
2011 + ((NPP_StreamAsFileUPP) (FUNC))
2012 +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \
2013 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2014 +
2015 +/* NPP_Print */
2016 +typedef void (*NP_LOADDS NPP_PrintUPP) (NPP instance, NPPrint * platformPrint);
2017 +#define NewNPP_PrintProc(FUNC) \
2018 + ((NPP_PrintUPP) (FUNC))
2019 +#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \
2020 + (*(FUNC))((NPParg), (NPPrintArg))
2021 +
2022 +/* NPP_HandleEvent */
2023 +typedef int16(*NP_LOADDS NPP_HandleEventUPP) (NPP instance, void *event);
2024 +#define NewNPP_HandleEventProc(FUNC) \
2025 + ((NPP_HandleEventUPP) (FUNC))
2026 +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \
2027 + (*(FUNC))((NPParg), (voidPtr))
2028 +
2029 +/* NPP_URLNotify */
2030 +typedef void (*NP_LOADDS NPP_URLNotifyUPP) (NPP instance, const char *url, NPReason reason,
2031 + void *notifyData);
2032 +#define NewNPP_URLNotifyProc(FUNC) \
2033 + ((NPP_URLNotifyUPP) (FUNC))
2034 +#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2035 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2036 +
2037 +/* NPP_GetValue */
2038 +typedef NPError(*NP_LOADDS NPP_GetValueUPP) (NPP instance, NPPVariable variable, void *ret_alue);
2039 +#define NewNPP_GetValueProc(FUNC) \
2040 + ((NPP_GetValueUPP) (FUNC))
2041 +#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \
2042 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2043 +
2044 +/* NPP_SetValue */
2045 +typedef NPError(*NP_LOADDS NPP_SetValueUPP) (NPP instance, NPNVariable variable, void *ret_alue);
2046 +#define NewNPP_SetValueProc(FUNC) \
2047 + ((NPP_SetValueUPP) (FUNC))
2048 +#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \
2049 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2050 +
2051 +/*
2052 + * Netscape entry points
2053 + */
2054 +
2055 +
2056 +/* NPN_GetValue */
2057 +typedef NPError(*NP_LOADDS NPN_GetValueUPP) (NPP instance, NPNVariable variable, void *ret_alue);
2058 +#define NewNPN_GetValueProc(FUNC) \
2059 + ((NPN_GetValueUPP) (FUNC))
2060 +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \
2061 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2062 +
2063 +/* NPN_SetValue */
2064 +typedef NPError(*NP_LOADDS NPN_SetValueUPP) (NPP instance, NPPVariable variable, void *ret_alue);
2065 +#define NewNPN_SetValueProc(FUNC) \
2066 + ((NPN_SetValueUPP) (FUNC))
2067 +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \
2068 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2069 +
2070 +/* NPN_GetUrlNotify */
2071 +typedef NPError(*NP_LOADDS NPN_GetURLNotifyUPP) (NPP instance, const char *url, const char *window,
2072 + void *notifyData);
2073 +#define NewNPN_GetURLNotifyProc(FUNC) \
2074 + ((NPN_GetURLNotifyUPP) (FUNC))
2075 +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2076 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2077 +
2078 +/* NPN_PostUrlNotify */
2079 +typedef NPError(*NP_LOADDS NPN_PostURLNotifyUPP) (NPP instance, const char *url, const char *window,
2080 + uint32 len, const char *buf, NPBool file,
2081 + void *notifyData);
2082 +#define NewNPN_PostURLNotifyProc(FUNC) \
2083 + ((NPN_PostURLNotifyUPP) (FUNC))
2084 +#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
2085 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
2086 +
2087 +/* NPN_GetUrl */
2088 +typedef NPError(*NP_LOADDS NPN_GetURLUPP) (NPP instance, const char *url, const char *window);
2089 +#define NewNPN_GetURLProc(FUNC) \
2090 + ((NPN_GetURLUPP) (FUNC))
2091 +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
2092 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2093 +
2094 +/* NPN_PostUrl */
2095 +typedef NPError(*NP_LOADDS NPN_PostURLUPP) (NPP instance, const char *url, const char *window,
2096 + uint32 len, const char *buf, NPBool file);
2097 +#define NewNPN_PostURLProc(FUNC) \
2098 + ((NPN_PostURLUPP) (FUNC))
2099 +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
2100 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
2101 +
2102 +/* NPN_RequestRead */
2103 +typedef NPError(*NP_LOADDS NPN_RequestReadUPP) (NPStream * stream, NPByteRange * rangeList);
2104 +#define NewNPN_RequestReadProc(FUNC) \
2105 + ((NPN_RequestReadUPP) (FUNC))
2106 +#define CallNPN_RequestReadProc(FUNC, stream, range) \
2107 + (*(FUNC))((stream), (range))
2108 +
2109 +/* NPN_NewStream */
2110 +typedef NPError(*NP_LOADDS NPN_NewStreamUPP) (NPP instance, NPMIMEType type, const char *window,
2111 + NPStream ** stream);
2112 +#define NewNPN_NewStreamProc(FUNC) \
2113 + ((NPN_NewStreamUPP) (FUNC))
2114 +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \
2115 + (*(FUNC))((npp), (type), (window), (stream))
2116 +
2117 +/* NPN_Write */
2118 +typedef int32(*NP_LOADDS NPN_WriteUPP) (NPP instance, NPStream * stream, int32 len, void *buffer);
2119 +#define NewNPN_WriteProc(FUNC) \
2120 + ((NPN_WriteUPP) (FUNC))
2121 +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \
2122 + (*(FUNC))((npp), (stream), (len), (buffer))
2123 +
2124 +/* NPN_DestroyStream */
2125 +typedef NPError(*NP_LOADDS NPN_DestroyStreamUPP) (NPP instance, NPStream * stream, NPReason reason);
2126 +#define NewNPN_DestroyStreamProc(FUNC) \
2127 + ((NPN_DestroyStreamUPP) (FUNC))
2128 +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \
2129 + (*(FUNC))((npp), (stream), (reason))
2130 +
2131 +/* NPN_Status */
2132 +typedef void (*NP_LOADDS NPN_StatusUPP) (NPP instance, const char *message);
2133 +#define NewNPN_StatusProc(FUNC) \
2134 + ((NPN_StatusUPP) (FUNC))
2135 +#define CallNPN_StatusProc(FUNC, npp, msg) \
2136 + (*(FUNC))((npp), (msg))
2137 +
2138 +/* NPN_UserAgent */
2139 +typedef const char *(*NP_LOADDS NPN_UserAgentUPP) (NPP instance);
2140 +#define NewNPN_UserAgentProc(FUNC) \
2141 + ((NPN_UserAgentUPP) (FUNC))
2142 +#define CallNPN_UserAgentProc(FUNC, ARG1) \
2143 + (*(FUNC))((ARG1))
2144 +
2145 +/* NPN_MemAlloc */
2146 +typedef void *(*NP_LOADDS NPN_MemAllocUPP) (uint32 size);
2147 +#define NewNPN_MemAllocProc(FUNC) \
2148 + ((NPN_MemAllocUPP) (FUNC))
2149 +#define CallNPN_MemAllocProc(FUNC, ARG1) \
2150 + (*(FUNC))((ARG1))
2151 +
2152 +/* NPN__MemFree */
2153 +typedef void (*NP_LOADDS NPN_MemFreeUPP) (void *ptr);
2154 +#define NewNPN_MemFreeProc(FUNC) \
2155 + ((NPN_MemFreeUPP) (FUNC))
2156 +#define CallNPN_MemFreeProc(FUNC, ARG1) \
2157 + (*(FUNC))((ARG1))
2158 +
2159 +/* NPN_MemFlush */
2160 +typedef uint32(*NP_LOADDS NPN_MemFlushUPP) (uint32 size);
2161 +#define NewNPN_MemFlushProc(FUNC) \
2162 + ((NPN_MemFlushUPP) (FUNC))
2163 +#define CallNPN_MemFlushProc(FUNC, ARG1) \
2164 + (*(FUNC))((ARG1))
2165 +
2166 +/* NPN_ReloadPlugins */
2167 +typedef void (*NP_LOADDS NPN_ReloadPluginsUPP) (NPBool reloadPages);
2168 +#define NewNPN_ReloadPluginsProc(FUNC) \
2169 + ((NPN_ReloadPluginsUPP) (FUNC))
2170 +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \
2171 + (*(FUNC))((ARG1))
2172 +
2173 +/* NPN_GetJavaEnv */
2174 +typedef JRIEnv *(*NP_LOADDS NPN_GetJavaEnvUPP) (void);
2175 +#define NewNPN_GetJavaEnvProc(FUNC) \
2176 + ((NPN_GetJavaEnvUPP) (FUNC))
2177 +#define CallNPN_GetJavaEnvProc(FUNC) \
2178 + (*(FUNC))()
2179 +
2180 +/* NPN_GetJavaPeer */
2181 +typedef jref(*NP_LOADDS NPN_GetJavaPeerUPP) (NPP instance);
2182 +#define NewNPN_GetJavaPeerProc(FUNC) \
2183 + ((NPN_GetJavaPeerUPP) (FUNC))
2184 +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \
2185 + (*(FUNC))((ARG1))
2186 +
2187 +/* NPN_InvalidateRect */
2188 +typedef void (*NP_LOADDS NPN_InvalidateRectUPP) (NPP instance, NPRect * rect);
2189 +#define NewNPN_InvalidateRectProc(FUNC) \
2190 + ((NPN_InvalidateRectUPP) (FUNC))
2191 +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \
2192 + (*(FUNC))((ARG1), (ARG2))
2193 +
2194 +/* NPN_InvalidateRegion */
2195 +typedef void (*NP_LOADDS NPN_InvalidateRegionUPP) (NPP instance, NPRegion region);
2196 +#define NewNPN_InvalidateRegionProc(FUNC) \
2197 + ((NPN_InvalidateRegionUPP) (FUNC))
2198 +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \
2199 + (*(FUNC))((ARG1), (ARG2))
2200 +
2201 +/* NPN_ForceRedraw */
2202 +typedef void (*NP_LOADDS NPN_ForceRedrawUPP) (NPP instance);
2203 +#define NewNPN_ForceRedrawProc(FUNC) \
2204 + ((NPN_ForceRedrawUPP) (FUNC))
2205 +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \
2206 + (*(FUNC))((ARG1))
2207 +
2208 +/* NPN_GetStringIdentifier */
2209 +typedef NPIdentifier(*NP_LOADDS NPN_GetStringIdentifierUPP) (const NPUTF8 * name);
2210 +#define NewNPN_GetStringIdentifierProc(FUNC) \
2211 + ((NPN_GetStringIdentifierUPP) (FUNC))
2212 +#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \
2213 + (*(FUNC))((ARG1))
2214 +
2215 +/* NPN_GetStringIdentifiers */
2216 +typedef void (*NP_LOADDS NPN_GetStringIdentifiersUPP) (const NPUTF8 ** names,
2217 + int32_t nameCount,
2218 + NPIdentifier * identifiers);
2219 +#define NewNPN_GetStringIdentifiersProc(FUNC) \
2220 + ((NPN_GetStringIdentifiersUPP) (FUNC))
2221 +#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \
2222 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2223 +
2224 +/* NPN_GetIntIdentifier */
2225 +typedef NPIdentifier(*NP_LOADDS NPN_GetIntIdentifierUPP) (int32_t intid);
2226 +#define NewNPN_GetIntIdentifierProc(FUNC) \
2227 + ((NPN_GetIntIdentifierUPP) (FUNC))
2228 +#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \
2229 + (*(FUNC))((ARG1))
2230 +
2231 +/* NPN_IdentifierIsString */
2232 +typedef bool(*NP_LOADDS NPN_IdentifierIsStringUPP) (NPIdentifier identifier);
2233 +#define NewNPN_IdentifierIsStringProc(FUNC) \
2234 + ((NPN_IdentifierIsStringUPP) (FUNC))
2235 +#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \
2236 + (*(FUNC))((ARG1))
2237 +
2238 +/* NPN_UTF8FromIdentifier */
2239 +typedef NPUTF8 *(*NP_LOADDS NPN_UTF8FromIdentifierUPP) (NPIdentifier identifier);
2240 +#define NewNPN_UTF8FromIdentifierProc(FUNC) \
2241 + ((NPN_UTF8FromIdentifierUPP) (FUNC))
2242 +#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \
2243 + (*(FUNC))((ARG1))
2244 +
2245 +/* NPN_IntFromIdentifier */
2246 +typedef int32_t(*NP_LOADDS NPN_IntFromIdentifierUPP) (NPIdentifier identifier);
2247 +#define NewNPN_IntFromIdentifierProc(FUNC) \
2248 + ((NPN_IntFromIdentifierUPP) (FUNC))
2249 +#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \
2250 + (*(FUNC))((ARG1))
2251 +
2252 +/* NPN_CreateObject */
2253 +typedef NPObject *(*NP_LOADDS NPN_CreateObjectUPP) (NPP npp, NPClass * aClass);
2254 +#define NewNPN_CreateObjectProc(FUNC) \
2255 + ((NPN_CreateObjectUPP) (FUNC))
2256 +#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \
2257 + (*(FUNC))((ARG1), (ARG2))
2258 +
2259 +/* NPN_RetainObject */
2260 +typedef NPObject *(*NP_LOADDS NPN_RetainObjectUPP) (NPObject * obj);
2261 +#define NewNPN_RetainObjectProc(FUNC) \
2262 + ((NPN_RetainObjectUPP) (FUNC))
2263 +#define CallNPN_RetainObjectProc(FUNC, ARG1) \
2264 + (*(FUNC))((ARG1))
2265 +
2266 +/* NPN_ReleaseObject */
2267 +typedef void (*NP_LOADDS NPN_ReleaseObjectUPP) (NPObject * obj);
2268 +#define NewNPN_ReleaseObjectProc(FUNC) \
2269 + ((NPN_ReleaseObjectUPP) (FUNC))
2270 +#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \
2271 + (*(FUNC))((ARG1))
2272 +
2273 +/* NPN_Invoke */
2274 +typedef bool(*NP_LOADDS NPN_InvokeUPP) (NPP npp, NPObject * obj, NPIdentifier methodName,
2275 + const NPVariant * args, uint32_t argCount,
2276 + NPVariant * result);
2277 +#define NewNPN_InvokeProc(FUNC) \
2278 + ((NPN_InvokeUPP) (FUNC))
2279 +#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
2280 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
2281 +
2282 +/* NPN_InvokeDefault */
2283 +typedef bool(*NP_LOADDS NPN_InvokeDefaultUPP) (NPP npp, NPObject * obj, const NPVariant * args,
2284 + uint32_t argCount, NPVariant * result);
2285 +#define NewNPN_InvokeDefaultProc(FUNC) \
2286 + ((NPN_InvokeDefaultUPP) (FUNC))
2287 +#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
2288 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
2289 +
2290 +/* NPN_Evaluate */
2291 +typedef bool(*NP_LOADDS NPN_EvaluateUPP) (NPP npp, NPObject * obj, NPString * script,
2292 + NPVariant * result);
2293 +#define NewNPN_EvaluateProc(FUNC) \
2294 + ((NPN_EvaluateUPP) (FUNC))
2295 +#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2296 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2297 +
2298 +/* NPN_GetProperty */
2299 +typedef bool(*NP_LOADDS NPN_GetPropertyUPP) (NPP npp, NPObject * obj, NPIdentifier propertyName,
2300 + NPVariant * result);
2301 +#define NewNPN_GetPropertyProc(FUNC) \
2302 + ((NPN_GetPropertyUPP) (FUNC))
2303 +#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2304 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2305 +
2306 +/* NPN_SetProperty */
2307 +typedef bool(*NP_LOADDS NPN_SetPropertyUPP) (NPP npp, NPObject * obj, NPIdentifier propertyName,
2308 + const NPVariant * value);
2309 +#define NewNPN_SetPropertyProc(FUNC) \
2310 + ((NPN_SetPropertyUPP) (FUNC))
2311 +#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2312 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2313 +
2314 +/* NPN_RemoveProperty */
2315 +typedef bool(*NP_LOADDS NPN_RemovePropertyUPP) (NPP npp, NPObject * obj, NPIdentifier propertyName);
2316 +#define NewNPN_RemovePropertyProc(FUNC) \
2317 + ((NPN_RemovePropertyUPP) (FUNC))
2318 +#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \
2319 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2320 +
2321 +/* NPN_HasProperty */
2322 +typedef bool(*NP_LOADDS NPN_HasPropertyUPP) (NPP npp, NPObject * obj, NPIdentifier propertyName);
2323 +#define NewNPN_HasPropertyProc(FUNC) \
2324 + ((NPN_HasPropertyUPP) (FUNC))
2325 +#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \
2326 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2327 +
2328 +/* NPN_HasMethod */
2329 +typedef bool(*NP_LOADDS NPN_HasMethodUPP) (NPP npp, NPObject * obj, NPIdentifier propertyName);
2330 +#define NewNPN_HasMethodProc(FUNC) \
2331 + ((NPN_HasMethodUPP) (FUNC))
2332 +#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \
2333 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2334 +
2335 +/* NPN_ReleaseVariantValue */
2336 +typedef void (*NP_LOADDS NPN_ReleaseVariantValueUPP) (NPVariant * variant);
2337 +#define NewNPN_ReleaseVariantValueProc(FUNC) \
2338 + ((NPN_ReleaseVariantValueUPP) (FUNC))
2339 +#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \
2340 + (*(FUNC))((ARG1))
2341 +
2342 +/* NPN_SetException */
2343 +typedef void (*NP_LOADDS NPN_SetExceptionUPP) (NPObject * obj, const NPUTF8 * message);
2344 +#define NewNPN_SetExceptionProc(FUNC) \
2345 + ((NPN_SetExceptionUPP) (FUNC))
2346 +#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \
2347 + (*(FUNC))((ARG1), (ARG2))
2348 +
2349 +/* NPN_PushPopupsEnabledStateUPP */
2350 +typedef bool(*NP_LOADDS NPN_PushPopupsEnabledStateUPP) (NPP npp, NPBool enabled);
2351 +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \
2352 + ((NPN_PushPopupsEnabledStateUPP) (FUNC))
2353 +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \
2354 + (*(FUNC))((ARG1), (ARG2))
2355 +
2356 +/* NPN_PopPopupsEnabledState */
2357 +typedef bool(*NP_LOADDS NPN_PopPopupsEnabledStateUPP) (NPP npp);
2358 +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \
2359 + ((NPN_PopPopupsEnabledStateUPP) (FUNC))
2360 +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \
2361 + (*(FUNC))((ARG1))
2362 +
2363 +/* NPN_Enumerate */
2364 +typedef bool(*NP_LOADDS NPN_EnumerateUPP) (NPP npp, NPObject * obj, NPIdentifier ** identifier,
2365 + uint32_t * count);
2366 +#define NewNPN_EnumerateProc(FUNC) \
2367 + ((NPN_EnumerateUPP) (FUNC))
2368 +#define CallNPN_EnumerateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
2369 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
2370 +
2371 +/* NPN_PluginThreadAsyncCall */
2372 +typedef void (*NP_LOADDS NPN_PluginThreadAsyncCallUPP) (NPP instance, void (*func) (void *),
2373 + void *userData);
2374 +#define NewNPN_PluginThreadAsyncCallProc(FUNC) \
2375 + ((NPN_PluginThreadAsyncCallUPP) (FUNC))
2376 +#define CallNPN_PluginThreadAsyncCallProc(FUNC, ARG1, ARG2, ARG3) \
2377 + (*(FUNC))((ARG1), (ARG2), (ARG3))
2378 +
2379 +/* NPN_Construct */
2380 +typedef bool(*NP_LOADDS NPN_ConstructUPP) (NPP npp, NPObject * obj, const NPVariant * args,
2381 + uint32_t argCount, NPVariant * result);
2382 +#define NewNPN_ConstructProc(FUNC) \
2383 + ((NPN_ConstructUPP) (FUNC))
2384 +#define CallNPN_ConstructProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
2385 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
2386 +
2387 +
2388 +
2389 +/******************************************************************************************
2390 + * The actual plugin function table definitions
2391 + *******************************************************************************************/
2392 +
2393 +typedef struct _NPPluginFuncs {
2394 + uint16 size;
2395 + uint16 version;
2396 + NPP_NewUPP newp;
2397 + NPP_DestroyUPP destroy;
2398 + NPP_SetWindowUPP setwindow;
2399 + NPP_NewStreamUPP newstream;
2400 + NPP_DestroyStreamUPP destroystream;
2401 + NPP_StreamAsFileUPP asfile;
2402 + NPP_WriteReadyUPP writeready;
2403 + NPP_WriteUPP write;
2404 + NPP_PrintUPP print;
2405 + NPP_HandleEventUPP event;
2406 + NPP_URLNotifyUPP urlnotify;
2407 + JRIGlobalRef javaClass;
2408 + NPP_GetValueUPP getvalue;
2409 + NPP_SetValueUPP setvalue;
2410 +} NPPluginFuncs;
2411 +
2412 +typedef struct _NPNetscapeFuncs {
2413 + uint16 size;
2414 + uint16 version;
2415 + NPN_GetURLUPP geturl;
2416 + NPN_PostURLUPP posturl;
2417 + NPN_RequestReadUPP requestread;
2418 + NPN_NewStreamUPP newstream;
2419 + NPN_WriteUPP write;
2420 + NPN_DestroyStreamUPP destroystream;
2421 + NPN_StatusUPP status;
2422 + NPN_UserAgentUPP uagent;
2423 + NPN_MemAllocUPP memalloc;
2424 + NPN_MemFreeUPP memfree;
2425 + NPN_MemFlushUPP memflush;
2426 + NPN_ReloadPluginsUPP reloadplugins;
2427 + NPN_GetJavaEnvUPP getJavaEnv;
2428 + NPN_GetJavaPeerUPP getJavaPeer;
2429 + NPN_GetURLNotifyUPP geturlnotify;
2430 + NPN_PostURLNotifyUPP posturlnotify;
2431 + NPN_GetValueUPP getvalue;
2432 + NPN_SetValueUPP setvalue;
2433 + NPN_InvalidateRectUPP invalidaterect;
2434 + NPN_InvalidateRegionUPP invalidateregion;
2435 + NPN_ForceRedrawUPP forceredraw;
2436 + NPN_GetStringIdentifierUPP getstringidentifier;
2437 + NPN_GetStringIdentifiersUPP getstringidentifiers;
2438 + NPN_GetIntIdentifierUPP getintidentifier;
2439 + NPN_IdentifierIsStringUPP identifierisstring;
2440 + NPN_UTF8FromIdentifierUPP utf8fromidentifier;
2441 + NPN_IntFromIdentifierUPP intfromidentifier;
2442 + NPN_CreateObjectUPP createobject;
2443 + NPN_RetainObjectUPP retainobject;
2444 + NPN_ReleaseObjectUPP releaseobject;
2445 + NPN_InvokeUPP invoke;
2446 + NPN_InvokeDefaultUPP invokeDefault;
2447 + NPN_EvaluateUPP evaluate;
2448 + NPN_GetPropertyUPP getproperty;
2449 + NPN_SetPropertyUPP setproperty;
2450 + NPN_RemovePropertyUPP removeproperty;
2451 + NPN_HasPropertyUPP hasproperty;
2452 + NPN_HasMethodUPP hasmethod;
2453 + NPN_ReleaseVariantValueUPP releasevariantvalue;
2454 + NPN_SetExceptionUPP setexception;
2455 + NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate;
2456 + NPN_PopPopupsEnabledStateUPP poppopupsenabledstate;
2457 + // NPN_EnumerateUPP enumerate;
2458 + // NPN_PluginThreadAsyncCallUPP pluginthreadasynccall;
2459 + // NPN_ConstructUPP construct;
2460 +} NPNetscapeFuncs;
2461 +
2462 +
2463 +#ifdef XP_MACOSX
2464 +/******************************************************************************************
2465 + * Mac platform-specific plugin glue stuff
2466 + *******************************************************************************************/
2467 +
2468 +/*
2469 + * Main entry point of the plugin.
2470 + * This routine will be called when the plugin is loaded. The function
2471 + * tables are passed in and the plugin fills in the NPPluginFuncs table
2472 + * and NPPShutdownUPP for Netscape's use.
2473 + */
2474 +typedef NPError(*NP_LOADDS NPP_MainEntryUPP) (NPNetscapeFuncs *, NPPluginFuncs *,
2475 + NPP_ShutdownUPP *);
2476 +#define NewNPP_MainEntryProc(FUNC) \
2477 + ((NPP_MainEntryUPP) (FUNC))
2478 +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \
2479 + (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))
2480 +
2481 +/*
2482 + * Mac OS X version(s) of NP_GetMIMEDescription(const char *)
2483 + * These can be called to retreive MIME information from the plugin dynamically
2484 + *
2485 + * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
2486 + * to get mime info from the plugin only on OSX and may not be supported
2487 + * in furture version -- use NP_GetMIMEDescription instead
2488 + */
2489 +
2490 +enum {
2491 + kBPSupportedMIMETypesStructVers_1 = 1
2492 +};
2493 +
2494 +typedef struct _BPSupportedMIMETypes {
2495 + SInt32 structVersion; /* struct version */
2496 + Handle typeStrings; /* STR# formated handle, allocated by plug-in */
2497 + Handle infoStrings; /* STR# formated handle, allocated by plug-in */
2498 +} BPSupportedMIMETypes;
2499 +OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes * mimeInfo, UInt32 flags);
2500 +
2501 + /* NP_GetMIMEDescription */
2502 +#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
2503 +typedef const char *(*NP_LOADDS NP_GetMIMEDescriptionUPP) ();
2504 +#define NewNP_GetMIMEDescEntryProc(FUNC) \
2505 + ((NP_GetMIMEDescriptionUPP) (FUNC))
2506 +#define CallNP_GetMIMEDescEntryProc(FUNC) \
2507 + (*(FUNC))()
2508 +
2509 +/* BP_GetSupportedMIMETypes */
2510 +typedef OSErr(*NP_LOADDS BP_GetSupportedMIMETypesUPP) (BPSupportedMIMETypes *, UInt32);
2511 +#define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \
2512 + ((BP_GetSupportedMIMETypesUPP) (FUNC))
2513 +#define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \
2514 + (*(FUNC))((mimeInfo), (flags))
2515 +
2516 +#endif /* XP_MACOSX */
2517 +
2518 +#if defined(_WINDOWS)
2519 +#define OSCALL WINAPI
2520 +#else
2521 +#if defined(__OS2__)
2522 +#define OSCALL _System
2523 +#else
2524 +#define OSCALL
2525 +#endif
2526 +#endif
2527 +
2528 +#if defined(XP_UNIX)
2529 +/* GCC 3.3 and later support the visibility attribute. */
2530 +#if defined(__GNUC__) && \
2531 + ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
2532 +#define NP_VISIBILITY_DEFAULT __attribute__((visibility("default")))
2533 +#else
2534 +#define NP_VISIBILITY_DEFAULT
2535 +#endif
2536 +
2537 +#define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type
2538 +#endif
2539 +
2540 +#if defined( _WINDOWS ) || defined (__OS2__)
2541 +
2542 +#ifdef __cplusplus
2543 +extern "C" {
2544 +#endif
2545 +
2546 +/* plugin meta member functions */
2547 +#if defined(__OS2__)
2548 +
2549 + typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */
2550 + char *pMimeTypes;
2551 + char *pFileExtents;
2552 + char *pFileOpenTemplate;
2553 + char *pProductName;
2554 + char *pProductDescription;
2555 + unsigned long dwProductVersionMS;
2556 + unsigned long dwProductVersionLS;
2557 + } NPPluginData;
2558 +
2559 + NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);
2560 +
2561 +#endif
2562 +
2563 + NPError OSCALL NP_GetEntryPoints(NPPluginFuncs * pFuncs);
2564 +
2565 + NPError OSCALL NP_Initialize(NPNetscapeFuncs * pFuncs);
2566 +
2567 + NPError OSCALL NP_Shutdown();
2568 +
2569 + char *NP_GetMIMEDescription();
2570 +
2571 +#ifdef __cplusplus
2572 +}
2573 +#endif
2574 +#endif /* _WINDOWS || __OS2__ */
2575 +#if defined(__OS2__)
2576 +#pragma pack()
2577 +#endif
2578 +#ifdef XP_UNIX
2579 +#ifdef __cplusplus
2580 +extern "C" {
2581 +#endif
2582 +
2583 +/* plugin meta member functions */
2584 +
2585 + NP_EXPORT(char *) NP_GetMIMEDescription(void);
2586 + NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *);
2587 + NP_EXPORT(NPError) NP_Shutdown(void);
2588 + NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue);
2589 +
2590 +#ifdef __cplusplus
2591 +}
2592 +#endif
2593 +#endif /* XP_UNIX */
2594 +#endif /* _NPUPP_H_ */
2595 diff -Naur mplayerplug-in-3.55/install.sh mplayerplug-in.tpg/install.sh
2596 --- mplayerplug-in-3.55/install.sh 2008-06-24 15:15:05.000000000 +0200
2597 +++ mplayerplug-in.tpg/install.sh 2009-04-03 17:39:47.000000000 +0200
2598 @@ -9,7 +9,7 @@
2599 datadir=${prefix}/share
2600 LOCALEDIR=${datadir}/locale
2601 DESTDIR=$1
2602 -MOZHOME=/usr/lib/firefox-2.0.0.14/plugins
2603 +MOZHOME=/usr/lib64/xulrunner-1.9.1/plugins
2604
2605 if [ "$DESTDIR" ]; then
2606 echo "Installing to $DESTDIR"
2607 diff -Naur mplayerplug-in-3.55/intltool-extract.in mplayerplug-in.tpg/intltool-extract.in
2608 --- mplayerplug-in-3.55/intltool-extract.in 2006-09-11 21:32:07.000000000 +0200
2609 +++ mplayerplug-in.tpg/intltool-extract.in 1970-01-01 01:00:00.000000000 +0100
2610 @@ -1,841 +0,0 @@
2611 -#!@INTLTOOL_PERL@ -w
2612 -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2613 -
2614 -#
2615 -# The Intltool Message Extractor
2616 -#
2617 -# Copyright (C) 2000-2001, 2003 Free Software Foundation.
2618 -#
2619 -# Intltool is free software; you can redistribute it and/or
2620 -# modify it under the terms of the GNU General Public License as
2621 -# published by the Free Software Foundation; either version 2 of the
2622 -# License, or (at your option) any later version.
2623 -#
2624 -# Intltool is distributed in the hope that it will be useful,
2625 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
2626 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2627 -# General Public License for more details.
2628 -#
2629 -# You should have received a copy of the GNU General Public License
2630 -# along with this program; if not, write to the Free Software
2631 -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2632 -#
2633 -# As a special exception to the GNU General Public License, if you
2634 -# distribute this file as part of a program that contains a
2635 -# configuration script generated by Autoconf, you may include it under
2636 -# the same distribution terms that you use for the rest of that program.
2637 -#
2638 -# Authors: Kenneth Christiansen <kenneth@gnu.org>
2639 -# Darin Adler <darin@bentspoon.com>
2640 -#
2641 -
2642 -## Release information
2643 -my $PROGRAM = "intltool-extract";
2644 -my $PACKAGE = "intltool";
2645 -my $VERSION = "0.34.2";
2646 -
2647 -## Loaded modules
2648 -use strict;
2649 -use File::Basename;
2650 -use Getopt::Long;
2651 -
2652 -## Scalars used by the option stuff
2653 -my $TYPE_ARG = "0";
2654 -my $LOCAL_ARG = "0";
2655 -my $HELP_ARG = "0";
2656 -my $VERSION_ARG = "0";
2657 -my $UPDATE_ARG = "0";
2658 -my $QUIET_ARG = "0";
2659 -my $SRCDIR_ARG = ".";
2660 -
2661 -my $FILE;
2662 -my $OUTFILE;
2663 -
2664 -my $gettext_type = "";
2665 -my $input;
2666 -my %messages = ();
2667 -my %loc = ();
2668 -my %count = ();
2669 -my %comments = ();
2670 -my $strcount = 0;
2671 -
2672 -my $XMLCOMMENT = "";
2673 -
2674 -## Use this instead of \w for XML files to handle more possible characters.
2675 -my $w = "[-A-Za-z0-9._:]";
2676 -
2677 -## Always print first
2678 -$| = 1;
2679 -
2680 -## Handle options
2681 -GetOptions (
2682 - "type=s" => \$TYPE_ARG,
2683 - "local|l" => \$LOCAL_ARG,
2684 - "help|h" => \$HELP_ARG,
2685 - "version|v" => \$VERSION_ARG,
2686 - "update" => \$UPDATE_ARG,
2687 - "quiet|q" => \$QUIET_ARG,
2688 - "srcdir=s" => \$SRCDIR_ARG,
2689 - ) or &error;
2690 -
2691 -&split_on_argument;
2692 -
2693 -
2694 -## Check for options.
2695 -## This section will check for the different options.
2696 -
2697 -sub split_on_argument {
2698 -
2699 - if ($VERSION_ARG) {
2700 - &version;
2701 -
2702 - } elsif ($HELP_ARG) {
2703 - &help;
2704 -
2705 - } elsif ($LOCAL_ARG) {
2706 - &place_local;
2707 - &extract;
2708 -
2709 - } elsif ($UPDATE_ARG) {
2710 - &place_normal;
2711 - &extract;
2712 -
2713 - } elsif (@ARGV > 0) {
2714 - &place_normal;
2715 - &message;
2716 - &extract;
2717 -
2718 - } else {
2719 - &help;
2720 -
2721 - }
2722 -}
2723 -
2724 -sub place_normal {
2725 - $FILE = $ARGV[0];
2726 - $OUTFILE = "$FILE.h";
2727 -}
2728 -
2729 -sub place_local {
2730 - $FILE = $ARGV[0];
2731 - $OUTFILE = fileparse($FILE, ());
2732 - if (!-e "tmp/") {
2733 - system("mkdir tmp/");
2734 - }
2735 - $OUTFILE = "./tmp/$OUTFILE.h"
2736 -}
2737 -
2738 -sub determine_type {
2739 - if ($TYPE_ARG =~ /^gettext\/(.*)/) {
2740 - $gettext_type=$1
2741 - }
2742 -}
2743 -
2744 -## Sub for printing release information
2745 -sub version{
2746 - print <<_EOF_;
2747 -${PROGRAM} (${PACKAGE}) $VERSION
2748 -Copyright (C) 2000, 2003 Free Software Foundation, Inc.
2749 -Written by Kenneth Christiansen, 2000.
2750 -
2751 -This is free software; see the source for copying conditions. There is NO
2752 -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2753 -_EOF_
2754 - exit;
2755 -}
2756 -
2757 -## Sub for printing usage information
2758 -sub help {
2759 - print <<_EOF_;
2760 -Usage: ${PROGRAM} [OPTION]... [FILENAME]
2761 -Generates a header file from an XML source file.
2762 -
2763 -It grabs all strings between <_translatable_node> and its end tag in
2764 -XML files. Read manpage (man ${PROGRAM}) for more info.
2765 -
2766 - --type=TYPE Specify the file type of FILENAME. Currently supports:
2767 - "gettext/glade", "gettext/ini", "gettext/keys"
2768 - "gettext/rfc822deb", "gettext/schemas",
2769 - "gettext/scheme", "gettext/xml"
2770 - -l, --local Writes output into current working directory
2771 - (conflicts with --update)
2772 - --update Writes output into the same directory the source file
2773 - reside (conflicts with --local)
2774 - --srcdir Root of the source tree
2775 - -v, --version Output version information and exit
2776 - -h, --help Display this help and exit
2777 - -q, --quiet Quiet mode
2778 -
2779 -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
2780 -or send email to <xml-i18n-tools\@gnome.org>.
2781 -_EOF_
2782 - exit;
2783 -}
2784 -
2785 -## Sub for printing error messages
2786 -sub error{
2787 - print STDERR "Try `${PROGRAM} --help' for more information.\n";
2788 - exit;
2789 -}
2790 -
2791 -sub message {
2792 - print "Generating C format header file for translation.\n" unless $QUIET_ARG;
2793 -}
2794 -
2795 -sub extract {
2796 - &determine_type;
2797 -
2798 - &convert;
2799 -
2800 - open OUT, ">$OUTFILE";
2801 - binmode (OUT) if $^O eq 'MSWin32';
2802 - &msg_write;
2803 - close OUT;
2804 -
2805 - print "Wrote $OUTFILE\n" unless $QUIET_ARG;
2806 -}
2807 -
2808 -sub convert {
2809 -
2810 - ## Reading the file
2811 - {
2812 - local (*IN);
2813 - local $/; #slurp mode
2814 - open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
2815 - $input = <IN>;
2816 - }
2817 -
2818 - &type_ini if $gettext_type eq "ini";
2819 - &type_keys if $gettext_type eq "keys";
2820 - &type_xml if $gettext_type eq "xml";
2821 - &type_glade if $gettext_type eq "glade";
2822 - &type_scheme if $gettext_type eq "scheme";
2823 - &type_schemas if $gettext_type eq "schemas";
2824 - &type_rfc822deb if $gettext_type eq "rfc822deb";
2825 -}
2826 -
2827 -sub entity_decode_minimal
2828 -{
2829 - local ($_) = @_;
2830 -
2831 - s/&apos;/'/g; # '
2832 - s/&quot;/"/g; # "
2833 - s/&amp;/&/g;
2834 -
2835 - return $_;
2836 -}
2837 -
2838 -sub entity_decode
2839 -{
2840 - local ($_) = @_;
2841 -
2842 - s/&apos;/'/g; # '
2843 - s/&quot;/"/g; # "
2844 - s/&amp;/&/g;
2845 - s/&lt;/</g;
2846 - s/&gt;/>/g;
2847 -
2848 - return $_;
2849 -}
2850 -
2851 -sub escape_char
2852 -{
2853 - return '\"' if $_ eq '"';
2854 - return '\n' if $_ eq "\n";
2855 - return '\\' if $_ eq '\\';
2856 -
2857 - return $_;
2858 -}
2859 -
2860 -sub escape
2861 -{
2862 - my ($string) = @_;
2863 - return join "", map &escape_char, split //, $string;
2864 -}
2865 -
2866 -sub type_ini {
2867 - ### For generic translatable desktop files ###
2868 - while ($input =~ /^_.*=(.*)$/mg) {
2869 - $messages{$1} = [];
2870 - }
2871 -}
2872 -
2873 -sub type_keys {
2874 - ### For generic translatable mime/keys files ###
2875 - while ($input =~ /^\s*_\w+=(.*)$/mg) {
2876 - $messages{$1} = [];
2877 - }
2878 -}
2879 -
2880 -sub type_xml {
2881 - ### For generic translatable XML files ###
2882 - my $tree = readXml($input);
2883 - parseTree(0, $tree);
2884 -}
2885 -
2886 -sub print_var {
2887 - my $var = shift;
2888 - my $vartype = ref $var;
2889 -
2890 - if ($vartype =~ /ARRAY/) {
2891 - my @arr = @{$var};
2892 - print "[ ";
2893 - foreach my $el (@arr) {
2894 - print_var($el);
2895 - print ", ";
2896 - }
2897 - print "] ";
2898 - } elsif ($vartype =~ /HASH/) {
2899 - my %hash = %{$var};
2900 - print "{ ";
2901 - foreach my $key (keys %hash) {
2902 - print "$key => ";
2903 - print_var($hash{$key});
2904 - print ", ";
2905 - }
2906 - print "} ";
2907 - } else {
2908 - print $var;
2909 - }
2910 -}
2911 -
2912 -# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
2913 -sub getAttributeString
2914 -{
2915 - my $sub = shift;
2916 - my $do_translate = shift || 1;
2917 - my $language = shift || "";
2918 - my $translate = shift;
2919 - my $result = "";
2920 - foreach my $e (reverse(sort(keys %{ $sub }))) {
2921 - my $key = $e;
2922 - my $string = $sub->{$e};
2923 - my $quote = '"';
2924 -
2925 - $string =~ s/^[\s]+//;
2926 - $string =~ s/[\s]+$//;
2927 -
2928 - if ($string =~ /^'.*'$/)
2929 - {
2930 - $quote = "'";
2931 - }
2932 - $string =~ s/^['"]//g;
2933 - $string =~ s/['"]$//g;
2934 -
2935 - ## differences from intltool-merge.in.in
2936 - if ($key =~ /^_/) {
2937 - $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
2938 - $messages{entity_decode($string)} = [];
2939 - $$translate = 2;
2940 - }
2941 - ## differences end here from intltool-merge.in.in
2942 - $result .= " $key=$quote$string$quote";
2943 - }
2944 - return $result;
2945 -}
2946 -
2947 -# Verbatim copy from intltool-merge.in.in
2948 -sub getXMLstring
2949 -{
2950 - my $ref = shift;
2951 - my $spacepreserve = shift || 0;
2952 - my @list = @{ $ref };
2953 - my $result = "";
2954 -
2955 - my $count = scalar(@list);
2956 - my $attrs = $list[0];
2957 - my $index = 1;
2958 -
2959 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
2960 - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
2961 -
2962 - while ($index < $count) {
2963 - my $type = $list[$index];
2964 - my $content = $list[$index+1];
2965 - if (! $type ) {
2966 - # We've got CDATA
2967 - if ($content) {
2968 - # lets strip the whitespace here, and *ONLY* here
2969 - $content =~ s/\s+/ /gs if (!$spacepreserve);
2970 - $result .= $content;
2971 - }
2972 - } elsif ( "$type" ne "1" ) {
2973 - # We've got another element
2974 - $result .= "<$type";
2975 - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
2976 - if ($content) {
2977 - my $subresult = getXMLstring($content, $spacepreserve);
2978 - if ($subresult) {
2979 - $result .= ">".$subresult . "</$type>";
2980 - } else {
2981 - $result .= "/>";
2982 - }
2983 - } else {
2984 - $result .= "/>";
2985 - }
2986 - }
2987 - $index += 2;
2988 - }
2989 - return $result;
2990 -}
2991 -
2992 -# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
2993 -# Translate list of nodes if necessary
2994 -sub translate_subnodes
2995 -{
2996 - my $fh = shift;
2997 - my $content = shift;
2998 - my $language = shift || "";
2999 - my $singlelang = shift || 0;
3000 - my $spacepreserve = shift || 0;
3001 -
3002 - my @nodes = @{ $content };
3003 -
3004 - my $count = scalar(@nodes);
3005 - my $index = 0;
3006 - while ($index < $count) {
3007 - my $type = $nodes[$index];
3008 - my $rest = $nodes[$index+1];
3009 - traverse($fh, $type, $rest, $language, $spacepreserve);
3010 - $index += 2;
3011 - }
3012 -}
3013 -
3014 -# Based on traverse() in intltool-merge.in.in
3015 -sub traverse
3016 -{
3017 - my $fh = shift; # unused, to allow us to sync code between -merge and -extract
3018 - my $nodename = shift;
3019 - my $content = shift;
3020 - my $language = shift || "";
3021 - my $spacepreserve = shift || 0;
3022 -
3023 - if ($nodename && "$nodename" eq "1") {
3024 - $XMLCOMMENT = $content;
3025 - } elsif ($nodename) {
3026 - # element
3027 - my @all = @{ $content };
3028 - my $attrs = shift @all;
3029 - my $translate = 0;
3030 - my $outattr = getAttributeString($attrs, 1, $language, \$translate);
3031 -
3032 - if ($nodename =~ /^_/) {
3033 - $translate = 1;
3034 - $nodename =~ s/^_//;
3035 - }
3036 - my $lookup = '';
3037 -
3038 - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
3039 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
3040 -
3041 - if ($translate) {
3042 - $lookup = getXMLstring($content, $spacepreserve);
3043 - if (!$spacepreserve) {
3044 - $lookup =~ s/^\s+//s;
3045 - $lookup =~ s/\s+$//s;
3046 - }
3047 -
3048 - if ($lookup && $translate != 2) {
3049 - $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
3050 - $messages{$lookup} = [];
3051 - } elsif ($translate == 2) {
3052 - translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
3053 - }
3054 - } else {
3055 - $XMLCOMMENT = "";
3056 - my $count = scalar(@all);
3057 - if ($count > 0) {
3058 - my $index = 0;
3059 - while ($index < $count) {
3060 - my $type = $all[$index];
3061 - my $rest = $all[$index+1];
3062 - traverse($fh, $type, $rest, $language, $spacepreserve);
3063 - $index += 2;
3064 - }
3065 - }
3066 - }
3067 - $XMLCOMMENT = "";
3068 - }
3069 -}
3070 -
3071 -
3072 -# Verbatim copy from intltool-merge.in.in, $fh for compatibility
3073 -sub parseTree
3074 -{
3075 - my $fh = shift;
3076 - my $ref = shift;
3077 - my $language = shift || "";
3078 -
3079 - my $name = shift @{ $ref };
3080 - my $cont = shift @{ $ref };
3081 -
3082 - while (!$name || "$name" eq "1") {
3083 - $name = shift @{ $ref };
3084 - $cont = shift @{ $ref };
3085 - }
3086 -
3087 - my $spacepreserve = 0;
3088 - my $attrs = @{$cont}[0];
3089 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
3090 -
3091 - traverse($fh, $name, $cont, $language, $spacepreserve);
3092 -}
3093 -
3094 -# Verbatim copy from intltool-merge.in.in
3095 -sub intltool_tree_comment
3096 -{
3097 - my $expat = shift;
3098 - my $data = $expat->original_string();
3099 - my $clist = $expat->{Curlist};
3100 - my $pos = $#$clist;
3101 -
3102 - $data =~ s/^<!--//s;
3103 - $data =~ s/-->$//s;
3104 - push @$clist, 1 => $data;
3105 -}
3106 -
3107 -# Verbatim copy from intltool-merge.in.in
3108 -sub intltool_tree_cdatastart
3109 -{
3110 - my $expat = shift;
3111 - my $clist = $expat->{Curlist};
3112 - my $pos = $#$clist;
3113 -
3114 - push @$clist, 0 => $expat->original_string();
3115 -}
3116 -
3117 -# Verbatim copy from intltool-merge.in.in
3118 -sub intltool_tree_cdataend
3119 -{
3120 - my $expat = shift;
3121 - my $clist = $expat->{Curlist};
3122 - my $pos = $#$clist;
3123 -
3124 - $clist->[$pos] .= $expat->original_string();
3125 -}
3126 -
3127 -# Verbatim copy from intltool-merge.in.in
3128 -sub intltool_tree_char
3129 -{
3130 - my $expat = shift;
3131 - my $text = shift;
3132 - my $clist = $expat->{Curlist};
3133 - my $pos = $#$clist;
3134 -
3135 - # Use original_string so that we retain escaped entities
3136 - # in CDATA sections.
3137 - #
3138 - if ($pos > 0 and $clist->[$pos - 1] eq '0') {
3139 - $clist->[$pos] .= $expat->original_string();
3140 - } else {
3141 - push @$clist, 0 => $expat->original_string();
3142 - }
3143 -}
3144 -
3145 -# Verbatim copy from intltool-merge.in.in
3146 -sub intltool_tree_start
3147 -{
3148 - my $expat = shift;
3149 - my $tag = shift;
3150 - my @origlist = ();
3151 -
3152 - # Use original_string so that we retain escaped entities
3153 - # in attribute values. We must convert the string to an
3154 - # @origlist array to conform to the structure of the Tree
3155 - # Style.
3156 - #
3157 - my @original_array = split /\x/, $expat->original_string();
3158 - my $source = $expat->original_string();
3159 -
3160 - # Remove leading tag.
3161 - #
3162 - $source =~ s|^\s*<\s*(\S+)||s;
3163 -
3164 - # Grab attribute key/value pairs and push onto @origlist array.
3165 - #
3166 - while ($source)
3167 - {
3168 - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
3169 - {
3170 - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
3171 - push @origlist, $1;
3172 - push @origlist, '"' . $2 . '"';
3173 - }
3174 - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
3175 - {
3176 - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
3177 - push @origlist, $1;
3178 - push @origlist, "'" . $2 . "'";
3179 - }
3180 - else
3181 - {
3182 - last;
3183 - }
3184 - }
3185 -
3186 - my $ol = [ { @origlist } ];
3187 -
3188 - push @{ $expat->{Lists} }, $expat->{Curlist};
3189 - push @{ $expat->{Curlist} }, $tag => $ol;
3190 - $expat->{Curlist} = $ol;
3191 -}
3192 -
3193 -# Copied from intltool-merge.in.in and added comment handler.
3194 -sub readXml
3195 -{
3196 - my $xmldoc = shift || return;
3197 - my $ret = eval 'require XML::Parser';
3198 - if(!$ret) {
3199 - die "You must have XML::Parser installed to run $0\n\n";
3200 - }
3201 - my $xp = new XML::Parser(Style => 'Tree');
3202 - $xp->setHandlers(Char => \&intltool_tree_char);
3203 - $xp->setHandlers(Start => \&intltool_tree_start);
3204 - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
3205 - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
3206 -
3207 - ## differences from intltool-merge.in.in
3208 - $xp->setHandlers(Comment => \&intltool_tree_comment);
3209 - ## differences end here from intltool-merge.in.in
3210 -
3211 - my $tree = $xp->parse($xmldoc);
3212 - #print_var($tree);
3213 -
3214 -# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
3215 -# would be:
3216 -# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
3217 -# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
3218 -
3219 - return $tree;
3220 -}
3221 -
3222 -sub type_schemas {
3223 - ### For schemas XML files ###
3224 -
3225 - # FIXME: We should handle escaped < (less than)
3226 - while ($input =~ /
3227 - <locale\ name="C">\s*
3228 - (<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
3229 - (<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
3230 - (<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
3231 - <\/locale>
3232 - /sgx) {
3233 - my @totranslate = ($3,$6,$9);
3234 - my @eachcomment = ($2,$5,$8);
3235 - foreach (@totranslate) {
3236 - my $currentcomment = shift @eachcomment;
3237 - next if !$_;
3238 - s/\s+/ /g;
3239 - $messages{entity_decode_minimal($_)} = [];
3240 - $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
3241 - }
3242 - }
3243 -}
3244 -
3245 -sub type_rfc822deb {
3246 - ### For rfc822-style Debian configuration files ###
3247 -
3248 - my $lineno = 1;
3249 - my $type = '';
3250 - while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
3251 - {
3252 - my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
3253 - while ($pre =~ m/\n/g)
3254 - {
3255 - $lineno ++;
3256 - }
3257 - $lineno += length($newline);
3258 - my @str_list = rfc822deb_split(length($underscore), $text);
3259 - for my $str (@str_list)
3260 - {
3261 - $strcount++;
3262 - $messages{$str} = [];
3263 - $loc{$str} = $lineno;
3264 - $count{$str} = $strcount;
3265 - my $usercomment = '';
3266 - while($pre =~ s/(^|\n)#([^\n]*)$//s)
3267 - {
3268 - $usercomment = "\n" . $2 . $usercomment;
3269 - }
3270 - $comments{$str} = $tag . $usercomment;
3271 - }
3272 - $lineno += ($text =~ s/\n//g);
3273 - }
3274 -}
3275 -
3276 -sub rfc822deb_split {
3277 - # Debian defines a special way to deal with rfc822-style files:
3278 - # when a value contain newlines, it consists of
3279 - # 1. a short form (first line)
3280 - # 2. a long description, all lines begin with a space,
3281 - # and paragraphs are separated by a single dot on a line
3282 - # This routine returns an array of all paragraphs, and reformat
3283 - # them.
3284 - # When first argument is 2, the string is a comma separated list of
3285 - # values.
3286 - my $type = shift;
3287 - my $text = shift;
3288 - $text =~ s/^[ \t]//mg;
3289 - return (split(/, */, $text, 0)) if $type ne 1;
3290 - return ($text) if $text !~ /\n/;
3291 -
3292 - $text =~ s/([^\n]*)\n//;
3293 - my @list = ($1);
3294 - my $str = '';
3295 - for my $line (split (/\n/, $text))
3296 - {
3297 - chomp $line;
3298 - if ($line =~ /^\.\s*$/)
3299 - {
3300 - # New paragraph
3301 - $str =~ s/\s*$//;
3302 - push(@list, $str);
3303 - $str = '';
3304 - }
3305 - elsif ($line =~ /^\s/)
3306 - {
3307 - # Line which must not be reformatted
3308 - $str .= "\n" if length ($str) && $str !~ /\n$/;
3309 - $line =~ s/\s+$//;
3310 - $str .= $line."\n";
3311 - }
3312 - else
3313 - {
3314 - # Continuation line, remove newline
3315 - $str .= " " if length ($str) && $str !~ /\n$/;
3316 - $str .= $line;
3317 - }
3318 - }
3319 - $str =~ s/\s*$//;
3320 - push(@list, $str) if length ($str);
3321 - return @list;
3322 -}
3323 -
3324 -sub type_glade {
3325 - ### For translatable Glade XML files ###
3326 -
3327 - my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
3328 -
3329 - while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
3330 - # Glade sometimes uses tags that normally mark translatable things for
3331 - # little bits of non-translatable content. We work around this by not
3332 - # translating strings that only includes something like label4 or window1.
3333 - $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
3334 - }
3335 -
3336 - while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
3337 - for my $item (split (/\n/, $1)) {
3338 - $messages{entity_decode($item)} = [];
3339 - }
3340 - }
3341 -
3342 - ## handle new glade files
3343 - while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
3344 - $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
3345 - if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
3346 - $comments{entity_decode($3)} = entity_decode($2) ;
3347 - }
3348 - }
3349 - while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
3350 - $messages{entity_decode_minimal($2)} = [];
3351 - }
3352 -}
3353 -
3354 -sub type_scheme {
3355 - my ($line, $i, $state, $str, $trcomment, $char);
3356 - for $line (split(/\n/, $input)) {
3357 - $i = 0;
3358 - $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
3359 - while ($i < length($line)) {
3360 - if (substr($line,$i,1) eq "\"") {
3361 - if ($state == 2) {
3362 - $comments{$str} = $trcomment if ($trcomment);
3363 - $messages{$str} = [];
3364 - $str = '';
3365 - $state = 0; $trcomment = "";
3366 - } elsif ($state == 1) {
3367 - $str = '';
3368 - $state = 0; $trcomment = "";
3369 - } else {
3370 - $state = 1;
3371 - $str = '';
3372 - if ($i>0 && substr($line,$i-1,1) eq '_') {
3373 - $state = 2;
3374 - }
3375 - }
3376 - } elsif (!$state) {
3377 - if (substr($line,$i,1) eq ";") {
3378 - $trcomment = substr($line,$i+1);
3379 - $trcomment =~ s/^;*\s*//;
3380 - $i = length($line);
3381 - } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
3382 - $trcomment = "";
3383 - }
3384 - } else {
3385 - if (substr($line,$i,1) eq "\\") {
3386 - $char = substr($line,$i+1,1);
3387 - if ($char ne "\"" && $char ne "\\") {
3388 - $str = $str . "\\";
3389 - }
3390 - $i++;
3391 - }
3392 - $str = $str . substr($line,$i,1);
3393 - }
3394 - $i++;
3395 - }
3396 - }
3397 -}
3398 -
3399 -sub msg_write {
3400 - my @msgids;
3401 - if (%count)
3402 - {
3403 - @msgids = sort { $count{$a} <=> $count{$b} } keys %count;
3404 - }
3405 - else
3406 - {
3407 - @msgids = sort keys %messages;
3408 - }
3409 - for my $message (@msgids)
3410 - {
3411 - my $offsetlines = 1;
3412 - $offsetlines++ if $message =~ /%/;
3413 - if (defined ($comments{$message}))
3414 - {
3415 - while ($comments{$message} =~ m/\n/g)
3416 - {
3417 - $offsetlines++;
3418 - }
3419 - }
3420 - print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
3421 - if defined $loc{$message};
3422 - print OUT "/* ".$comments{$message}." */\n"
3423 - if defined $comments{$message};
3424 - print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
3425 -
3426 - my @lines = split (/\n/, $message, -1);
3427 - for (my $n = 0; $n < @lines; $n++)
3428 - {
3429 - if ($n == 0)
3430 - {
3431 - print OUT "char *s = N_(\"";
3432 - }
3433 - else
3434 - {
3435 - print OUT " \"";
3436 - }
3437 -
3438 - print OUT escape($lines[$n]);
3439 -
3440 - if ($n < @lines - 1)
3441 - {
3442 - print OUT "\\n\"\n";
3443 - }
3444 - else
3445 - {
3446 - print OUT "\");\n";
3447 - }
3448 - }
3449 - }
3450 -}
3451 -
3452 diff -Naur mplayerplug-in-3.55/intltool-merge.in mplayerplug-in.tpg/intltool-merge.in
3453 --- mplayerplug-in-3.55/intltool-merge.in 2006-09-11 21:32:07.000000000 +0200
3454 +++ mplayerplug-in.tpg/intltool-merge.in 1970-01-01 01:00:00.000000000 +0100
3455 @@ -1,1356 +0,0 @@
3456 -#!@INTLTOOL_PERL@ -w
3457 -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3458 -
3459 -#
3460 -# The Intltool Message Merger
3461 -#
3462 -# Copyright (C) 2000, 2003 Free Software Foundation.
3463 -# Copyright (C) 2000, 2001 Eazel, Inc
3464 -#
3465 -# Intltool is free software; you can redistribute it and/or
3466 -# modify it under the terms of the GNU General Public License
3467 -# version 2 published by the Free Software Foundation.
3468 -#
3469 -# Intltool is distributed in the hope that it will be useful,
3470 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
3471 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3472 -# General Public License for more details.
3473 -#
3474 -# You should have received a copy of the GNU General Public License
3475 -# along with this program; if not, write to the Free Software
3476 -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3477 -#
3478 -# As a special exception to the GNU General Public License, if you
3479 -# distribute this file as part of a program that contains a
3480 -# configuration script generated by Autoconf, you may include it under
3481 -# the same distribution terms that you use for the rest of that program.
3482 -#
3483 -# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
3484 -# Kenneth Christiansen <kenneth@gnu.org>
3485 -# Darin Adler <darin@bentspoon.com>
3486 -#
3487 -# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
3488 -#
3489 -
3490 -## Release information
3491 -my $PROGRAM = "intltool-merge";
3492 -my $PACKAGE = "intltool";
3493 -my $VERSION = "0.34.2";
3494 -
3495 -## Loaded modules
3496 -use strict;
3497 -use Getopt::Long;
3498 -use Text::Wrap;
3499 -use File::Basename;
3500 -
3501 -my $must_end_tag = -1;
3502 -my $last_depth = -1;
3503 -my $translation_depth = -1;
3504 -my @tag_stack = ();
3505 -my @entered_tag = ();
3506 -my @translation_strings = ();
3507 -my $leading_space = "";
3508 -
3509 -## Scalars used by the option stuff
3510 -my $HELP_ARG = 0;
3511 -my $VERSION_ARG = 0;
3512 -my $BA_STYLE_ARG = 0;
3513 -my $XML_STYLE_ARG = 0;
3514 -my $KEYS_STYLE_ARG = 0;
3515 -my $DESKTOP_STYLE_ARG = 0;
3516 -my $SCHEMAS_STYLE_ARG = 0;
3517 -my $RFC822DEB_STYLE_ARG = 0;
3518 -my $QUIET_ARG = 0;
3519 -my $PASS_THROUGH_ARG = 0;
3520 -my $UTF8_ARG = 0;
3521 -my $MULTIPLE_OUTPUT = 0;
3522 -my $cache_file;
3523 -
3524 -## Handle options
3525 -GetOptions
3526 -(
3527 - "help" => \$HELP_ARG,
3528 - "version" => \$VERSION_ARG,
3529 - "quiet|q" => \$QUIET_ARG,
3530 - "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
3531 - "ba-style|b" => \$BA_STYLE_ARG,
3532 - "xml-style|x" => \$XML_STYLE_ARG,
3533 - "keys-style|k" => \$KEYS_STYLE_ARG,
3534 - "desktop-style|d" => \$DESKTOP_STYLE_ARG,
3535 - "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
3536 - "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
3537 - "pass-through|p" => \$PASS_THROUGH_ARG,
3538 - "utf8|u" => \$UTF8_ARG,
3539 - "multiple-output|m" => \$MULTIPLE_OUTPUT,
3540 - "cache|c=s" => \$cache_file
3541 - ) or &error;
3542 -
3543 -my $PO_DIR;
3544 -my $FILE;
3545 -my $OUTFILE;
3546 -
3547 -my %po_files_by_lang = ();
3548 -my %translations = ();
3549 -my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@";
3550 -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
3551 -
3552 -# Use this instead of \w for XML files to handle more possible characters.
3553 -my $w = "[-A-Za-z0-9._:]";
3554 -
3555 -# XML quoted string contents
3556 -my $q = "[^\\\"]*";
3557 -
3558 -## Check for options.
3559 -
3560 -if ($VERSION_ARG)
3561 -{
3562 - &print_version;
3563 -}
3564 -elsif ($HELP_ARG)
3565 -{
3566 - &print_help;
3567 -}
3568 -elsif ($BA_STYLE_ARG && @ARGV > 2)
3569 -{
3570 - &utf8_sanity_check;
3571 - &preparation;
3572 - &print_message;
3573 - &ba_merge_translations;
3574 - &finalize;
3575 -}
3576 -elsif ($XML_STYLE_ARG && @ARGV > 2)
3577 -{
3578 - &utf8_sanity_check;
3579 - &preparation;
3580 - &print_message;
3581 - &xml_merge_output;
3582 - &finalize;
3583 -}
3584 -elsif ($KEYS_STYLE_ARG && @ARGV > 2)
3585 -{
3586 - &utf8_sanity_check;
3587 - &preparation;
3588 - &print_message;
3589 - &keys_merge_translations;
3590 - &finalize;
3591 -}
3592 -elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
3593 -{
3594 - &utf8_sanity_check;
3595 - &preparation;
3596 - &print_message;
3597 - &desktop_merge_translations;
3598 - &finalize;
3599 -}
3600 -elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
3601 -{
3602 - &utf8_sanity_check;
3603 - &preparation;
3604 - &print_message;
3605 - &schemas_merge_translations;
3606 - &finalize;
3607 -}
3608 -elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
3609 -{
3610 - &preparation;
3611 - &print_message;
3612 - &rfc822deb_merge_translations;
3613 - &finalize;
3614 -}
3615 -else
3616 -{
3617 - &print_help;
3618 -}
3619 -
3620 -exit;
3621 -
3622 -## Sub for printing release information
3623 -sub print_version
3624 -{
3625 - print <<_EOF_;
3626 -${PROGRAM} (${PACKAGE}) ${VERSION}
3627 -Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
3628 -
3629 -Copyright (C) 2000-2003 Free Software Foundation, Inc.
3630 -Copyright (C) 2000-2001 Eazel, Inc.
3631 -This is free software; see the source for copying conditions. There is NO
3632 -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3633 -_EOF_
3634 - exit;
3635 -}
3636 -
3637 -## Sub for printing usage information
3638 -sub print_help
3639 -{
3640 - print <<_EOF_;
3641 -Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
3642 -Generates an output file that includes some localized attributes from an
3643 -untranslated source file.
3644 -
3645 -Mandatory options: (exactly one must be specified)
3646 - -b, --ba-style includes translations in the bonobo-activation style
3647 - -d, --desktop-style includes translations in the desktop style
3648 - -k, --keys-style includes translations in the keys style
3649 - -s, --schemas-style includes translations in the schemas style
3650 - -r, --rfc822deb-style includes translations in the RFC822 style
3651 - -x, --xml-style includes translations in the standard xml style
3652 -
3653 -Other options:
3654 - -u, --utf8 convert all strings to UTF-8 before merging
3655 - (default for everything except RFC822 style)
3656 - -p, --pass-through deprecated, does nothing and issues a warning
3657 - -m, --multiple-output output one localized file per locale, instead of
3658 - a single file containing all localized elements
3659 - -c, --cache=FILE specify cache file name
3660 - (usually \$top_builddir/po/.intltool-merge-cache)
3661 - -q, --quiet suppress most messages
3662 - --help display this help and exit
3663 - --version output version information and exit
3664 -
3665 -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
3666 -or send email to <xml-i18n-tools\@gnome.org>.
3667 -_EOF_
3668 - exit;
3669 -}
3670 -
3671 -
3672 -## Sub for printing error messages
3673 -sub print_error
3674 -{
3675 - print STDERR "Try `${PROGRAM} --help' for more information.\n";
3676 - exit;
3677 -}
3678 -
3679 -
3680 -sub print_message
3681 -{
3682 - print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
3683 -}
3684 -
3685 -
3686 -sub preparation
3687 -{
3688 - $PO_DIR = $ARGV[0];
3689 - $FILE = $ARGV[1];
3690 - $OUTFILE = $ARGV[2];
3691 -
3692 - &gather_po_files;
3693 - &get_translation_database;
3694 -}
3695 -
3696 -# General-purpose code for looking up translations in .po files
3697 -
3698 -sub po_file2lang
3699 -{
3700 - my ($tmp) = @_;
3701 - $tmp =~ s/^.*\/(.*)\.po$/$1/;
3702 - return $tmp;
3703 -}
3704 -
3705 -sub gather_po_files
3706 -{
3707 - for my $po_file (glob "$PO_DIR/*.po") {
3708 - $po_files_by_lang{po_file2lang($po_file)} = $po_file;
3709 - }
3710 -}
3711 -
3712 -sub get_local_charset
3713 -{
3714 - my ($encoding) = @_;
3715 - my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
3716 -
3717 - # seek character encoding aliases in charset.alias (glib)
3718 -
3719 - if (open CHARSET_ALIAS, $alias_file)
3720 - {
3721 - while (<CHARSET_ALIAS>)
3722 - {
3723 - next if /^\#/;
3724 - return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
3725 - }
3726 -
3727 - close CHARSET_ALIAS;
3728 - }
3729 -
3730 - # if not found, return input string
3731 -
3732 - return $encoding;
3733 -}
3734 -
3735 -sub get_po_encoding
3736 -{
3737 - my ($in_po_file) = @_;
3738 - my $encoding = "";
3739 -
3740 - open IN_PO_FILE, $in_po_file or die;
3741 - while (<IN_PO_FILE>)
3742 - {
3743 - ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
3744 - if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
3745 - {
3746 - $encoding = $1;
3747 - last;
3748 - }
3749 - }
3750 - close IN_PO_FILE;
3751 -
3752 - if (!$encoding)
3753 - {
3754 - print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
3755 - $encoding = "ISO-8859-1";
3756 - }
3757 -
3758 - system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
3759 - if ($?) {
3760 - $encoding = get_local_charset($encoding);
3761 - }
3762 -
3763 - return $encoding
3764 -}
3765 -
3766 -sub utf8_sanity_check
3767 -{
3768 - print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
3769 - $UTF8_ARG = 1;
3770 -}
3771 -
3772 -sub get_translation_database
3773 -{
3774 - if ($cache_file) {
3775 - &get_cached_translation_database;
3776 - } else {
3777 - &create_translation_database;
3778 - }
3779 -}
3780 -
3781 -sub get_newest_po_age
3782 -{
3783 - my $newest_age;
3784 -
3785 - foreach my $file (values %po_files_by_lang)
3786 - {
3787 - my $file_age = -M $file;
3788 - $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
3789 - }
3790 -
3791 - $newest_age = 0 if !$newest_age;
3792 -
3793 - return $newest_age;
3794 -}
3795 -
3796 -sub create_cache
3797 -{
3798 - print "Generating and caching the translation database\n" unless $QUIET_ARG;
3799 -
3800 - &create_translation_database;
3801 -
3802 - open CACHE, ">$cache_file" || die;
3803 - print CACHE join "\x01", %translations;
3804 - close CACHE;
3805 -}
3806 -
3807 -sub load_cache
3808 -{
3809 - print "Found cached translation database\n" unless $QUIET_ARG;
3810 -
3811 - my $contents;
3812 - open CACHE, "<$cache_file" || die;
3813 - {
3814 - local $/;
3815 - $contents = <CACHE>;
3816 - }
3817 - close CACHE;
3818 - %translations = split "\x01", $contents;
3819 -}
3820 -
3821 -sub get_cached_translation_database
3822 -{
3823 - my $cache_file_age = -M $cache_file;
3824 - if (defined $cache_file_age)
3825 - {
3826 - if ($cache_file_age <= &get_newest_po_age)
3827 - {
3828 - &load_cache;
3829 - return;
3830 - }
3831 - print "Found too-old cached translation database\n" unless $QUIET_ARG;
3832 - }
3833 -
3834 - &create_cache;
3835 -}
3836 -
3837 -sub create_translation_database
3838 -{
3839 - for my $lang (keys %po_files_by_lang)
3840 - {
3841 - my $po_file = $po_files_by_lang{$lang};
3842 -
3843 - if ($UTF8_ARG)
3844 - {
3845 - my $encoding = get_po_encoding ($po_file);
3846 -
3847 - if (lc $encoding eq "utf-8")
3848 - {
3849 - open PO_FILE, "<$po_file";
3850 - }
3851 - else
3852 - {
3853 - print STDERR "WARNING: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
3854 -
3855 - open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
3856 - }
3857 - }
3858 - else
3859 - {
3860 - open PO_FILE, "<$po_file";
3861 - }
3862 -
3863 - my $nextfuzzy = 0;
3864 - my $inmsgid = 0;
3865 - my $inmsgstr = 0;
3866 - my $msgid = "";
3867 - my $msgstr = "";
3868 -
3869 - while (<PO_FILE>)
3870 - {
3871 - $nextfuzzy = 1 if /^#, fuzzy/;
3872 -
3873 - if (/^msgid "((\\.|[^\\])*)"/ )
3874 - {
3875 - $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
3876 - $msgid = "";
3877 - $msgstr = "";
3878 -
3879 - if ($nextfuzzy) {
3880 - $inmsgid = 0;
3881 - } else {
3882 - $msgid = unescape_po_string($1);
3883 - $inmsgid = 1;
3884 - }
3885 - $inmsgstr = 0;
3886 - $nextfuzzy = 0;
3887 - }
3888 -
3889 - if (/^msgstr "((\\.|[^\\])*)"/)
3890 - {
3891 - $msgstr = unescape_po_string($1);
3892 - $inmsgstr = 1;
3893 - $inmsgid = 0;
3894 - }
3895 -
3896 - if (/^"((\\.|[^\\])*)"/)
3897 - {
3898 - $msgid .= unescape_po_string($1) if $inmsgid;
3899 - $msgstr .= unescape_po_string($1) if $inmsgstr;
3900 - }
3901 - }
3902 - $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
3903 - }
3904 -}
3905 -
3906 -sub finalize
3907 -{
3908 -}
3909 -
3910 -sub unescape_one_sequence
3911 -{
3912 - my ($sequence) = @_;
3913 -
3914 - return "\\" if $sequence eq "\\\\";
3915 - return "\"" if $sequence eq "\\\"";
3916 - return "\n" if $sequence eq "\\n";
3917 - return "\r" if $sequence eq "\\r";
3918 - return "\t" if $sequence eq "\\t";
3919 - return "\b" if $sequence eq "\\b";
3920 - return "\f" if $sequence eq "\\f";
3921 - return "\a" if $sequence eq "\\a";
3922 - return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
3923 -
3924 - return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
3925 - return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
3926 -
3927 - # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
3928 -
3929 - return $sequence;
3930 -}
3931 -
3932 -sub unescape_po_string
3933 -{
3934 - my ($string) = @_;
3935 -
3936 - $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
3937 -
3938 - return $string;
3939 -}
3940 -
3941 -## NOTE: deal with < - &lt; but not > - &gt; because it seems its ok to have
3942 -## > in the entity. For further info please look at #84738.
3943 -sub entity_decode
3944 -{
3945 - local ($_) = @_;
3946 -
3947 - s/&apos;/'/g; # '
3948 - s/&quot;/"/g; # "
3949 - s/&amp;/&/g;
3950 - s/&lt;/</g;
3951 -
3952 - return $_;
3953 -}
3954 -
3955 -# entity_encode: (string)
3956 -#
3957 -# Encode the given string to XML format (encode '<' etc).
3958 -
3959 -sub entity_encode
3960 -{
3961 - my ($pre_encoded) = @_;
3962 -
3963 - my @list_of_chars = unpack ('C*', $pre_encoded);
3964 -
3965 - # with UTF-8 we only encode minimalistic
3966 - return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
3967 -}
3968 -
3969 -sub entity_encode_int_minimalist
3970 -{
3971 - return "&quot;" if $_ == 34;
3972 - return "&amp;" if $_ == 38;
3973 - return "&apos;" if $_ == 39;
3974 - return "&lt;" if $_ == 60;
3975 - return chr $_;
3976 -}
3977 -
3978 -sub entity_encoded_translation
3979 -{
3980 - my ($lang, $string) = @_;
3981 -
3982 - my $translation = $translations{$lang, $string};
3983 - return $string if !$translation;
3984 - return entity_encode ($translation);
3985 -}
3986 -
3987 -## XML (bonobo-activation specific) merge code
3988 -
3989 -sub ba_merge_translations
3990 -{
3991 - my $source;
3992 -
3993 - {
3994 - local $/; # slurp mode
3995 - open INPUT, "<$FILE" or die "can't open $FILE: $!";
3996 - $source = <INPUT>;
3997 - close INPUT;
3998 - }
3999 -
4000 - open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
4001 - # Binmode so that selftest works ok if using a native Win32 Perl...
4002 - binmode (OUTPUT) if $^O eq 'MSWin32';
4003 -
4004 - while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
4005 - {
4006 - print OUTPUT $1;
4007 -
4008 - my $node = $2 . "\n";
4009 -
4010 - my @strings = ();
4011 - $_ = $node;
4012 - while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
4013 - push @strings, entity_decode($3);
4014 - }
4015 - print OUTPUT;
4016 -
4017 - my %langs;
4018 - for my $string (@strings)
4019 - {
4020 - for my $lang (keys %po_files_by_lang)
4021 - {
4022 - $langs{$lang} = 1 if $translations{$lang, $string};
4023 - }
4024 - }
4025 -
4026 - for my $lang (sort keys %langs)
4027 - {
4028 - $_ = $node;
4029 - s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
4030 - s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
4031 - print OUTPUT;
4032 - }
4033 - }
4034 -
4035 - print OUTPUT $source;
4036 -
4037 - close OUTPUT;
4038 -}
4039 -
4040 -
4041 -## XML (non-bonobo-activation) merge code
4042 -
4043 -
4044 -# Process tag attributes
4045 -# Only parameter is a HASH containing attributes -> values mapping
4046 -sub getAttributeString
4047 -{
4048 - my $sub = shift;
4049 - my $do_translate = shift || 0;
4050 - my $language = shift || "";
4051 - my $result = "";
4052 - my $translate = shift;
4053 - foreach my $e (reverse(sort(keys %{ $sub }))) {
4054 - my $key = $e;
4055 - my $string = $sub->{$e};
4056 - my $quote = '"';
4057 -
4058 - $string =~ s/^[\s]+//;
4059 - $string =~ s/[\s]+$//;
4060 -
4061 - if ($string =~ /^'.*'$/)
4062 - {
4063 - $quote = "'";
4064 - }
4065 - $string =~ s/^['"]//g;
4066 - $string =~ s/['"]$//g;
4067 -
4068 - if ($do_translate && $key =~ /^_/) {
4069 - $key =~ s|^_||g;
4070 - if ($language) {
4071 - # Handle translation
4072 - my $decode_string = entity_decode($string);
4073 - my $translation = $translations{$language, $decode_string};
4074 - if ($translation) {
4075 - $translation = entity_encode($translation);
4076 - $string = $translation;
4077 - }
4078 - $$translate = 2;
4079 - } else {
4080 - $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
4081 - }
4082 - }
4083 -
4084 - $result .= " $key=$quote$string$quote";
4085 - }
4086 - return $result;
4087 -}
4088 -
4089 -# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
4090 -sub getXMLstring
4091 -{
4092 - my $ref = shift;
4093 - my $spacepreserve = shift || 0;
4094 - my @list = @{ $ref };
4095 - my $result = "";
4096 -
4097 - my $count = scalar(@list);
4098 - my $attrs = $list[0];
4099 - my $index = 1;
4100 -
4101 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
4102 - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
4103 -
4104 - while ($index < $count) {
4105 - my $type = $list[$index];
4106 - my $content = $list[$index+1];
4107 - if (! $type ) {
4108 - # We've got CDATA
4109 - if ($content) {
4110 - # lets strip the whitespace here, and *ONLY* here
4111 - $content =~ s/\s+/ /gs if (!$spacepreserve);
4112 - $result .= $content;
4113 - }
4114 - } elsif ( "$type" ne "1" ) {
4115 - # We've got another element
4116 - $result .= "<$type";
4117 - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
4118 - if ($content) {
4119 - my $subresult = getXMLstring($content, $spacepreserve);
4120 - if ($subresult) {
4121 - $result .= ">".$subresult . "</$type>";
4122 - } else {
4123 - $result .= "/>";
4124 - }
4125 - } else {
4126 - $result .= "/>";
4127 - }
4128 - }
4129 - $index += 2;
4130 - }
4131 - return $result;
4132 -}
4133 -
4134 -# Translate list of nodes if necessary
4135 -sub translate_subnodes
4136 -{
4137 - my $fh = shift;
4138 - my $content = shift;
4139 - my $language = shift || "";
4140 - my $singlelang = shift || 0;
4141 - my $spacepreserve = shift || 0;
4142 -
4143 - my @nodes = @{ $content };
4144 -
4145 - my $count = scalar(@nodes);
4146 - my $index = 0;
4147 - while ($index < $count) {
4148 - my $type = $nodes[$index];
4149 - my $rest = $nodes[$index+1];
4150 - if ($singlelang) {
4151 - my $oldMO = $MULTIPLE_OUTPUT;
4152 - $MULTIPLE_OUTPUT = 1;
4153 - traverse($fh, $type, $rest, $language, $spacepreserve);
4154 - $MULTIPLE_OUTPUT = $oldMO;
4155 - } else {
4156 - traverse($fh, $type, $rest, $language, $spacepreserve);
4157 - }
4158 - $index += 2;
4159 - }
4160 -}
4161 -
4162 -sub isWellFormedXmlFragment
4163 -{
4164 - my $ret = eval 'require XML::Parser';
4165 - if(!$ret) {
4166 - die "You must have XML::Parser installed to run $0\n\n";
4167 - }
4168 -
4169 - my $fragment = shift;
4170 - return 0 if (!$fragment);
4171 -
4172 - $fragment = "<root>$fragment</root>";
4173 - my $xp = new XML::Parser(Style => 'Tree');
4174 - my $tree = 0;
4175 - eval { $tree = $xp->parse($fragment); };
4176 - return $tree;
4177 -}
4178 -
4179 -sub traverse
4180 -{
4181 - my $fh = shift;
4182 - my $nodename = shift;
4183 - my $content = shift;
4184 - my $language = shift || "";
4185 - my $spacepreserve = shift || 0;
4186 -
4187 - if (!$nodename) {
4188 - if ($content =~ /^[\s]*$/) {
4189 - $leading_space .= $content;
4190 - }
4191 - print $fh $content;
4192 - } else {
4193 - # element
4194 - my @all = @{ $content };
4195 - my $attrs = shift @all;
4196 - my $translate = 0;
4197 - my $outattr = getAttributeString($attrs, 1, $language, \$translate);
4198 -
4199 - if ($nodename =~ /^_/) {
4200 - $translate = 1;
4201 - $nodename =~ s/^_//;
4202 - }
4203 - my $lookup = '';
4204 -
4205 - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
4206 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
4207 -
4208 - print $fh "<$nodename", $outattr;
4209 - if ($translate) {
4210 - $lookup = getXMLstring($content, $spacepreserve);
4211 - if (!$spacepreserve) {
4212 - $lookup =~ s/^\s+//s;
4213 - $lookup =~ s/\s+$//s;
4214 - }
4215 -
4216 - if ($lookup || $translate == 2) {
4217 - my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
4218 - if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
4219 - $translation = $lookup if (!$translation);
4220 - print $fh " xml:lang=\"", $language, "\"" if $language;
4221 - print $fh ">";
4222 - if ($translate == 2) {
4223 - translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
4224 - } else {
4225 - print $fh $translation;
4226 - }
4227 - print $fh "</$nodename>";
4228 -
4229 - return; # this means there will be no same translation with xml:lang="$language"...
4230 - # if we want them both, just remove this "return"
4231 - } else {
4232 - print $fh ">";
4233 - if ($translate == 2) {
4234 - translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
4235 - } else {
4236 - print $fh $lookup;
4237 - }
4238 - print $fh "</$nodename>";
4239 - }
4240 - } else {
4241 - print $fh "/>";
4242 - }
4243 -
4244 - for my $lang (sort keys %po_files_by_lang) {
4245 - if ($MULTIPLE_OUTPUT && $lang ne "$language") {
4246 - next;
4247 - }
4248 - if ($lang) {
4249 - # Handle translation
4250 - #
4251 - my $translate = 0;
4252 - my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
4253 - my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
4254 - if ($translate && !$translation) {
4255 - $translation = $lookup;
4256 - }
4257 -
4258 - if ($translation || $translate) {
4259 - print $fh "\n";
4260 - $leading_space =~ s/.*\n//g;
4261 - print $fh $leading_space;
4262 - print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
4263 - if ($translate == 2) {
4264 - translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
4265 - } else {
4266 - print $fh $translation;
4267 - }
4268 - print $fh "</$nodename>";
4269 - }
4270 - }
4271 - }
4272 -
4273 - } else {
4274 - my $count = scalar(@all);
4275 - if ($count > 0) {
4276 - print $fh ">";
4277 - my $index = 0;
4278 - while ($index < $count) {
4279 - my $type = $all[$index];
4280 - my $rest = $all[$index+1];
4281 - traverse($fh, $type, $rest, $language, $spacepreserve);
4282 - $index += 2;
4283 - }
4284 - print $fh "</$nodename>";
4285 - } else {
4286 - print $fh "/>";
4287 - }
4288 - }
4289 - }
4290 -}
4291 -
4292 -sub intltool_tree_comment
4293 -{
4294 - my $expat = shift;
4295 - my $data = shift;
4296 - my $clist = $expat->{Curlist};
4297 - my $pos = $#$clist;
4298 -
4299 - push @$clist, 1 => $data;
4300 -}
4301 -
4302 -sub intltool_tree_cdatastart
4303 -{
4304 - my $expat = shift;
4305 - my $clist = $expat->{Curlist};
4306 - my $pos = $#$clist;
4307 -
4308 - push @$clist, 0 => $expat->original_string();
4309 -}
4310 -
4311 -sub intltool_tree_cdataend
4312 -{
4313 - my $expat = shift;
4314 - my $clist = $expat->{Curlist};
4315 - my $pos = $#$clist;
4316 -
4317 - $clist->[$pos] .= $expat->original_string();
4318 -}
4319 -
4320 -sub intltool_tree_char
4321 -{
4322 - my $expat = shift;
4323 - my $text = shift;
4324 - my $clist = $expat->{Curlist};
4325 - my $pos = $#$clist;
4326 -
4327 - # Use original_string so that we retain escaped entities
4328 - # in CDATA sections.
4329 - #
4330 - if ($pos > 0 and $clist->[$pos - 1] eq '0') {
4331 - $clist->[$pos] .= $expat->original_string();
4332 - } else {
4333 - push @$clist, 0 => $expat->original_string();
4334 - }
4335 -}
4336 -
4337 -sub intltool_tree_start
4338 -{
4339 - my $expat = shift;
4340 - my $tag = shift;
4341 - my @origlist = ();
4342 -
4343 - # Use original_string so that we retain escaped entities
4344 - # in attribute values. We must convert the string to an
4345 - # @origlist array to conform to the structure of the Tree
4346 - # Style.
4347 - #
4348 - my @original_array = split /\x/, $expat->original_string();
4349 - my $source = $expat->original_string();
4350 -
4351 - # Remove leading tag.
4352 - #
4353 - $source =~ s|^\s*<\s*(\S+)||s;
4354 -
4355 - # Grab attribute key/value pairs and push onto @origlist array.
4356 - #
4357 - while ($source)
4358 - {
4359 - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
4360 - {
4361 - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
4362 - push @origlist, $1;
4363 - push @origlist, '"' . $2 . '"';
4364 - }
4365 - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
4366 - {
4367 - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
4368 - push @origlist, $1;
4369 - push @origlist, "'" . $2 . "'";
4370 - }
4371 - else
4372 - {
4373 - last;
4374 - }
4375 - }
4376 -
4377 - my $ol = [ { @origlist } ];
4378 -
4379 - push @{ $expat->{Lists} }, $expat->{Curlist};
4380 - push @{ $expat->{Curlist} }, $tag => $ol;
4381 - $expat->{Curlist} = $ol;
4382 -}
4383 -
4384 -sub readXml
4385 -{
4386 - my $filename = shift || return;
4387 - if(!-f $filename) {
4388 - die "ERROR Cannot find filename: $filename\n";
4389 - }
4390 -
4391 - my $ret = eval 'require XML::Parser';
4392 - if(!$ret) {
4393 - die "You must have XML::Parser installed to run $0\n\n";
4394 - }
4395 - my $xp = new XML::Parser(Style => 'Tree');
4396 - $xp->setHandlers(Char => \&intltool_tree_char);
4397 - $xp->setHandlers(Start => \&intltool_tree_start);
4398 - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
4399 - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
4400 - my $tree = $xp->parsefile($filename);
4401 -
4402 -# <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
4403 -# would be:
4404 -# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{},
4405 -# 0, "Howdy", ref, [{}]], 0, "do" ] ]
4406 -
4407 - return $tree;
4408 -}
4409 -
4410 -sub print_header
4411 -{
4412 - my $infile = shift;
4413 - my $fh = shift;
4414 - my $source;
4415 -
4416 - if(!-f $infile) {
4417 - die "ERROR Cannot find filename: $infile\n";
4418 - }
4419 -
4420 - print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
4421 - {
4422 - local $/;
4423 - open DOCINPUT, "<${FILE}" or die;
4424 - $source = <DOCINPUT>;
4425 - close DOCINPUT;
4426 - }
4427 - if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
4428 - {
4429 - print $fh "$1\n";
4430 - }
4431 - elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
4432 - {
4433 - print $fh "$1\n";
4434 - }
4435 -}
4436 -
4437 -sub parseTree
4438 -{
4439 - my $fh = shift;
4440 - my $ref = shift;
4441 - my $language = shift || "";
4442 -
4443 - my $name = shift @{ $ref };
4444 - my $cont = shift @{ $ref };
4445 -
4446 - while (!$name || "$name" eq "1") {
4447 - $name = shift @{ $ref };
4448 - $cont = shift @{ $ref };
4449 - }
4450 -
4451 - my $spacepreserve = 0;
4452 - my $attrs = @{$cont}[0];
4453 - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
4454 -
4455 - traverse($fh, $name, $cont, $language, $spacepreserve);
4456 -}
4457 -
4458 -sub xml_merge_output
4459 -{
4460 - my $source;
4461 -
4462 - if ($MULTIPLE_OUTPUT) {
4463 - for my $lang (sort keys %po_files_by_lang) {
4464 - if ( ! -e $lang ) {
4465 - mkdir $lang or die "Cannot create subdirectory $lang: $!\n";
4466 - }
4467 - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
4468 - binmode (OUTPUT) if $^O eq 'MSWin32';
4469 - my $tree = readXml($FILE);
4470 - print_header($FILE, \*OUTPUT);
4471 - parseTree(\*OUTPUT, $tree, $lang);
4472 - close OUTPUT;
4473 - print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
4474 - }
4475 - }
4476 - open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
4477 - binmode (OUTPUT) if $^O eq 'MSWin32';
4478 - my $tree = readXml($FILE);
4479 - print_header($FILE, \*OUTPUT);
4480 - parseTree(\*OUTPUT, $tree);
4481 - close OUTPUT;
4482 - print "CREATED $OUTFILE\n" unless $QUIET_ARG;
4483 -}
4484 -
4485 -sub keys_merge_translations
4486 -{
4487 - open INPUT, "<${FILE}" or die;
4488 - open OUTPUT, ">${OUTFILE}" or die;
4489 - binmode (OUTPUT) if $^O eq 'MSWin32';
4490 -
4491 - while (<INPUT>)
4492 - {
4493 - if (s/^(\s*)_(\w+=(.*))/$1$2/)
4494 - {
4495 - my $string = $3;
4496 -
4497 - print OUTPUT;
4498 -
4499 - my $non_translated_line = $_;
4500 -
4501 - for my $lang (sort keys %po_files_by_lang)
4502 - {
4503 - my $translation = $translations{$lang, $string};
4504 - next if !$translation;
4505 -
4506 - $_ = $non_translated_line;
4507 - s/(\w+)=.*/[$lang]$1=$translation/;
4508 - print OUTPUT;
4509 - }
4510 - }
4511 - else
4512 - {
4513 - print OUTPUT;
4514 - }
4515 - }
4516 -
4517 - close OUTPUT;
4518 - close INPUT;
4519 -}
4520 -
4521 -sub desktop_merge_translations
4522 -{
4523 - open INPUT, "<${FILE}" or die;
4524 - open OUTPUT, ">${OUTFILE}" or die;
4525 - binmode (OUTPUT) if $^O eq 'MSWin32';
4526 -
4527 - while (<INPUT>)
4528 - {
4529 - if (s/^(\s*)_(\w+=(.*))/$1$2/)
4530 - {
4531 - my $string = $3;
4532 -
4533 - print OUTPUT;
4534 -
4535 - my $non_translated_line = $_;
4536 -
4537 - for my $lang (sort keys %po_files_by_lang)
4538 - {
4539 - my $translation = $translations{$lang, $string};
4540 - next if !$translation;
4541 -
4542 - $_ = $non_translated_line;
4543 - s/(\w+)=.*/${1}[$lang]=$translation/;
4544 - print OUTPUT;
4545 - }
4546 - }
4547 - else
4548 - {
4549 - print OUTPUT;
4550 - }
4551 - }
4552 -
4553 - close OUTPUT;
4554 - close INPUT;
4555 -}
4556 -
4557 -sub schemas_merge_translations
4558 -{
4559 - my $source;
4560 -
4561 - {
4562 - local $/; # slurp mode
4563 - open INPUT, "<$FILE" or die "can't open $FILE: $!";
4564 - $source = <INPUT>;
4565 - close INPUT;
4566 - }
4567 -
4568 - open OUTPUT, ">$OUTFILE" or die;
4569 - binmode (OUTPUT) if $^O eq 'MSWin32';
4570 -
4571 - # FIXME: support attribute translations
4572 -
4573 - # Empty nodes never need translation, so unmark all of them.
4574 - # For example, <_foo/> is just replaced by <foo/>.
4575 - $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
4576 -
4577 - while ($source =~ s/
4578 - (.*?)
4579 - (\s+)(<locale\ name="C">(\s*)
4580 - (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
4581 - (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
4582 - (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
4583 - <\/locale>)
4584 - //sx)
4585 - {
4586 - print OUTPUT $1;
4587 -
4588 - my $locale_start_spaces = $2 ? $2 : '';
4589 - my $default_spaces = $4 ? $4 : '';
4590 - my $short_spaces = $7 ? $7 : '';
4591 - my $long_spaces = $10 ? $10 : '';
4592 - my $locale_end_spaces = $13 ? $13 : '';
4593 - my $c_default_block = $3 ? $3 : '';
4594 - my $default_string = $6 ? $6 : '';
4595 - my $short_string = $9 ? $9 : '';
4596 - my $long_string = $12 ? $12 : '';
4597 -
4598 - print OUTPUT "$locale_start_spaces$c_default_block";
4599 -
4600 - $default_string =~ s/\s+/ /g;
4601 - $default_string = entity_decode($default_string);
4602 - $short_string =~ s/\s+/ /g;
4603 - $short_string = entity_decode($short_string);
4604 - $long_string =~ s/\s+/ /g;
4605 - $long_string = entity_decode($long_string);
4606 -
4607 - for my $lang (sort keys %po_files_by_lang)
4608 - {
4609 - my $default_translation = $translations{$lang, $default_string};
4610 - my $short_translation = $translations{$lang, $short_string};
4611 - my $long_translation = $translations{$lang, $long_string};
4612 -
4613 - next if (!$default_translation && !$short_translation &&
4614 - !$long_translation);
4615 -
4616 - print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
4617 -
4618 - print OUTPUT "$default_spaces";
4619 -
4620 - if ($default_translation)
4621 - {
4622 - $default_translation = entity_encode($default_translation);
4623 - print OUTPUT "<default>$default_translation</default>";
4624 - }
4625 -
4626 - print OUTPUT "$short_spaces";
4627 -
4628 - if ($short_translation)
4629 - {
4630 - $short_translation = entity_encode($short_translation);
4631 - print OUTPUT "<short>$short_translation</short>";
4632 - }
4633 -
4634 - print OUTPUT "$long_spaces";
4635 -
4636 - if ($long_translation)
4637 - {
4638 - $long_translation = entity_encode($long_translation);
4639 - print OUTPUT "<long>$long_translation</long>";
4640 - }
4641 -
4642 - print OUTPUT "$locale_end_spaces</locale>";
4643 - }
4644 - }
4645 -
4646 - print OUTPUT $source;
4647 -
4648 - close OUTPUT;
4649 -}
4650 -
4651 -sub rfc822deb_merge_translations
4652 -{
4653 - my %encodings = ();
4654 - for my $lang (keys %po_files_by_lang) {
4655 - $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
4656 - }
4657 -
4658 - my $source;
4659 -
4660 - $Text::Wrap::huge = 'overflow';
4661 - $Text::Wrap::break = qr/\n|\s(?=\S)/;
4662 -
4663 - {
4664 - local $/; # slurp mode
4665 - open INPUT, "<$FILE" or die "can't open $FILE: $!";
4666 - $source = <INPUT>;
4667 - close INPUT;
4668 - }
4669 -
4670 - open OUTPUT, ">${OUTFILE}" or die;
4671 - binmode (OUTPUT) if $^O eq 'MSWin32';
4672 -
4673 - while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
4674 - {
4675 - my $sep = $1;
4676 - my $non_translated_line = $3.$4;
4677 - my $string = $5;
4678 - my $underscore = length($2);
4679 - next if $underscore eq 0 && $non_translated_line =~ /^#/;
4680 - # Remove [] dummy strings
4681 - my $stripped = $string;
4682 - $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
4683 - $stripped =~ s/\[\s[^\[\]]*\]$//;
4684 - $non_translated_line .= $stripped;
4685 -
4686 - print OUTPUT $sep.$non_translated_line;
4687 -
4688 - if ($underscore)
4689 - {
4690 - my @str_list = rfc822deb_split($underscore, $string);
4691 -
4692 - for my $lang (sort keys %po_files_by_lang)
4693 - {
4694 - my $is_translated = 1;
4695 - my $str_translated = '';
4696 - my $first = 1;
4697 -
4698 - for my $str (@str_list)
4699 - {
4700 - my $translation = $translations{$lang, $str};
4701 -
4702 - if (!$translation)
4703 - {
4704 - $is_translated = 0;
4705 - last;
4706 - }
4707 -
4708 - # $translation may also contain [] dummy
4709 - # strings, mostly to indicate an empty string
4710 - $translation =~ s/\[\s[^\[\]]*\]$//;
4711 -
4712 - if ($first)
4713 - {
4714 - if ($underscore eq 2)
4715 - {
4716 - $str_translated .= $translation;
4717 - }
4718 - else
4719 - {
4720 - $str_translated .=
4721 - Text::Tabs::expand($translation) .
4722 - "\n";
4723 - }
4724 - }
4725 - else
4726 - {
4727 - if ($underscore eq 2)
4728 - {
4729 - $str_translated .= ', ' . $translation;
4730 - }
4731 - else
4732 - {
4733 - $str_translated .= Text::Tabs::expand(
4734 - Text::Wrap::wrap(' ', ' ', $translation)) .
4735 - "\n .\n";
4736 - }
4737 - }
4738 - $first = 0;
4739 -
4740 - # To fix some problems with Text::Wrap::wrap
4741 - $str_translated =~ s/(\n )+\n/\n .\n/g;
4742 - }
4743 - next unless $is_translated;
4744 -
4745 - $str_translated =~ s/\n \.\n$//;
4746 - $str_translated =~ s/\s+$//;
4747 -
4748 - $_ = $non_translated_line;
4749 - s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
4750 - print OUTPUT;
4751 - }
4752 - }
4753 - }
4754 - print OUTPUT "\n";
4755 -
4756 - close OUTPUT;
4757 - close INPUT;
4758 -}
4759 -
4760 -sub rfc822deb_split
4761 -{
4762 - # Debian defines a special way to deal with rfc822-style files:
4763 - # when a value contain newlines, it consists of
4764 - # 1. a short form (first line)
4765 - # 2. a long description, all lines begin with a space,
4766 - # and paragraphs are separated by a single dot on a line
4767 - # This routine returns an array of all paragraphs, and reformat
4768 - # them.
4769 - # When first argument is 2, the string is a comma separated list of
4770 - # values.
4771 - my $type = shift;
4772 - my $text = shift;
4773 - $text =~ s/^[ \t]//mg;
4774 - return (split(/, */, $text, 0)) if $type ne 1;
4775 - return ($text) if $text !~ /\n/;
4776 -
4777 - $text =~ s/([^\n]*)\n//;
4778 - my @list = ($1);
4779 - my $str = '';
4780 -
4781 - for my $line (split (/\n/, $text))
4782 - {
4783 - chomp $line;
4784 - if ($line =~ /^\.\s*$/)
4785 - {
4786 - # New paragraph
4787 - $str =~ s/\s*$//;
4788 - push(@list, $str);
4789 - $str = '';
4790 - }
4791 - elsif ($line =~ /^\s/)
4792 - {
4793 - # Line which must not be reformatted
4794 - $str .= "\n" if length ($str) && $str !~ /\n$/;
4795 - $line =~ s/\s+$//;
4796 - $str .= $line."\n";
4797 - }
4798 - else
4799 - {
4800 - # Continuation line, remove newline
4801 - $str .= " " if length ($str) && $str !~ /\n$/;
4802 - $str .= $line;
4803 - }
4804 - }
4805 -
4806 - $str =~ s/\s*$//;
4807 - push(@list, $str) if length ($str);
4808 -
4809 - return @list;
4810 -}
4811 -
4812 diff -Naur mplayerplug-in-3.55/intltool-update.in mplayerplug-in.tpg/intltool-update.in
4813 --- mplayerplug-in-3.55/intltool-update.in 2006-09-11 21:32:07.000000000 +0200
4814 +++ mplayerplug-in.tpg/intltool-update.in 1970-01-01 01:00:00.000000000 +0100
4815 @@ -1,1065 +0,0 @@
4816 -#!@INTLTOOL_PERL@ -w
4817 -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
4818 -
4819 -#
4820 -# The Intltool Message Updater
4821 -#
4822 -# Copyright (C) 2000-2003 Free Software Foundation.
4823 -#
4824 -# Intltool is free software; you can redistribute it and/or
4825 -# modify it under the terms of the GNU General Public License
4826 -# version 2 published by the Free Software Foundation.
4827 -#
4828 -# Intltool is distributed in the hope that it will be useful,
4829 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
4830 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4831 -# General Public License for more details.
4832 -#
4833 -# You should have received a copy of the GNU General Public License
4834 -# along with this program; if not, write to the Free Software
4835 -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
4836 -#
4837 -# As a special exception to the GNU General Public License, if you
4838 -# distribute this file as part of a program that contains a
4839 -# configuration script generated by Autoconf, you may include it under
4840 -# the same distribution terms that you use for the rest of that program.
4841 -#
4842 -# Authors: Kenneth Christiansen <kenneth@gnu.org>
4843 -# Maciej Stachowiak
4844 -# Darin Adler <darin@bentspoon.com>
4845 -
4846 -## Release information
4847 -my $PROGRAM = "intltool-update";
4848 -my $VERSION = "0.34.2";
4849 -my $PACKAGE = "intltool";
4850 -
4851 -## Loaded modules
4852 -use strict;
4853 -use Getopt::Long;
4854 -use Cwd;
4855 -use File::Copy;
4856 -use File::Find;
4857 -
4858 -## Scalars used by the option stuff
4859 -my $HELP_ARG = 0;
4860 -my $VERSION_ARG = 0;
4861 -my $DIST_ARG = 0;
4862 -my $POT_ARG = 0;
4863 -my $HEADERS_ARG = 0;
4864 -my $MAINTAIN_ARG = 0;
4865 -my $REPORT_ARG = 0;
4866 -my $VERBOSE = 0;
4867 -my $GETTEXT_PACKAGE = "";
4868 -my $OUTPUT_FILE = "";
4869 -
4870 -my @languages;
4871 -my %varhash = ();
4872 -my %po_files_by_lang = ();
4873 -
4874 -# Regular expressions to categorize file types.
4875 -# FIXME: Please check if the following is correct
4876 -
4877 -my $xml_support =
4878 -"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required)
4879 -"ui|". # Bonobo specific - User Interface desc. files
4880 -"lang|". # ?
4881 -"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required)
4882 -"scm(?:\\.in)*|". # ? (Note: .in is not required)
4883 -"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files
4884 -"etspec|". # ?
4885 -"server(?:\\.in)+|". # Bonobo specific
4886 -"sheet(?:\\.in)+|". # ?
4887 -"schemas(?:\\.in)+|". # GConf specific
4888 -"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
4889 -"kbd(?:\\.in)+"; # GOK specific.
4890 -
4891 -my $ini_support =
4892 -"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
4893 -"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
4894 -"caves(?:\\.in)+|". # GNOME Games specific
4895 -"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
4896 -"soundlist(?:\\.in)+|". # GNOME specific
4897 -"keys(?:\\.in)+|". # GNOME Mime database specific
4898 -"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
4899 -"service(?:\\.in)+"; # DBus specific
4900 -
4901 -my $buildin_gettext_support =
4902 -"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
4903 -
4904 -## Always flush buffer when printing
4905 -$| = 1;
4906 -
4907 -## Sometimes the source tree will be rooted somewhere else.
4908 -my $SRCDIR = ".";
4909 -my $POTFILES_in;
4910 -
4911 -$SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"};
4912 -$POTFILES_in = "<$SRCDIR/POTFILES.in";
4913 -
4914 -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
4915 -
4916 -## Handle options
4917 -GetOptions
4918 -(
4919 - "help" => \$HELP_ARG,
4920 - "version" => \$VERSION_ARG,
4921 - "dist|d" => \$DIST_ARG,
4922 - "pot|p" => \$POT_ARG,
4923 - "headers|s" => \$HEADERS_ARG,
4924 - "maintain|m" => \$MAINTAIN_ARG,
4925 - "report|r" => \$REPORT_ARG,
4926 - "verbose|x" => \$VERBOSE,
4927 - "gettext-package|g=s" => \$GETTEXT_PACKAGE,
4928 - "output-file|o=s" => \$OUTPUT_FILE,
4929 - ) or &Console_WriteError_InvalidOption;
4930 -
4931 -&Console_Write_IntltoolHelp if $HELP_ARG;
4932 -&Console_Write_IntltoolVersion if $VERSION_ARG;
4933 -
4934 -my $arg_count = ($DIST_ARG > 0)
4935 - + ($POT_ARG > 0)
4936 - + ($HEADERS_ARG > 0)
4937 - + ($MAINTAIN_ARG > 0)
4938 - + ($REPORT_ARG > 0);
4939 -
4940 -&Console_Write_IntltoolHelp if $arg_count > 1;
4941 -
4942 -# --version and --help don't require a module name
4943 -my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
4944 -
4945 -if ($POT_ARG)
4946 -{
4947 - &GenerateHeaders;
4948 - &GeneratePOTemplate;
4949 -}
4950 -elsif ($HEADERS_ARG)
4951 -{
4952 - &GenerateHeaders;
4953 -}
4954 -elsif ($MAINTAIN_ARG)
4955 -{
4956 - &FindLeftoutFiles;
4957 -}
4958 -elsif ($REPORT_ARG)
4959 -{
4960 - &GenerateHeaders;
4961 - &GeneratePOTemplate;
4962 - &Console_Write_CoverageReport;
4963 -}
4964 -elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
4965 -{
4966 - my $lang = $ARGV[0];
4967 -
4968 - ## Report error if the language file supplied
4969 - ## to the command line is non-existent
4970 - &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
4971 - if ! -s "$SRCDIR/$lang.po";
4972 -
4973 - if (!$DIST_ARG)
4974 - {
4975 - print "Working, please wait..." if $VERBOSE;
4976 - &GenerateHeaders;
4977 - &GeneratePOTemplate;
4978 - }
4979 - &POFile_Update ($lang, $OUTPUT_FILE);
4980 - &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
4981 -}
4982 -else
4983 -{
4984 - &Console_Write_IntltoolHelp;
4985 -}
4986 -