home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 8 / IOPROG_8.ISO / soft / sdkplnet / mac / macnpsdk.sit / PluginSDK / Common / npmac.cpp next >
MacBinary  |  1996-09-17  |  17.5 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Sep 17 16:06:33 1996, modified Tue Sep 17 16:06:33 1996, creator 'CWIE', type ASCII, 17211 bytes "npmac.cpp" , at 0x43bb 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 6e 70 6d 61 63 2e | 63 70 70 00 00 00 00 00 |..npmac.|cpp.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 43 3b 00 | 00 01 9a ae 64 b5 49 ae |.....C;.|....d.I.|
|00000060| 64 b5 49 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |d.I.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0f 1d 00 00 |........|........|
|00000080| 2f 2f 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |//::::::|::::::::|
|00000090| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000000a0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000000b0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000000c0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000000d0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 0a 2f 2f 0a |::::::::|::::.//.|
|000000e0| 2f 2f 20 6e 70 6d 61 63 | 2e 63 70 70 0a 2f 2f 0a |// npmac|.cpp.//.|
|000000f0| 2f 2f 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |//::::::|::::::::|
|00000100| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000110| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000120| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000130| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000140| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 0a 0a 23 69 |::::::::|::::..#i|
|00000150| 6e 63 6c 75 64 65 20 3c | 50 72 6f 63 65 73 73 65 |nclude <|Processe|
|00000160| 73 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 47 |s.h>.#in|clude <G|
|00000170| 65 73 74 61 6c 74 2e 68 | 3e 0a 23 69 6e 63 6c 75 |estalt.h|>.#inclu|
|00000180| 64 65 20 3c 46 72 61 67 | 4c 6f 61 64 2e 68 3e 0a |de <Frag|Load.h>.|
|00000190| 23 69 6e 63 6c 75 64 65 | 20 3c 54 69 6d 65 72 2e |#include| <Timer.|
|000001a0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 52 65 73 |h>.#incl|ude <Res|
|000001b0| 6f 75 72 63 65 73 2e 68 | 3e 0a 23 69 6e 63 6c 75 |ources.h|>.#inclu|
|000001c0| 64 65 20 3c 54 6f 6f 6c | 55 74 69 6c 73 2e 68 3e |de <Tool|Utils.h>|
|000001d0| 0a 0a 23 64 65 66 69 6e | 65 20 58 50 5f 4d 41 43 |..#defin|e XP_MAC|
|000001e0| 20 31 0a 0a 2f 2f 0a 2f | 2f 20 41 34 53 74 75 66 | 1..//./|/ A4Stuf|
|000001f0| 66 2e 68 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |f.h cont|ains the|
|00000200| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 6f 66 20 45 | definit|ion of E|
|00000210| 6e 74 65 72 43 6f 64 65 | 52 65 73 6f 75 72 63 65 |nterCode|Resource|
|00000220| 20 61 6e 64 20 0a 2f 2f | 20 45 6e 74 65 72 43 6f | and .//| EnterCo|
|00000230| 64 65 52 65 73 6f 75 72 | 63 65 2c 20 75 73 65 64 |deResour|ce, used|
|00000240| 20 66 6f 72 20 73 65 74 | 74 69 6e 67 20 75 70 20 | for set|ting up |
|00000250| 74 68 65 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |the code| resourc|
|00000260| 65 d5 73 0a 2f 2f 20 67 | 6c 6f 62 61 6c 73 20 66 |e.s.// g|lobals f|
|00000270| 6f 72 20 36 38 4b 20 28 | 61 6e 61 6c 61 67 6f 75 |or 68K (|analagou|
|00000280| 73 20 74 6f 20 74 68 65 | 20 66 75 6e 63 74 69 6f |s to the| functio|
|00000290| 6e 20 53 65 74 43 75 72 | 72 65 6e 74 41 35 0a 2f |n SetCur|rentA5./|
|000002a0| 2f 20 64 65 66 69 6e 65 | 64 20 62 79 20 74 68 65 |/ define|d by the|
|000002b0| 20 74 6f 6f 6c 62 6f 78 | 29 2e 0a 2f 2f 0a 23 69 | toolbox|)..//.#i|
|000002c0| 6e 63 6c 75 64 65 20 3c | 41 34 53 74 75 66 66 2e |nclude <|A4Stuff.|
|000002d0| 68 3e 0a 0a 0a 23 69 6e | 63 6c 75 64 65 20 22 6e |h>...#in|clude "n|
|000002e0| 70 61 70 69 2e 68 22 0a | 0a 2f 2f 0a 2f 2f 20 54 |papi.h".|.//.// T|
|000002f0| 68 65 20 4d 69 78 65 64 | 20 4d 6f 64 65 20 70 72 |he Mixed| Mode pr|
|00000300| 6f 63 49 6e 66 6f 73 20 | 64 65 66 69 6e 65 64 20 |ocInfos |defined |
|00000310| 69 6e 20 6e 70 75 70 70 | 2e 68 20 61 73 73 75 6d |in npupp|.h assum|
|00000320| 65 20 54 68 69 6e 6b 20 | 43 2d 0a 2f 2f 20 73 74 |e Think |C-.// st|
|00000330| 79 6c 65 20 63 61 6c 6c | 69 6e 67 20 63 6f 6e 76 |yle call|ing conv|
|00000340| 65 6e 74 69 6f 6e 73 2e | 20 20 54 68 65 73 65 20 |entions.| These |
|00000350| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 20 61 72 65 20 |conventi|ons are |
|00000360| 75 73 65 64 20 62 79 0a | 2f 2f 20 4d 65 74 72 6f |used by.|// Metro|
|00000370| 77 65 72 6b 73 20 77 69 | 74 68 20 74 68 65 20 65 |werks wi|th the e|
|00000380| 78 63 65 70 74 69 6f 6e | 20 6f 66 20 70 6f 69 6e |xception| of poin|
|00000390| 74 65 72 20 72 65 74 75 | 72 6e 20 74 79 70 65 73 |ter retu|rn types|
|000003a0| 2c 20 77 68 69 63 68 0a | 2f 2f 20 69 6e 20 4d 65 |, which.|// in Me|
|000003b0| 74 72 6f 77 65 72 6b 73 | 20 36 38 4b 20 61 72 65 |trowerks| 68K are|
|000003c0| 20 72 65 74 75 72 6e 65 | 64 20 69 6e 20 41 30 2c | returne|d in A0,|
|000003d0| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 74 68 65 20 | instead| of the |
|000003e0| 73 74 61 6e 64 61 72 64 | 0a 2f 2f 20 44 30 2e 20 |standard|.// D0. |
|000003f0| 54 68 75 73 2c 20 73 69 | 6e 63 65 20 4e 50 4e 5f |Thus, si|nce NPN_|
|00000400| 4d 65 6d 41 6c 6c 6f 63 | 20 61 6e 64 20 4e 50 4e |MemAlloc| and NPN|
|00000410| 5f 55 73 65 72 41 67 65 | 6e 74 20 72 65 74 75 72 |_UserAge|nt retur|
|00000420| 6e 20 70 6f 69 6e 74 65 | 72 73 2c 0a 2f 2f 20 4d |n pointe|rs,.// M|
|00000430| 69 78 65 64 20 4d 6f 64 | 65 20 77 69 6c 6c 20 72 |ixed Mod|e will r|
|00000440| 65 74 75 72 6e 20 74 68 | 65 20 76 61 6c 75 65 73 |eturn th|e values|
|00000450| 20 74 6f 20 61 20 36 38 | 4b 20 70 6c 75 67 69 6e | to a 68|K plugin|
|00000460| 20 69 6e 20 44 30 2c 20 | 62 75 74 20 0a 2f 2f 20 | in D0, |but .// |
|00000470| 61 20 36 38 4b 20 70 6c | 75 67 69 6e 20 63 6f 6d |a 68K pl|ugin com|
|00000480| 70 69 6c 65 64 20 62 79 | 20 4d 65 74 72 6f 77 65 |piled by| Metrowe|
|00000490| 72 6b 73 20 77 69 6c 6c | 20 65 78 70 65 63 74 20 |rks will| expect |
|000004a0| 74 68 65 20 72 65 73 75 | 6c 74 20 69 6e 0a 2f 2f |the resu|lt in.//|
|000004b0| 20 41 30 2e 20 20 54 68 | 65 20 66 6f 6c 6c 6f 77 | A0. Th|e follow|
|000004c0| 69 6e 67 20 70 72 61 67 | 6d 61 20 66 6f 72 63 65 |ing prag|ma force|
|000004d0| 73 20 4d 65 74 72 6f 77 | 65 72 6b 73 20 74 6f 20 |s Metrow|erks to |
|000004e0| 75 73 65 20 44 30 20 69 | 6e 73 74 65 61 64 2e 0a |use D0 i|nstead..|
|000004f0| 2f 2f 0a 23 69 66 64 65 | 66 20 5f 5f 4d 57 45 52 |//.#ifde|f __MWER|
|00000500| 4b 53 5f 5f 0a 23 69 66 | 6e 64 65 66 20 70 6f 77 |KS__.#if|ndef pow|
|00000510| 65 72 63 0a 23 70 72 61 | 67 6d 61 20 70 6f 69 6e |erc.#pra|gma poin|
|00000520| 74 65 72 73 5f 69 6e 5f | 44 30 0a 23 65 6e 64 69 |ters_in_|D0.#endi|
|00000530| 66 0a 23 65 6e 64 69 66 | 0a 0a 23 69 6e 63 6c 75 |f.#endif|..#inclu|
|00000540| 64 65 20 22 6e 70 75 70 | 70 2e 68 22 0a 0a 23 69 |de "npup|p.h"..#i|
|00000550| 66 64 65 66 20 5f 5f 4d | 57 45 52 4b 53 5f 5f 0a |fdef __M|WERKS__.|
|00000560| 23 69 66 6e 64 65 66 20 | 70 6f 77 65 72 63 0a 23 |#ifndef |powerc.#|
|00000570| 70 72 61 67 6d 61 20 70 | 6f 69 6e 74 65 72 73 5f |pragma p|ointers_|
|00000580| 69 6e 5f 41 30 0a 23 65 | 6e 64 69 66 0a 23 65 6e |in_A0.#e|ndif.#en|
|00000590| 64 69 66 0a 0a 2f 2f 20 | 54 68 65 20 66 6f 6c 6c |dif..// |The foll|
|000005a0| 6f 77 69 6e 67 20 66 69 | 78 20 66 6f 72 20 73 74 |owing fi|x for st|
|000005b0| 61 74 69 63 20 69 6e 69 | 74 69 61 6c 69 7a 65 72 |atic ini|tializer|
|000005c0| 73 20 28 77 68 69 63 68 | 20 66 69 78 65 73 20 61 |s (which| fixes a|
|000005d0| 20 70 72 65 69 6f 75 73 | 0a 2f 2f 20 69 6e 63 6f | preious|.// inco|
|000005e0| 6d 70 61 74 69 62 69 6c | 69 74 79 20 77 69 74 68 |mpatibil|ity with|
|000005f0| 20 73 6f 6d 65 20 70 61 | 72 74 73 20 6f 66 20 50 | some pa|rts of P|
|00000600| 6f 77 65 72 50 6c 61 6e | 74 2c 20 77 61 73 20 73 |owerPlan|t, was s|
|00000610| 75 62 6d 69 74 74 65 64 | 20 62 79 20 0a 2f 2f 20 |ubmitted| by .// |
|00000620| 4a 61 6e 20 55 6c 62 72 | 69 63 68 2e 0a 23 69 66 |Jan Ulbr|ich..#if|
|00000630| 64 65 66 20 5f 5f 4d 57 | 45 52 4b 53 5f 5f 0a 09 |def __MW|ERKS__..|
|00000640| 23 69 66 64 65 66 20 5f | 5f 63 70 6c 75 73 70 6c |#ifdef _|_cpluspl|
|00000650| 75 73 0a 09 65 78 74 65 | 72 6e 20 22 43 22 20 7b |us..exte|rn "C" {|
|00000660| 0a 09 23 65 6e 64 69 66 | 0a 09 09 23 69 66 6e 64 |..#endif|...#ifnd|
|00000670| 65 66 20 70 6f 77 65 72 | 63 0a 09 09 09 65 78 74 |ef power|c....ext|
|00000680| 65 72 6e 20 76 6f 69 64 | 09 5f 5f 49 6e 69 74 43 |ern void|.__InitC|
|00000690| 6f 64 65 5f 5f 28 76 6f | 69 64 29 3b 0a 09 09 23 |ode__(vo|id);...#|
|000006a0| 65 6c 73 65 0a 09 09 09 | 65 78 74 65 72 6e 20 76 |else....|extern v|
|000006b0| 6f 69 64 20 5f 5f 73 69 | 6e 69 74 28 76 6f 69 64 |oid __si|nit(void|
|000006c0| 29 3b 0a 09 09 09 23 64 | 65 66 69 6e 65 20 5f 5f |);....#d|efine __|
|000006d0| 49 6e 69 74 43 6f 64 65 | 5f 5f 20 5f 5f 73 69 6e |InitCode|__ __sin|
|000006e0| 69 74 0a 09 09 23 65 6e | 64 69 66 0a 09 09 65 78 |it...#en|dif...ex|
|000006f0| 74 65 72 6e 20 76 6f 69 | 64 09 5f 5f 64 65 73 74 |tern voi|d.__dest|
|00000700| 72 6f 79 5f 67 6c 6f 62 | 61 6c 5f 63 68 61 69 6e |roy_glob|al_chain|
|00000710| 28 76 6f 69 64 29 3b 0a | 09 23 69 66 64 65 66 20 |(void);.|.#ifdef |
|00000720| 5f 5f 63 70 6c 75 73 70 | 6c 75 73 0a 09 7d 0a 09 |__cplusp|lus..}..|
|00000730| 23 65 6e 64 69 66 20 2f | 2f 20 5f 5f 63 70 6c 75 |#endif /|/ __cplu|
|00000740| 73 70 6c 75 73 0a 23 65 | 6e 64 69 66 20 2f 2f 20 |splus.#e|ndif // |
|00000750| 5f 5f 4d 57 45 52 4b 53 | 5f 5f 0a 0a 2f 2f 0a 2f |__MWERKS|__..//./|
|00000760| 2f 20 44 65 66 69 6e 65 | 20 50 4c 55 47 49 4e 5f |/ Define| PLUGIN_|
|00000770| 54 52 41 43 45 20 74 6f | 20 31 20 74 6f 20 68 61 |TRACE to| 1 to ha|
|00000780| 76 65 20 74 68 65 20 77 | 72 61 70 70 65 72 20 66 |ve the w|rapper f|
|00000790| 75 6e 63 74 69 6f 6e 73 | 20 65 6d 69 74 0a 2f 2f |unctions| emit.//|
|000007a0| 20 44 65 62 75 67 53 74 | 72 20 6d 65 73 73 61 67 | DebugSt|r messag|
|000007b0| 65 73 20 77 68 65 6e 65 | 76 65 72 20 74 68 65 79 |es whene|ver they|
|000007c0| 20 61 72 65 20 63 61 6c | 6c 65 64 2e 0a 2f 2f 0a | are cal|led..//.|
|000007d0| 23 64 65 66 69 6e 65 20 | 50 4c 55 47 49 4e 5f 54 |#define |PLUGIN_T|
|000007e0| 52 41 43 45 20 30 0a 0a | 23 69 66 20 50 4c 55 47 |RACE 0..|#if PLUG|
|000007f0| 49 4e 5f 54 52 41 43 45 | 0a 23 64 65 66 69 6e 65 |IN_TRACE|.#define|
|00000800| 20 50 4c 55 47 49 4e 44 | 45 42 55 47 53 54 52 28 | PLUGIND|EBUGSTR(|
|00000810| 6d 73 67 29 09 09 3a 3a | 44 65 62 75 67 53 74 72 |msg)..::|DebugStr|
|00000820| 28 6d 73 67 29 0a 23 65 | 6c 73 65 0a 23 64 65 66 |(msg).#e|lse.#def|
|00000830| 69 6e 65 20 50 4c 55 47 | 49 4e 44 45 42 55 47 53 |ine PLUG|INDEBUGS|
|00000840| 54 52 0a 23 65 6e 64 69 | 66 0a 0a 0a 0a 0a 0a 0a |TR.#endi|f.......|
|00000850| 2f 2f 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |//::::::|::::::::|
|00000860| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000870| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000880| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000890| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000008a0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 0a 2f 2f 0a |::::::::|::::.//.|
|000008b0| 2f 2f 20 47 6c 6f 62 61 | 6c 73 0a 2f 2f 0a 2f 2f |// Globa|ls.//.//|
|000008c0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000008d0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000008e0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000008f0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000900| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000910| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 0a 0a 51 44 47 6c |::::::::|::..QDGl|
|00000920| 6f 62 61 6c 73 2a 09 09 | 67 51 44 50 74 72 3b 09 |obals*..|gQDPtr;.|
|00000930| 09 09 09 2f 2f 20 50 6f | 69 6e 74 65 72 20 74 6f |...// Po|inter to|
|00000940| 20 4e 65 74 73 63 61 70 | 65 d5 73 20 51 75 69 63 | Netscap|e.s Quic|
|00000950| 6b 44 72 61 77 20 67 6c | 6f 62 61 6c 73 0a 73 68 |kDraw gl|obals.sh|
|00000960| 6f 72 74 09 09 09 67 52 | 65 73 46 69 6c 65 3b 09 |ort...gR|esFile;.|
|00000970| 09 09 2f 2f 20 52 65 66 | 6e 75 6d 20 6f 66 20 74 |..// Ref|num of t|
|00000980| 68 65 20 70 6c 75 67 69 | 6e d5 73 20 72 65 73 6f |he plugi|n.s reso|
|00000990| 75 72 63 65 20 66 69 6c | 65 0a 4e 50 4e 65 74 73 |urce fil|e.NPNets|
|000009a0| 63 61 70 65 46 75 6e 63 | 73 09 67 4e 65 74 73 63 |capeFunc|s.gNetsc|
|000009b0| 61 70 65 46 75 6e 63 73 | 3b 09 09 2f 2f 20 46 75 |apeFuncs|;..// Fu|
|000009c0| 6e 63 74 69 6f 6e 20 74 | 61 62 6c 65 20 66 6f 72 |nction t|able for|
|000009d0| 20 70 72 6f 63 73 20 69 | 6e 20 4e 65 74 73 63 61 | procs i|n Netsca|
|000009e0| 70 65 20 63 61 6c 6c 65 | 64 20 62 79 20 70 6c 75 |pe calle|d by plu|
|000009f0| 67 69 6e 0a 0a 0a 2f 2f | 3a 3a 3a 3a 3a 3a 3a 3a |gin...//|::::::::|
|00000a00| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000a10| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000a20| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000a30| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000a40| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000a50| 3a 3a 0a 2f 2f 0a 2f 2f | 20 57 72 61 70 70 65 72 |::.//.//| Wrapper|
|00000a60| 20 66 75 6e 63 74 69 6f | 6e 73 20 66 6f 72 20 61 | functio|ns for a|
|00000a70| 6c 6c 20 63 61 6c 6c 73 | 20 66 72 6f 6d 20 74 68 |ll calls| from th|
|00000a80| 65 20 70 6c 75 67 69 6e | 20 74 6f 20 4e 65 74 73 |e plugin| to Nets|
|00000a90| 63 61 70 65 2e 0a 2f 2f | 20 54 68 65 73 65 20 66 |cape..//| These f|
|00000aa0| 75 6e 63 74 69 6f 6e 73 | 20 6c 65 74 20 74 68 65 |unctions| let the|
|00000ab0| 20 70 6c 75 67 69 6e 20 | 64 65 76 65 6c 6f 70 65 | plugin |develope|
|00000ac0| 72 20 6a 75 73 74 20 63 | 61 6c 6c 20 74 68 65 20 |r just c|all the |
|00000ad0| 41 50 49 73 0a 2f 2f 20 | 61 73 20 64 6f 63 75 6d |APIs.// |as docum|
|00000ae0| 65 6e 74 65 64 20 61 6e | 64 20 64 65 66 69 6e 65 |ented an|d define|
|00000af0| 64 20 69 6e 20 6e 70 61 | 70 69 2e 68 2c 20 77 69 |d in npa|pi.h, wi|
|00000b00| 74 68 6f 75 74 20 6e 65 | 65 64 69 6e 67 20 74 6f |thout ne|eding to|
|00000b10| 20 6b 6e 6f 77 0a 2f 2f | 20 61 62 6f 75 74 20 74 | know.//| about t|
|00000b20| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 74 61 62 6c |he funct|ion tabl|
|00000b30| 65 20 61 6e 64 20 63 61 | 6c 6c 20 6d 61 63 72 6f |e and ca|ll macro|
|00000b40| 73 20 69 6e 20 6e 70 75 | 70 70 2e 68 2e 0a 2f 2f |s in npu|pp.h..//|
|00000b50| 0a 2f 2f 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |.//:::::|::::::::|
|00000b60| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000b70| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000b80| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000b90| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00000ba0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 0a 0a 0a |::::::::|:::::...|
|00000bb0| 76 6f 69 64 20 4e 50 4e | 5f 56 65 72 73 69 6f 6e |void NPN|_Version|
|00000bc0| 28 69 6e 74 2a 20 70 6c | 75 67 69 6e 5f 6d 61 6a |(int* pl|ugin_maj|
|00000bd0| 6f 72 2c 20 69 6e 74 2a | 20 70 6c 75 67 69 6e 5f |or, int*| plugin_|
|00000be0| 6d 69 6e 6f 72 2c 20 69 | 6e 74 2a 20 6e 65 74 73 |minor, i|nt* nets|
|00000bf0| 63 61 70 65 5f 6d 61 6a | 6f 72 2c 20 69 6e 74 2a |cape_maj|or, int*|
|00000c00| 20 6e 65 74 73 63 61 70 | 65 5f 6d 69 6e 6f 72 29 | netscap|e_minor)|
|00000c10| 0a 7b 0a 09 2a 70 6c 75 | 67 69 6e 5f 6d 61 6a 6f |.{..*plu|gin_majo|
|00000c20| 72 20 3d 20 4e 50 5f 56 | 45 52 53 49 4f 4e 5f 4d |r = NP_V|ERSION_M|
|00000c30| 41 4a 4f 52 3b 0a 09 2a | 70 6c 75 67 69 6e 5f 6d |AJOR;..*|plugin_m|
|00000c40| 69 6e 6f 72 20 3d 20 4e | 50 5f 56 45 52 53 49 4f |inor = N|P_VERSIO|
|00000c50| 4e 5f 4d 49 4e 4f 52 3b | 0a 09 2a 6e 65 74 73 63 |N_MINOR;|..*netsc|
|00000c60| 61 70 65 5f 6d 61 6a 6f | 72 20 3d 20 67 4e 65 74 |ape_majo|r = gNet|
|00000c70| 73 63 61 70 65 46 75 6e | 63 73 2e 76 65 72 73 69 |scapeFun|cs.versi|
|00000c80| 6f 6e 20 3e 3e 20 38 3b | 09 09 2f 2f 20 4d 61 6a |on >> 8;|..// Maj|
|00000c90| 6f 72 20 76 65 72 73 69 | 6f 6e 20 69 73 20 69 6e |or versi|on is in|
|00000ca0| 20 68 69 67 68 20 62 79 | 74 65 0a 09 2a 6e 65 74 | high by|te..*net|
|00000cb0| 73 63 61 70 65 5f 6d 69 | 6e 6f 72 20 3d 20 67 4e |scape_mi|nor = gN|
|00000cc0| 65 74 73 63 61 70 65 46 | 75 6e 63 73 2e 76 65 72 |etscapeF|uncs.ver|
|00000cd0| 73 69 6f 6e 20 26 20 30 | 78 46 46 3b 09 2f 2f 20 |sion & 0|xFF;.// |
|00000ce0| 4d 69 6e 6f 72 20 76 65 | 72 73 69 6f 6e 20 69 73 |Minor ve|rsion is|
|00000cf0| 20 69 6e 20 6c 6f 77 20 | 62 79 74 65 0a 7d 0a 0a | in low |byte.}..|
|00000d00| 4e 50 45 72 72 6f 72 20 | 4e 50 4e 5f 47 65 74 55 |NPError |NPN_GetU|
|00000d10| 52 4c 4e 6f 74 69 66 79 | 28 4e 50 50 20 69 6e 73 |RLNotify|(NPP ins|
|00000d20| 74 61 6e 63 65 2c 20 63 | 6f 6e 73 74 20 63 68 61 |tance, c|onst cha|
|00000d30| 72 2a 20 75 72 6c 2c 20 | 63 6f 6e 73 74 20 63 68 |r* url, |const ch|
|00000d40| 61 72 2a 20 77 69 6e 64 | 6f 77 2c 20 76 6f 69 64 |ar* wind|ow, void|
|00000d50| 2a 20 6e 6f 74 69 66 79 | 44 61 74 61 29 0a 7b 0a |* notify|Data).{.|
|00000d60| 09 69 6e 74 20 6e 61 76 | 4d 69 6e 6f 72 56 65 72 |.int nav|MinorVer|
|00000d70| 73 20 3d 20 67 4e 65 74 | 73 63 61 70 65 46 75 6e |s = gNet|scapeFun|
|00000d80| 63 73 2e 76 65 72 73 69 | 6f 6e 20 26 20 30 78 46 |cs.versi|on & 0xF|
|00000d90| 46 3b 0a 09 4e 50 45 72 | 72 6f 72 20 65 72 72 3b |F;..NPEr|ror err;|
|00000da0| 0a 09 0a 09 69 66 28 20 | 6e 61 76 4d 69 6e 6f 72 |....if( |navMinor|
|00000db0| 56 65 72 73 20 3e 3d 20 | 4e 50 56 45 52 53 5f 48 |Vers >= |NPVERS_H|
|00000dc0| 41 53 5f 4e 4f 54 49 46 | 49 43 41 54 49 4f 4e 20 |AS_NOTIF|ICATION |
|00000dd0| 29 0a 09 7b 0a 09 09 65 | 72 72 20 3d 20 43 61 6c |)..{...e|rr = Cal|
|00000de0| 6c 4e 50 4e 5f 47 65 74 | 55 52 4c 4e 6f 74 69 66 |lNPN_Get|URLNotif|
|00000df0| 79 50 72 6f 63 28 67 4e | 65 74 73 63 61 70 65 46 |yProc(gN|etscapeF|
|00000e00| 75 6e 63 73 2e 67 65 74 | 75 72 6c 6e 6f 74 69 66 |uncs.get|urlnotif|
|00000e10| 79 2c 20 69 6e 73 74 61 | 6e 63 65 2c 20 75 72 6c |y, insta|nce, url|
|00000e20| 2c 20 77 69 6e 64 6f 77 | 2c 20 6e 6f 74 69 66 79 |, window|, notify|
|00000e30| 44 61 74 61 29 3b 0a 09 | 7d 0a 09 65 6c 73 65 0a |Data);..|}..else.|
|00000e40| 09 7b 0a 09 09 65 72 72 | 20 3d 20 4e 50 45 52 52 |.{...err| = NPERR|
|00000e50| 5f 49 4e 43 4f 4d 50 41 | 54 49 42 4c 45 5f 56 45 |_INCOMPA|TIBLE_VE|
|00000e60| 52 53 49 4f 4e 5f 45 52 | 52 4f 52 3b 0a 09 7d 0a |RSION_ER|ROR;..}.|
|00000e70| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0a 7d 0a 0a |.return |err;.}..|
|00000e80| 4e 50 45 72 72 6f 72 20 | 4e 50 4e 5f 47 65 74 55 |NPError |NPN_GetU|
|00000e90| 52 4c 28 4e 50 50 20 69 | 6e 73 74 61 6e 63 65 2c |RL(NPP i|nstance,|
|00000ea0| 20 63 6f 6e 73 74 20 63 | 68 61 72 2a 20 75 72 6c | const c|har* url|
|00000eb0| 2c 20 63 6f 6e 73 74 20 | 63 68 61 72 2a 20 77 69 |, const |char* wi|
|00000ec0| 6e 64 6f 77 29 0a 7b 0a | 09 72 65 74 75 72 6e 20 |ndow).{.|.return |
|00000ed0| 43 61 6c 6c 4e 50 4e 5f | 47 65 74 55 52 4c 50 72 |CallNPN_|GetURLPr|
|00000ee0| 6f 63 28 67 4e 65 74 73 | 63 61 70 65 46 75 6e 63 |oc(gNets|capeFunc|
|00000ef0| 73 2e 67 65 74 75 72 6c | 2c 20 69 6e 73 74 61 6e |s.geturl|, instan|
|00000f00| 63 65 2c 20 75 72 6c 2c | 20 77 69 6e 64 6f 77 29 |ce, url,| window)|
|00000f10| 3b 0a 7d 0a 0a 4e 50 45 | 72 72 6f 72 20 4e 50 4e |;.}..NPE|rror NPN|
|00000f20| 5f 50 6f 73 74 55 52 4c | 4e 6f 74 69 66 79 28 4e |_PostURL|Notify(N|
|00000f30| 50 50 20 69 6e 73 74 61 | 6e 63 65 2c 20 63 6f 6e |PP insta|nce, con|
|00000f40| 73 74 20 63 68 61 72 2a | 20 75 72 6c 2c 20 63 6f |st char*| url, co|
|00000f50| 6e 73 74 20 63 68 61 72 | 2a 20 77 69 6e 64 6f 77 |nst char|* window|
|00000f60| 2c 20 75 69 6e 74 33 32 | 20 6c 65 6e 2c 20 63 6f |, uint32| len, co|
|00000f70| 6e 73 74 20 63 68 61 72 | 2a 20 62 75 66 2c 20 4e |nst char|* buf, N|
|00000f80| 50 42 6f 6f 6c 20 66 69 | 6c 65 2c 20 76 6f 69 64 |PBool fi|le, void|
|00000f90| 2a 20 6e 6f 74 69 66 79 | 44 61 74 61 29 0a 7b 0a |* notify|Data).{.|
|00000fa0| 09 69 6e 74 20 6e 61 76 | 4d 69 6e 6f 72 56 65 72 |.int nav|MinorVer|
|00000fb0| 73 20 3d 20 67 4e 65 74 | 73 63 61 70 65 46 75 6e |s = gNet|scapeFun|
|00000fc0| 63 73 2e 76 65 72 73 69 | 6f 6e 20 26 20 30 78 46 |cs.versi|on & 0xF|
|00000fd0| 46 3b 0a 09 4e 50 45 72 | 72 6f 72 20 65 72 72 3b |F;..NPEr|ror err;|
|00000fe0| 0a 09 0a 09 69 66 28 20 | 6e 61 76 4d 69 6e 6f 72 |....if( |navMinor|
|00000ff0| 56 65 72 73 20 3e 3d 20 | 4e 50 56 45 52 53 5f 48 |Vers >= |NPVERS_H|
|00001000| 41 53 5f 4e 4f 54 49 46 | 49 43 41 54 49 4f 4e 20 |AS_NOTIF|ICATION |
|00001010| 29 0a 09 7b 0a 09 09 65 | 72 72 20 3d 20 43 61 6c |)..{...e|rr = Cal|
|00001020| 6c 4e 50 4e 5f 50 6f 73 | 74 55 52 4c 4e 6f 74 69 |lNPN_Pos|tURLNoti|
|00001030| 66 79 50 72 6f 63 28 67 | 4e 65 74 73 63 61 70 65 |fyProc(g|Netscape|
|00001040| 46 75 6e 63 73 2e 70 6f | 73 74 75 72 6c 6e 6f 74 |Funcs.po|sturlnot|
|00001050| 69 66 79 2c 20 69 6e 73 | 74 61 6e 63 65 2c 20 75 |ify, ins|tance, u|
|00001060| 72 6c 2c 20 0a 09 09 09 | 09 09 09 09 09 09 09 09 |rl, ....|........|
|00001070| 09 09 09 77 69 6e 64 6f | 77 2c 20 6c 65 6e 2c 20 |...windo|w, len, |
|00001080| 62 75 66 2c 20 66 69 6c | 65 2c 20 6e 6f 74 69 66 |buf, fil|e, notif|
|00001090| 79 44 61 74 61 29 3b 0a | 09 7d 0a 09 65 6c 73 65 |yData);.|.}..else|
|000010a0| 0a 09 7b 0a 09 09 65 72 | 72 20 3d 20 4e 50 45 52 |..{...er|r = NPER|
|000010b0| 52 5f 49 4e 43 4f 4d 50 | 41 54 49 42 4c 45 5f 56 |R_INCOMP|ATIBLE_V|
|000010c0| 45 52 53 49 4f 4e 5f 45 | 52 52 4f 52 3b 0a 09 7d |ERSION_E|RROR;..}|
|000010d0| 0a 09 72 65 74 75 72 6e | 20 65 72 72 3b 0a 7d 0a |..return| err;.}.|
|000010e0| 0a 4e 50 45 72 72 6f 72 | 20 4e 50 4e 5f 50 6f 73 |.NPError| NPN_Pos|
|000010f0| 74 55 52 4c 28 4e 50 50 | 20 69 6e 73 74 61 6e 63 |tURL(NPP| instanc|
|00001100| 65 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 2a 20 75 |e, const| char* u|
|00001110| 72 6c 2c 20 63 6f 6e 73 | 74 20 63 68 61 72 2a 20 |rl, cons|t char* |
|00001120| 77 69 6e 64 6f 77 2c 20 | 75 69 6e 74 33 32 20 6c |window, |uint32 l|
|00001130| 65 6e 2c 20 63 6f 6e 73 | 74 20 63 68 61 72 2a 20 |en, cons|t char* |
|00001140| 62 75 66 2c 20 4e 50 42 | 6f 6f 6c 20 66 69 6c 65 |buf, NPB|ool file|
|00001150| 29 0a 7b 0a 09 72 65 74 | 75 72 6e 20 43 61 6c 6c |).{..ret|urn Call|
|00001160| 4e 50 4e 5f 50 6f 73 74 | 55 52 4c 50 72 6f 63 28 |NPN_Post|URLProc(|
|00001170| 67 4e 65 74 73 63 61 70 | 65 46 75 6e 63 73 2e 70 |gNetscap|eFuncs.p|
|00001180| 6f 73 74 75 72 6c 2c 20 | 69 6e 73 74 61 6e 63 65 |osturl, |instance|
|00001190| 2c 20 75 72 6c 2c 20 77 | 69 6e 64 6f 77 2c 20 6c |, url, w|indow, l|
|000011a0| 65 6e 2c 20 62 75 66 2c | 20 66 69 6c 65 29 3b 0a |en, buf,| file);.|
|000011b0| 7d 0a 0a 4e 50 45 72 72 | 6f 72 20 4e 50 4e 5f 52 |}..NPErr|or NPN_R|
|000011c0| 65 71 75 65 73 74 52 65 | 61 64 28 4e 50 53 74 72 |equestRe|ad(NPStr|
|000011d0| 65 61 6d 2a 20 73 74 72 | 65 61 6d 2c 20 4e 50 42 |eam* str|eam, NPB|
|000011e0| 79 74 65 52 61 6e 67 65 | 2a 20 72 61 6e 67 65 4c |yteRange|* rangeL|
|000011f0| 69 73 74 29 0a 7b 0a 09 | 72 65 74 75 72 6e 20 43 |ist).{..|return C|
|00001200| 61 6c 6c 4e 50 4e 5f 52 | 65 71 75 65 73 74 52 65 |allNPN_R|equestRe|
|00001210| 61 64 50 72 6f 63 28 67 | 4e 65 74 73 63 61 70 65 |adProc(g|Netscape|
|00001220| 46 75 6e 63 73 2e 72 65 | 71 75 65 73 74 72 65 61 |Funcs.re|questrea|
|00001230| 64 2c 20 73 74 72 65 61 | 6d 2c 20 72 61 6e 67 65 |d, strea|m, range|
|00001240| 4c 69 73 74 29 3b 0a 7d | 0a 0a 4e 50 45 72 72 6f |List);.}|..NPErro|
|00001250| 72 20 4e 50 4e 5f 4e 65 | 77 53 74 72 65 61 6d 28 |r NPN_Ne|wStream(|
|00001260| 4e 50 50 20 69 6e 73 74 | 61 6e 63 65 2c 20 4e 50 |NPP inst|ance, NP|
|00001270| 4d 49 4d 45 54 79 70 65 | 20 74 79 70 65 2c 20 63 |MIMEType| type, c|
|00001280| 6f 6e 73 74 20 63 68 61 | 72 2a 20 77 69 6e 64 6f |onst cha|r* windo|
|00001290| 77 2c 20 4e 50 53 74 72 | 65 61 6d 2a 2a 20 73 74 |w, NPStr|eam** st|
|000012a0| 72 65 61 6d 29 0a 7b 0a | 09 69 6e 74 20 6e 61 76 |ream).{.|.int nav|
|000012b0| 4d 69 6e 6f 72 56 65 72 | 73 20 3d 20 67 4e 65 74 |MinorVer|s = gNet|
|000012c0| 73 63 61 70 65 46 75 6e | 63 73 2e 76 65 72 73 69 |scapeFun|cs.versi|
|000012d0| 6f 6e 20 26 20 30 78 46 | 46 3b 0a 09 4e 50 45 72 |on & 0xF|F;..NPEr|
|000012e0| 72 6f 72 20 65 72 72 3b | 0a 09 0a 09 69 66 28 20 |ror err;|....if( |
|000012f0| 6e 61 76 4d 69 6e 6f 72 | 56 65 72 73 20 3e 3d 20 |navMinor|Vers >= |
|00001300| 4e 50 56 45 52 53 5f 48 | 41 53 5f 53 54 52 45 41 |NPVERS_H|AS_STREA|
|00001310| 4d 4f 55 54 50 55 54 20 | 29 0a 09 7b 0a 09 09 65 |MOUTPUT |)..{...e|
|00001320| 72 72 20 3d 20 43 61 6c | 6c 4e 50 4e 5f 4e 65 77 |rr = Cal|lNPN_New|
|00001330| 53 74 72 65 61 6d 50 72 | 6f 63 28 67 4e 65 74 73 |StreamPr|oc(gNets|
|00001340| 63 61 70 65 46 75 6e 63 | 73 2e 6e 65 77 73 74 72 |capeFunc|s.newstr|
|00001350| 65 61 6d 2c 20 69 6e 73 | 74 61 6e 63 65 2c 20 74 |eam, ins|tance, t|
|00001360| 79 70 65 2c 20 77 69 6e | 64 6f 77 2c 20 73 74 72 |ype, win|dow, str|
|00001370| 65 61 6d 29 3b 0a 09 7d | 0a 09 65 6c 73 65 0a 09 |eam);..}|..else..|
|00001380| 7b 0a 09 09 65 72 72 20 | 3d 20 4e 50 45 52 52 5f |{...err |= NPERR_|
|00001390| 49 4e 43 4f 4d 50 41 54 | 49 42 4c 45 5f 56 45 52 |INCOMPAT|IBLE_VER|
|000013a0| 53 49 4f 4e 5f 45 52 52 | 4f 52 3b 0a 09 7d 0a 09 |SION_ERR|OR;..}..|
|000013b0| 72 65 74 75 72 6e 20 65 | 72 72 3b 0a 7d 0a 0a 69 |return e|rr;.}..i|
|000013c0| 6e 74 33 32 20 4e 50 4e | 5f 57 72 69 74 65 28 4e |nt32 NPN|_Write(N|
|000013d0| 50 50 20 69 6e 73 74 61 | 6e 63 65 2c 20 4e 50 53 |PP insta|nce, NPS|
|000013e0| 74 72 65 61 6d 2a 20 73 | 74 72 65 61 6d 2c 20 69 |tream* s|tream, i|
|000013f0| 6e 74 33 32 20 6c 65 6e | 2c 20 76 6f 69 64 2a 20 |nt32 len|, void* |
|00001400| 62 75 66 66 65 72 29 0a | 7b 0a 09 69 6e 74 20 6e |buffer).|{..int n|
|00001410| 61 76 4d 69 6e 6f 72 56 | 65 72 73 20 3d 20 67 4e |avMinorV|ers = gN|
|00001420| 65 74 73 63 61 70 65 46 | 75 6e 63 73 2e 76 65 72 |etscapeF|uncs.ver|
|00001430| 73 69 6f 6e 20 26 20 30 | 78 46 46 3b 0a 09 4e 50 |sion & 0|xFF;..NP|
|00001440| 45 72 72 6f 72 20 65 72 | 72 3b 0a 09 0a 09 69 66 |Error er|r;....if|
|00001450| 28 20 6e 61 76 4d 69 6e | 6f 72 56 65 72 73 20 3e |( navMin|orVers >|
|00001460| 3d 20 4e 50 56 45 52 53 | 5f 48 41 53 5f 53 54 52 |= NPVERS|_HAS_STR|
|00001470| 45 41 4d 4f 55 54 50 55 | 54 20 29 0a 09 7b 0a 09 |EAMOUTPU|T )..{..|
|00001480| 09 65 72 72 20 3d 20 43 | 61 6c 6c 4e 50 4e 5f 57 |.err = C|allNPN_W|
|00001490| 72 69 74 65 50 72 6f 63 | 28 67 4e 65 74 73 63 61 |riteProc|(gNetsca|
|000014a0| 70 65 46 75 6e 63 73 2e | 77 72 69 74 65 2c 20 69 |peFuncs.|write, i|
|000014b0| 6e 73 74 61 6e 63 65 2c | 20 73 74 72 65 61 6d 2c |nstance,| stream,|
|000014c0| 20 6c 65 6e 2c 20 62 75 | 66 66 65 72 29 3b 0a 09 | len, bu|ffer);..|
|000014d0| 7d 0a 09 65 6c 73 65 0a | 09 7b 0a 09 09 65 72 72 |}..else.|.{...err|
|000014e0| 20 3d 20 4e 50 45 52 52 | 5f 49 4e 43 4f 4d 50 41 | = NPERR|_INCOMPA|
|000014f0| 54 49 42 4c 45 5f 56 45 | 52 53 49 4f 4e 5f 45 52 |TIBLE_VE|RSION_ER|
|00001500| 52 4f 52 3b 0a 09 7d 0a | 09 72 65 74 75 72 6e 20 |ROR;..}.|.return |
|00001510| 65 72 72 3b 0a 7d 0a 0a | 4e 50 45 72 72 6f 72 09 |err;.}..|NPError.|
|00001520| 4e 50 4e 5f 44 65 73 74 | 72 6f 79 53 74 72 65 61 |NPN_Dest|royStrea|
|00001530| 6d 28 4e 50 50 20 69 6e | 73 74 61 6e 63 65 2c 20 |m(NPP in|stance, |
|00001540| 4e 50 53 74 72 65 61 6d | 2a 20 73 74 72 65 61 6d |NPStream|* stream|
|00001550| 2c 20 4e 50 45 72 72 6f | 72 20 72 65 61 73 6f 6e |, NPErro|r reason|
|00001560| 29 0a 7b 0a 09 69 6e 74 | 20 6e 61 76 4d 69 6e 6f |).{..int| navMino|
|00001570| 72 56 65 72 73 20 3d 20 | 67 4e 65 74 73 63 61 70 |rVers = |gNetscap|
|00001580| 65 46 75 6e 63 73 2e 76 | 65 72 73 69 6f 6e 20 26 |eFuncs.v|ersion &|
|00001590| 20 30 78 46 46 3b 0a 09 | 4e 50 45 72 72 6f 72 20 | 0xFF;..|NPError |
|000015a0| 65 72 72 3b 0a 09 0a 09 | 69 66 28 20 6e 61 76 4d |err;....|if( navM|
|000015b0| 69 6e 6f 72 56 65 72 73 | 20 3e 3d 20 4e 50 56 45 |inorVers| >= NPVE|
|000015c0| 52 53 5f 48 41 53 5f 53 | 54 52 45 41 4d 4f 55 54 |RS_HAS_S|TREAMOUT|
|000015d0| 50 55 54 20 29 0a 09 7b | 0a 09 09 65 72 72 20 3d |PUT )..{|...err =|
|000015e0| 20 43 61 6c 6c 4e 50 4e | 5f 44 65 73 74 72 6f 79 | CallNPN|_Destroy|
|000015f0| 53 74 72 65 61 6d 50 72 | 6f 63 28 67 4e 65 74 73 |StreamPr|oc(gNets|
|00001600| 63 61 70 65 46 75 6e 63 | 73 2e 64 65 73 74 72 6f |capeFunc|s.destro|
|00001610| 79 73 74 72 65 61 6d 2c | 20 69 6e 73 74 61 6e 63 |ystream,| instanc|
|00001620| 65 2c 20 73 74 72 65 61 | 6d 2c 20 72 65 61 73 6f |e, strea|m, reaso|
|00001630| 6e 29 3b 0a 09 7d 0a 09 | 65 6c 73 65 0a 09 7b 0a |n);..}..|else..{.|
|00001640| 09 09 65 72 72 20 3d 20 | 4e 50 45 52 52 5f 49 4e |..err = |NPERR_IN|
|00001650| 43 4f 4d 50 41 54 49 42 | 4c 45 5f 56 45 52 53 49 |COMPATIB|LE_VERSI|
|00001660| 4f 4e 5f 45 52 52 4f 52 | 3b 0a 09 7d 0a 09 72 65 |ON_ERROR|;..}..re|
|00001670| 74 75 72 6e 20 65 72 72 | 3b 0a 7d 0a 0a 76 6f 69 |turn err|;.}..voi|
|00001680| 64 20 4e 50 4e 5f 53 74 | 61 74 75 73 28 4e 50 50 |d NPN_St|atus(NPP|
|00001690| 20 69 6e 73 74 61 6e 63 | 65 2c 20 63 6f 6e 73 74 | instanc|e, const|
|000016a0| 20 63 68 61 72 2a 20 6d | 65 73 73 61 67 65 29 0a | char* m|essage).|
|000016b0| 7b 0a 09 43 61 6c 6c 4e | 50 4e 5f 53 74 61 74 75 |{..CallN|PN_Statu|
|000016c0| 73 50 72 6f 63 28 67 4e | 65 74 73 63 61 70 65 46 |sProc(gN|etscapeF|
|000016d0| 75 6e 63 73 2e 73 74 61 | 74 75 73 2c 20 69 6e 73 |uncs.sta|tus, ins|
|000016e0| 74 61 6e 63 65 2c 20 6d | 65 73 73 61 67 65 29 3b |tance, m|essage);|
|000016f0| 0a 7d 0a 0a 63 6f 6e 73 | 74 20 63 68 61 72 2a 20 |.}..cons|t char* |
|00001700| 4e 50 4e 5f 55 73 65 72 | 41 67 65 6e 74 28 4e 50 |NPN_User|Agent(NP|
|00001710| 50 20 69 6e 73 74 61 6e | 63 65 29 0a 7b 0a 09 72 |P instan|ce).{..r|
|00001720| 65 74 75 72 6e 20 43 61 | 6c 6c 4e 50 4e 5f 55 73 |eturn Ca|llNPN_Us|
|00001730| 65 72 41 67 65 6e 74 50 | 72 6f 63 28 67 4e 65 74 |erAgentP|roc(gNet|
|00001740| 73 63 61 70 65 46 75 6e | 63 73 2e 75 61 67 65 6e |scapeFun|cs.uagen|
|00001750| 74 2c 20 69 6e 73 74 61 | 6e 63 65 29 3b 0a 7d 0a |t, insta|nce);.}.|
|00001760| 0a 76 6f 69 64 2a 20 4e | 50 4e 5f 4d 65 6d 41 6c |.void* N|PN_MemAl|
|00001770| 6c 6f 63 28 75 69 6e 74 | 33 32 20 73 69 7a 65 29 |loc(uint|32 size)|
|00001780| 0a 7b 0a 09 72 65 74 75 | 72 6e 20 43 61 6c 6c 4e |.{..retu|rn CallN|
|00001790| 50 4e 5f 4d 65 6d 41 6c | 6c 6f 63 50 72 6f 63 28 |PN_MemAl|locProc(|
|000017a0| 67 4e 65 74 73 63 61 70 | 65 46 75 6e 63 73 2e 6d |gNetscap|eFuncs.m|
|000017b0| 65 6d 61 6c 6c 6f 63 2c | 20 73 69 7a 65 29 3b 0a |emalloc,| size);.|
|000017c0| 7d 0a 0a 76 6f 69 64 20 | 4e 50 4e 5f 4d 65 6d 46 |}..void |NPN_MemF|
|000017d0| 72 65 65 28 76 6f 69 64 | 2a 20 70 74 72 29 0a 7b |ree(void|* ptr).{|
|000017e0| 0a 09 43 61 6c 6c 4e 50 | 4e 5f 4d 65 6d 46 72 65 |..CallNP|N_MemFre|
|000017f0| 65 50 72 6f 63 28 67 4e | 65 74 73 63 61 70 65 46 |eProc(gN|etscapeF|
|00001800| 75 6e 63 73 2e 6d 65 6d | 66 72 65 65 2c 20 70 74 |uncs.mem|free, pt|
|00001810| 72 29 3b 0a 7d 0a 0a 75 | 69 6e 74 33 32 20 4e 50 |r);.}..u|int32 NP|
|00001820| 4e 5f 4d 65 6d 46 6c 75 | 73 68 28 75 69 6e 74 33 |N_MemFlu|sh(uint3|
|00001830| 32 20 73 69 7a 65 29 0a | 7b 0a 09 72 65 74 75 72 |2 size).|{..retur|
|00001840| 6e 20 43 61 6c 6c 4e 50 | 4e 5f 4d 65 6d 46 6c 75 |n CallNP|N_MemFlu|
|00001850| 73 68 50 72 6f 63 28 67 | 4e 65 74 73 63 61 70 65 |shProc(g|Netscape|
|00001860| 46 75 6e 63 73 2e 6d 65 | 6d 66 6c 75 73 68 2c 20 |Funcs.me|mflush, |
|00001870| 73 69 7a 65 29 3b 0a 7d | 0a 0a 76 6f 69 64 20 4e |size);.}|..void N|
|00001880| 50 4e 5f 52 65 6c 6f 61 | 64 50 6c 75 67 69 6e 73 |PN_Reloa|dPlugins|
|00001890| 28 4e 50 42 6f 6f 6c 20 | 72 65 6c 6f 61 64 50 61 |(NPBool |reloadPa|
|000018a0| 67 65 73 29 0a 7b 0a 09 | 43 61 6c 6c 4e 50 4e 5f |ges).{..|CallNPN_|
|000018b0| 52 65 6c 6f 61 64 50 6c | 75 67 69 6e 73 50 72 6f |ReloadPl|uginsPro|
|000018c0| 63 28 67 4e 65 74 73 63 | 61 70 65 46 75 6e 63 73 |c(gNetsc|apeFuncs|
|000018d0| 2e 72 65 6c 6f 61 64 70 | 6c 75 67 69 6e 73 2c 20 |.reloadp|lugins, |
|000018e0| 72 65 6c 6f 61 64 50 61 | 67 65 73 29 3b 0a 7d 0a |reloadPa|ges);.}.|
|000018f0| 0a 0a 4a 52 49 45 6e 76 | 2a 20 4e 50 4e 5f 47 65 |..JRIEnv|* NPN_Ge|
|00001900| 74 4a 61 76 61 45 6e 76 | 28 76 6f 69 64 29 0a 7b |tJavaEnv|(void).{|
|00001910| 0a 09 72 65 74 75 72 6e | 20 43 61 6c 6c 4e 50 4e |..return| CallNPN|
|00001920| 5f 47 65 74 4a 61 76 61 | 45 6e 76 50 72 6f 63 28 |_GetJava|EnvProc(|
|00001930| 20 67 4e 65 74 73 63 61 | 70 65 46 75 6e 63 73 2e | gNetsca|peFuncs.|
|00001940| 67 65 74 4a 61 76 61 45 | 6e 76 20 29 3b 0a 7d 0a |getJavaE|nv );.}.|
|00001950| 0a 6a 72 65 66 20 20 4e | 50 4e 5f 47 65 74 4a 61 |.jref N|PN_GetJa|
|00001960| 76 61 50 65 65 72 28 4e | 50 50 20 69 6e 73 74 61 |vaPeer(N|PP insta|
|00001970| 6e 63 65 29 0a 7b 0a 09 | 72 65 74 75 72 6e 20 43 |nce).{..|return C|
|00001980| 61 6c 6c 4e 50 4e 5f 47 | 65 74 4a 61 76 61 50 65 |allNPN_G|etJavaPe|
|00001990| 65 72 50 72 6f 63 28 20 | 67 4e 65 74 73 63 61 70 |erProc( |gNetscap|
|000019a0| 65 46 75 6e 63 73 2e 67 | 65 74 4a 61 76 61 50 65 |eFuncs.g|etJavaPe|
|000019b0| 65 72 2c 20 69 6e 73 74 | 61 6e 63 65 20 29 3b 0a |er, inst|ance );.|
|000019c0| 7d 0a 0a 0a 0a 2f 2f 3a | 3a 3a 3a 3a 3a 3a 3a 3a |}....//:|::::::::|
|000019d0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000019e0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|000019f0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001a00| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001a10| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001a20| 3a 0a 2f 2f 0a 2f 2f 20 | 57 72 61 70 70 65 72 20 |:.//.// |Wrapper |
|00001a30| 66 75 6e 63 74 69 6f 6e | 73 20 66 6f 72 20 61 6c |function|s for al|
|00001a40| 6c 20 63 61 6c 6c 73 20 | 66 72 6f 6d 20 4e 65 74 |l calls |from Net|
|00001a50| 73 63 61 70 65 20 74 6f | 20 74 68 65 20 70 6c 75 |scape to| the plu|
|00001a60| 67 69 6e 2e 0a 2f 2f 20 | 54 68 65 73 65 20 66 75 |gin..// |These fu|
|00001a70| 6e 63 74 69 6f 6e 73 20 | 6c 65 74 20 74 68 65 20 |nctions |let the |
|00001a80| 70 6c 75 67 69 6e 20 64 | 65 76 65 6c 6f 70 65 72 |plugin d|eveloper|
|00001a90| 20 6a 75 73 74 20 63 72 | 65 61 74 65 20 74 68 65 | just cr|eate the|
|00001aa0| 20 41 50 49 73 0a 2f 2f | 20 61 73 20 64 6f 63 75 | APIs.//| as docu|
|00001ab0| 6d 65 6e 74 65 64 20 61 | 6e 64 20 64 65 66 69 6e |mented a|nd defin|
|00001ac0| 65 64 20 69 6e 20 6e 70 | 61 70 69 2e 68 2c 20 77 |ed in np|api.h, w|
|00001ad0| 69 74 68 6f 75 74 20 6e | 65 65 64 69 6e 67 20 74 |ithout n|eeding t|
|00001ae0| 6f 20 0a 2f 2f 20 69 6e | 73 74 61 6c 6c 20 74 68 |o .// in|stall th|
|00001af0| 6f 73 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 69 6e |ose func|tions in|
|00001b00| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 74 61 | the fun|ction ta|
|00001b10| 62 6c 65 20 6f 72 20 77 | 6f 72 72 79 20 61 62 6f |ble or w|orry abo|
|00001b20| 75 74 0a 2f 2f 20 73 65 | 74 74 69 6e 67 20 75 70 |ut.// se|tting up|
|00001b30| 20 67 6c 6f 62 61 6c 73 | 20 66 6f 72 20 36 38 4b | globals| for 68K|
|00001b40| 20 70 6c 75 67 69 6e 73 | 2e 0a 2f 2f 0a 2f 2f 3a | plugins|..//.//:|
|00001b50| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001b60| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001b70| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001b80| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001b90| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 3a 3a 3a 3a 3a 3a 3a |::::::::|::::::::|
|00001ba0| 3a 3a 3a 3a 3a 3a 3a 3a | 3a 0a 0a 4e 50 45 72 72 |::::::::|:..NPErr|
|00001bb0| 6f 72 20 09 50 72 69 76 | 61 74 65 5f 49 6e 69 74 |or .Priv|ate_Init|
|00001bc0| 69 61 6c 69 7a 65 28 76 | 6f 69 64 29 3b 0a 76 6f |ialize(v|oid);.vo|
|00001bd0| 69 64 20 09 09 50 72 69 | 76 61 74 65 5f 53 68 75 |id ..Pri|vate_Shu|
|00001be0| 74 64 6f 77 6e 28 76 6f | 69 64 29 3b 0a 4e 50 45 |tdown(vo|id);.NPE|
|00001bf0| 72 72 6f 72 09 09 50 72 | 69 76 61 74 65 5f 4e 65 |rror..Pr|ivate_Ne|
|00001c00| 77 28 4e 50 4d 49 4d 45 | 54 79 70 65 20 70 6c 75 |w(NPMIME|Type plu|
|00001c10| 67 69 6e 54 79 70 65 2c | 20 4e 50 50 20 69 6e 73 |ginType,| NPP ins|
|00001c20| 74 61 6e 63 65 2c 20 75 | 69 6e 74 31 36 20 6d 6f |tance, u|int16 mo|
|00001c30| 64 65 2c 20 69 6e 74 31 | 36 20 61 72 67 63 2c 20 |de, int1|6 argc, |
|00001c40| 63 68 61 72 2a 20 61 72 | 67 6e 5b 5d 2c 20 63 68 |char* ar|gn[], ch|
|00001c50| 61 72 2a 20 61 72 67 76 | 5b 5d 2c 20 4e 50 53 61 |ar* argv|[], NPSa|
|00001c60| 76 65 64 44 61 74 61 2a | 20 73 61 76 65 64 29 3b |vedData*| saved);|
|00001c70| 0a 4e 50 45 72 72 6f 72 | 20 09 50 72 69 76 61 74 |.NPError| .Privat|
|00001c80| 65 5f 44 65 73 74 72 6f | 79 28 4e 50 50 20 69 6e |e_Destro|y(NPP in|
|00001c90| 73 74 61 6e 63 65 2c 20 | 4e 50 53 61 76 65 64 44 |stance, |NPSavedD|
|00001ca0| 61 74 61 2a 2a 20 73 61 | 76 65 29 3b 0a 4e 50 45 |ata** sa|ve);.NPE|
|00001cb0| 72 72 6f 72 09 09 50 72 | 69 76 61 74 65 5f 53 65 |rror..Pr|ivate_Se|
|00001cc0| 74 57 69 6e 64 6f 77 28 | 4e 50 50 20 69 6e 73 74 |tWindow(|NPP inst|
|00001cd0| 61 6e 63 65 2c 20 4e 50 | 57 69 6e 64 6f 77 2a 20 |ance, NP|Window* |
|00001ce0| 77 69 6e 64 6f 77 29 3b | 0a 4e 50 45 72 72 6f 72 |window);|.NPError|
|00001cf0| 09 09 50 72 69 76 61 74 | 65 5f 4e 65 77 53 74 72 |..Privat|e_NewStr|
|00001d00| 65 61 6d 28 4e 50 50 20 | 69 6e 73 74 61 6e 63 65 |eam(NPP |instance|
|00001d10| 2c 20 4e 50 4d 49 4d 45 | 54 79 70 65 20 74 79 70 |, NPMIME|Type typ|
|00001d20| 65 2c 20 4e 50 53 74 72 | 65 61 6d 2a 20 73 74 72 |e, NPStr|eam* str|
|00001d30| 65 61 6d 2c 20 4e 50 42 | 6f 6f 6c 20 73 65 65 6b |eam, NPB|ool seek|
|00001d40| 61 62 6c 65 2c 20 75 69 | 6e 74 31 36 2a 20 73 74 |able, ui|nt16* st|
|00001d50| 79 70 65 29 3b 0a 4e 50 | 45 72 72 6f 72 09 09 50 |ype);.NP|Error..P|
|00001d60| 72 69 76 61 74 65 5f 44 | 65 73 74 72 6f 79 53 74 |rivate_D|estroySt|
|00001d70| 72 65 61 6d 28 4e 50 50 | 20 69 6e 73 74 61 6e 63 |ream(NPP| instanc|
|00001d80| 65 2c 20 4e 50 53 74 72 | 65 61 6d 2a 20 73 74 72 |e, NPStr|eam* str|
|00001d90| 65 61 6d 2c 20 4e 50 45 | 72 72 6f 72 20 72 65 61 |eam, NPE|rror rea|
|00001da0| 73 6f 6e 29 3b 0a 69 6e | 74 33 32 09 09 50 72 69 |son);.in|t32..Pri|
|00001db0| 76 61 74 65 5f 57 72 69 | 74 65 52 65 61 64 79 28 |vate_Wri|teReady(|
|00001dc0| 4e 50 50 20 69 6e 73 74 | 61 6e 63 65 2c 20 4e 50 |NPP inst|ance, NP|
|00001dd0| 53 74 72 65 61 6d 2a 20 | 73 74 72 65 61 6d 29 3b |Stream* |stream);|
|00001de0| 0a 69 6e 74 33 32 09 09 | 50 72 69 76 61 74 65 5f |.int32..|Private_|
|00001df0| 57 72 69 74 65 28 4e 50 | 50 20 69 6e 73 74 61 6e |Write(NP|P instan|
|00001e00| 63 65 2c 20 4e 50 53 74 | 72 65 61 6d 2a 20 73 74 |ce, NPSt|ream* st|
|00001e10| 72 65 61 6d 2c 20 69 6e | 74 33 32 20 6f 66 66 73 |ream, in|t32 offs|
|00001e20| 65 74 2c 20 69 6e 74 33 | 32 20 6c 65 6e 2c 20 76 |et, int3|2 len, v|
|00001e30| 6f 69 64 2a 20 62 75 66 | 66 65 72 29 3b 0a 76 6f |oid* buf|fer);.vo|
|00001e40| 69 64 09 09 50 72 69 76 | 61 74 65 5f 53 74 72 65 |id..Priv|ate_Stre|
|00001e50| 61 6d 41 73 46 69 6c 65 | 28 4e 50 50 20 69 6e 73 |amAsFile|(NPP ins|
|00001e60| 74 61 6e 63 65 2c 20 4e | 50 53 74 72 65 61 6d 2a |tance, N|PStream*|
|00001e70| 20 73 74 72 65 61 6d 2c | 20 63 6f 6e 73 74 20 63 | stream,| const c|
|00001e80| 68 61 72 2a 20 66 6e 61 | 6d 65 29 3b 0a 76 6f 69 |har* fna|me);.voi|
|00001e90| 64 09 09 50 72 69 76 61 | 74 65 5f 50 72 69 6e 74 |d..Priva|te_Print|
|00001ea0| 28 4e 50 50 20 69 6e 73 | 74 61 6e 63 65 2c 20 4e |(NPP ins|tance, N|
|00001eb0| 50 50 72 69 6e 74 2a 20 | 70 6c 61 74 66 6f 72 6d |PPrint* |platform|
|00001ec0| 50 72 69 6e 74 29 3b 0a | 69 6e 74 31 36 20 09 09 |Print);.|int16 ..|
|00001ed0| 50 72 69 76 61 74 65 5f | 48 61 6e 64 6c 65 45 76 |Private_|HandleEv|
|00001ee0| 65 6e 74 28 4e 50 50 20 | 69 6e 73 74 61 6e 63 65 |ent(NPP |instance|
|00001ef0| 2c 20 76 6f 69 64 2a 20 | 65 76 65 6e 74 29 3b 0a |, void* |event);.|
|00001f00| 76 6f 69 64 20 20 20 20 | 20 20 20 20 50 72 69 76 |void | Priv|
|00001f10| 61 74 65 5f 55 52 4c 4e | 6f 74 69 66 79 28 4e 50 |ate_URLN|otify(NP|
|00001f20| 50 20 69 6e 73 74 61 6e | 63 65 2c 20 63 6f 6e 73 |P instan|ce, cons|
|00001f30| 74 20 63 68 61 72 2a 20 | 75 72 6c 2c 20 4e 50 52 |t char* |url, NPR|
|00001f40| 65 61 73 6f 6e 20 72 65 | 61 73 6f 6e 2c 20 76 6f |eason re|ason, vo|
|00001f50| 69 64 2a 20 6e 6f 74 69 | 66 79 44 61 74 61 29 3b |id* noti|fyData);|
|00001f60| 0a 6a 72 65 66 09 09 50 | 72 69 76 61 74 65 5f 47 |.jref..P|rivate_G|
|00001f70| 65 74 4a 61 76 61 43 6c | 61 73 73 28 76 6f 69 64 |etJavaCl|ass(void|
|00001f80| 29 3b 0a 0a 0a 4e 50 45 | 72 72 6f 72 20 50 72 69 |);...NPE|rror Pri|
|00001f90| 76 61 74 65 5f 49 6e 69 | 74 69 61 6c 69 7a 65 28 |vate_Ini|tialize(|
|00001fa0| 76 6f 69 64 29 0a 7b 0a | 09 4e 50 45 72 72 6f 72 |void).{.|.NPError|
|00001fb0| 20 65 72 72 3b 0a 09 45 | 6e 74 65 72 43 6f 64 65 | err;..E|nterCode|
|00001fc0| 52 65 73 6f 75 72 63 65 | 28 29 3b 0a 09 50 4c 55 |Resource|();..PLU|
|00001fd0| 47 49 4e 44 45 42 55 47 | 53 54 52 28 22 5c 70 49 |GINDEBUG|STR("\pI|
|00001fe0| 6e 69 74 69 61 6c 69 7a | 65 3b 67 3b 22 29 3b 0a |nitializ|e;g;");.|
|00001ff0| 09 65 72 72 20 3d 20 4e | 50 50 5f 49 6e 69 74 69 |.err = N|PP_Initi|
|00002000| 61 6c 69 7a 65 28 29 3b | 0a 09 45 78 69 74 43 6f |alize();|..ExitCo|
|00002010| 64 65 52 65 73 6f 75 72 | 63 65 28 29 3b 0a 09 72 |deResour|ce();..r|
|00002020| 65 74 75 72 6e 20 65 72 | 72 3b 0a 7d 0a 0a 76 6f |eturn er|r;.}..vo|
|00002030| 69 64 20 50 72 69 76 61 | 74 65 5f 53 68 75 74 64 |id Priva|te_Shutd|
|00002040| 6f 77 6e 28 76 6f 69 64 | 29 0a 7b 0a 09 45 6e 74 |own(void|).{..Ent|
|00002050| 65 72 43 6f 64 65 52 65 | 73 6f 75 72 63 65 28 29 |erCodeRe|source()|
|00002060| 3b 0a 09 50 4c 55 47 49 | 4e 44 45 42 55 47 53 54 |;..PLUGI|NDEBUGST|
|00002070| 52 28 22 5c 70 53 68 75 | 74 64 6f 77 6e 3b 67 3b |R("\pShu|tdown;g;|
|00002080| 22 29 3b 0a 09 4e 50 50 | 5f 53 68 75 74 64 6f 77 |");..NPP|_Shutdow|
|00002090| 6e 28 29 3b 0a 0a 09 5f | 5f 64 65 73 74 72 6f 79 |n();..._|_destroy|
|000020a0| 5f 67 6c 6f 62 61 6c 5f | 63 68 61 69 6e 28 29 3b |_global_|chain();|
|000020b0| 0a 0a 09 45 78 69 74 43 | 6f 64 65 52 65 73 6f 75 |...ExitC|odeResou|
|000020c0| 72 63 65 28 29 3b 0a 7d | 0a 0a 0a 4e 50 45 72 72 |rce();.}|...NPErr|
|000020d0| 6f 72 09 50 72 69 76 61 | 74 65 5f 4e 65 77 28 4e |or.Priva|te_New(N|
|000020e0| 50 4d 49 4d 45 54 79 70 | 65 20 70 6c 75 67 69 6e |PMIMETyp|e plugin|
|000020f0| 54 79 70 65 2c 20 4e 50 | 50 20 69 6e 73 74 61 6e |Type, NP|P instan|
|00002100| 63 65 2c 20 75 69 6e 74 | 31 36 20 6d 6f 64 65 2c |ce, uint|16 mode,|
|00002110| 20 69 6e 74 31 36 20 61 | 72 67 63 2c 20 63 68 61 | int16 a|rgc, cha|
|00002120| 72 2a 20 61 72 67 6e 5b | 5d 2c 20 63 68 61 72 2a |r* argn[|], char*|
|00002130| 20 61 72 67 76 5b 5d 2c | 20 4e 50 53 61 76 65 64 | argv[],| NPSaved|
|00002140| 44 61 74 61 2a 20 73 61 | 76 65 64 29 0a 7b 0a 09 |Data* sa|ved).{..|
|00002150| 45 6e 74 65 72 43 6f 64 | 65 52 65 73 6f 75 72 63 |EnterCod|eResourc|
|00002160| 65 28 29 3b 0a 09 4e 50 | 45 72 72 6f 72 20 72 65 |e();..NP|Error re|
|00002170| 74 20 3d 20 4e 50 50 5f | 4e 65 77 28 70 6c 75 67 |t = NPP_|New(plug|
|00002180| 69 6e 54 79 70 65 2c 20 | 69 6e 73 74 61 6e 63 65 |inType, |instance|
|00002190| 2c 20 6d 6f 64 65 2c 20 | 61 72 67 63 2c 20 61 72 |, mode, |argc, ar|
|000021a0| 67 6e 2c 20 61 72 67 76 | 2c 20 73 61 76 65 64 29 |gn, argv|, saved)|
|000021b0| 3b 0a 09 50 4c 55 47 49 | 4e 44 45 42 55 47 53 54 |;..PLUGI|NDEBUGST|
|000021c0| 52 28 22 5c 70 4e 65 77 | 3b 67 3b 22 29 3b 0a 09 |R("\pNew|;g;");..|
|000021d0| 45 78 69 74 43 6f 64 65 | 52 65 73 6f 75 72 63 65 |ExitCode|Resource|
|000021e0| 28 29 3b 0a 09 72 65 74 | 75 72 6e 20 72 65 74 3b |();..ret|urn ret;|
|000021f0| 09 0a 7d 0a 0a 4e 50 45 | 72 72 6f 72 20 50 72 69 |..}..NPE|rror Pri|
|00002200| 76 61 74 65 5f 44 65 73 | 74 72 6f 79 28 4e 50 50 |vate_Des|troy(NPP|
|00002210| 20 69 6e 73 74 61 6e 63 | 65 2c 20 4e 50 53 61 76 | instanc|e, NPSav|
|00002220| 65 64 44 61 74 61 2a 2a | 20 73 61 76 65 29 0a 7b |edData**| save).{|
|00002230| 0a 09 4e 50 45 72 72 6f | 72 20 65 72 72 3b 0a 09 |..NPErro|r err;..|
|00002240| 45 6e 74 65 72 43 6f 64 | 65 52 65 73 6f 75 72 63 |EnterCod|eResourc|
|00002250| 65 28 29 3b 0a 09 50 4c | 55 47 49 4e 44 45 42 55 |e();..PL|UGINDEBU|
|00002260| 47 53 54 52 28 22 5c 70 | 44 65 73 74 72 6f 79 3b |GSTR("\p|Destroy;|
|00002270| 67 3b 22 29 3b 0a 09 65 | 72 72 20 3d 20 4e 50 50 |g;");..e|rr = NPP|
|00002280| 5f 44 65 73 74 72 6f 79 | 28 69 6e 73 74 61 6e 63 |_Destroy|(instanc|
|00002290| 65 2c 20 73 61 76 65 29 | 3b 0a 09 45 78 69 74 43 |e, save)|;..ExitC|
|000022a0| 6f 64 65 52 65 73 6f 75 | 72 63 65 28 29 3b 0a 09 |odeResou|rce();..|
|000022b0| 72 65 74 75 72 6e 20 65 | 72 72 3b 0a 7d 0a 0a 4e |return e|rr;.}..N|
|000022c0| 50 45 72 72 6f 72 20 50 | 72 69 76 61 74 65 5f 53 |PError P|rivate_S|
|000022d0| 65 74 57 69 6e 64 6f 77 | 28 4e 50 50 20 69 6e 73 |etWindow|(NPP ins|
|000022e0| 74 61 6e 63 65 2c 20 4e | 50 57 69 6e 64 6f 77 2a |tance, N|PWindow*|
|000022f0| 20 77 69 6e 64 6f 77 29 | 0a 7b 0a 09 4e 50 45 72 | window)|.{..NPEr|
|00002300| 72 6f 72 20 65 72 72 3b | 0a 09 45 6e 74 65 72 43 |ror err;|..EnterC|
|00002310| 6f 64 65 52 65 73 6f 75 | 72 63 65 28 29 3b 0a 09 |odeResou|rce();..|
|00002320| 50 4c 55 47 49 4e 44 45 | 42 55 47 53 54 52 28 22 |PLUGINDE|BUGSTR("|
|00002330| 5c 70 53 65 74 57 69 6e | 64 6f 77 3b 67 3b 22 29 |\pSetWin|dow;g;")|
|00002340| 3b 0a 09 65 72 72 20 3d | 20 4e 50 50 5f 53 65 74 |;..err =| NPP_Set|
|00002350| 57 69 6e 64 6f 77 28 69 | 6e 73 74 61 6e 63 65 2c |Window(i|nstance,|
|00002360| 20 77 69 6e 64 6f 77 29 | 3b 0a 09 45 78 69 74 43 | window)|;..ExitC|
|00002370| 6f 64 65 52 65 73 6f 75 | 72 63 65 28 29 3b 0a 09 |odeResou|rce();..|
|00002380| 72 65 74 75 72 6e 20 65 | 72 72 3b 0a 7d 0a 0a 4e |return e|rr;.}..N|
|00002390| 50 45 72 72 6f 72 20 50 | 72 69 76 61 74 65 5f 4e |PError P|rivate_N|
|000023a0| 65 77 53 74 72 65 61 6d | 28 4e 50 50 20 69 6e 73 |ewStream|(NPP ins|
|000023b0| 74 61 6e 63 65 2c 20 4e | 50 4d 49 4d 45 54 79 70 |tance, N|PMIMETyp|
|000023c0| 65 20 74 79 70 65 2c 20 | 4e 50 53 74 72 65 61 6d |e type, |NPStream|
|000023d0| 2a 20 73 74 72 65 61 6d | 2c 20 4e 50 42 6f 6f 6c |* stream|, NPBool|
|000023e0| 20 73 65 65 6b 61 62 6c | 65 2c 20 75 69 6e 74 31 | seekabl|e, uint1|
|000023f0| 36 2a 20 73 74 79 70 65 | 29 0a 7b 0a 09 4e 50 45 |6* stype|).{..NPE|
|00002400| 72 72 6f 72 20 65 72 72 | 3b 0a 09 45 6e 74 65 72 |rror err|;..Enter|
|00002410| 43 6f 64 65 52 65 73 6f | 75 72 63 65 28 29 3b 0a |CodeReso|urce();.|
|00002420| 09 50 4c 55 47 49 4e 44 | 45 42 55 47 53 54 52 28 |.PLUGIND|EBUGSTR(|
|00002430| 22 5c 70 4e 65 77 53 74 | 72 65 61 6d 3b 67 3b 22 |"\pNewSt|ream;g;"|
|00002440| 29 3b 0a 09 65 72 72 20 | 3d 20 4e 50 50 5f 4e 65 |);..err |= NPP_Ne|
|00002450| 77 53 74 72 65 61 6d 28 | 69 6e 73 74 61 6e 63 65 |wStream(|instance|
|00002460| 2c 20 74 79 70 65 2c 20 | 73 74 72 65 61 6d 2c 20 |, type, |stream, |
|00002470| 73 65 65 6b 61 62 6c 65 | 2c 20 73 74 79 70 65 29 |seekable|, stype)|
|00002480| 3b 0a 09 45 78 69 74 43 | 6f 64 65 52 65 73 6f 75 |;..ExitC|odeResou|
|00002490| 72 63 65 28 29 3b 0a 09 | 72 65 74 75 72 6e 20 65 |rce();..|return e|
|000024a0| 72 72 3b 0a 7d 0a 0a 69 | 6e 74 33 32 20 50 72 69 |rr;.}..i|nt32 Pri|
|000024b0| 76 61 74 65 5f 57 72 69 | 74 65 52 65 61 64 79 28 |vate_Wri|teReady(|
|000024c0| 4e 50 50 20 69 6e 73 74 | 61 6e 63 65 2c 20 4e 50 |NPP inst|ance, NP|
|000024d0| 53 74 72 65 61 6d 2a 20 | 73 74 72 65 61 6d 29 0a |Stream* |stream).|
|000024e0| 7b 0a 09 69 6e 74 33 32 | 20 72 65 73 75 6c 74 3b |{..int32| result;|
|000024f0| 0a 09 45 6e 74 65 72 43 | 6f 64 65 52 65 73 6f 75 |..EnterC|odeResou|
|00002500| 72 63 65 28 29 3b 0a 09 | 50 4c 55 47 49 4e 44 45 |rce();..|PLUGINDE|
|00002510| 42 55 47 53 54 52 28 22 | 5c 70 57 72 69 74 65 52 |BUGSTR("|\pWriteR|
|00002520| 65 61 64 79 3b 67 3b 22 | 29 3b 0a 09 72 65 73 75 |eady;g;"|);..resu|
|00002530| 6c 74 20 3d 20 4e 50 50 | 5f 57 72 69 74 65 52 65 |lt = NPP|_WriteRe|
|00002540| 61 64 79 28 69 6e 73 74 | 61 6e 63 65 2c 20 73 74 |ady(inst|ance, st|
|00002550| 72 65 61 6d 29 3b 0a 09 | 45 78 69 74 43 6f 64 65 |ream);..|ExitCode|
|00002560| 52 65 73 6f 75 72 63 65 | 28 29 3b 0a 09 72 65 74 |Resource|();..ret|
|00002570| 75 72 6e 20 72 65 73 75 | 6c 74 3b 0a 7d 0a 0a 69 |urn resu|lt;.}..i|
|00002580| 6e 74 33 32 20 50 72 69 | 76 61 74 65 5f 57 72 69 |nt32 Pri|vate_Wri|
|00002590| 74 65 28 4e 50 50 20 69 | 6e 73 74 61 6e 63 65 2c |te(NPP i|nstance,|
|000025a0| 20 4e 50 53 74 72 65 61 | 6d 2a 20 73 74 72 65 61 | NPStrea|m* strea|
|000025b0| 6d 2c 20 69 6e 74 33 32 | 20 6f 66 66 73 65 74 2c |m, int32| offset,|
|000025c0| 20 69 6e 74 33 32 20 6c | 65 6e 2c 20 76 6f 69 64 | int32 l|en, void|
|000025d0| 2a 20 62 75 66 66 65 72 | 29 0a 7b 0a 09 69 6e 74 |* buffer|).{..int|
|000025e0| 33 32 20 72 65 73 75 6c | 74 3b 0a 09 45 6e 74 65 |32 resul|t;..Ente|
|000025f0| 72 43 6f 64 65 52 65 73 | 6f 75 72 63 65 28 29 3b |rCodeRes|ource();|
|00002600| 0a 09 50 4c 55 47 49 4e | 44 45 42 55 47 53 54 52 |..PLUGIN|DEBUGSTR|
|00002610| 28 22 5c 70 57 72 69 74 | 65 3b 67 3b 22 29 3b 0a |("\pWrit|e;g;");.|
|00002620| 09 72 65 73 75 6c 74 20 | 3d 20 4e 50 50 5f 57 72 |.result |= NPP_Wr|
|00002630| 69 74 65 28 69 6e 73 74 | 61 6e 63 65 2c 20 73 74 |ite(inst|ance, st|
|00002640| 72 65 61 6d 2c 20 6f 66 | 66 73 65 74 2c 20 6c 65 |ream, of|fset, le|
|00002650| 6e 2c 20 62 75 66 66 65 | 72 29 3b 0a 09 45 78 69 |n, buffe|r);..Exi|
|00002660| 74 43 6f 64 65 52 65 73 | 6f 75 72 63 65 28 29 3b |tCodeRes|ource();|
|00002670| 0a 09 72 65 74 75 72 6e | 20 72 65 73 75 6c 74 3b |..return| result;|
|00002680| 0a 7d 0a 0a 76 6f 69 64 | 20 50 72 69 76 61 74 65 |.}..void| Private|
|00002690| 5f 53 74 72 65 61 6d 41 | 73 46 69 6c 65 28 4e 50 |_StreamA|sFile(NP|
|000026a0| 50 20 69 6e 73 74 61 6e | 63 65 2c 20 4e 50 53 74 |P instan|ce, NPSt|
|000026b0| 72 65 61 6d 2a 20 73 74 | 72 65 61 6d 2c 20 63 6f |ream* st|ream, co|
|000026c0| 6e 73 74 20 63 68 61 72 | 2a 20 66 6e 61 6d 65 29 |nst char|* fname)|
|000026d0| 0a 7b 0a 09 45 6e 74 65 | 72 43 6f 64 65 52 65 73 |.{..Ente|rCodeRes|
|000026e0| 6f 75 72 63 65 28 29 3b | 0a 09 50 4c 55 47 49 4e |ource();|..PLUGIN|
|000026f0| 44 45 42 55 47 53 54 52 | 28 22 5c 70 53 74 72 65 |DEBUGSTR|("\pStre|
|00002700| 61 6d 41 73 46 69 6c 65 | 3b 67 3b 22 29 3b 0a 09 |amAsFile|;g;");..|
|00002710| 4e 50 50 5f 53 74 72 65 | 61 6d 41 73 46 69 6c 65 |NPP_Stre|amAsFile|
|00002720| 28 69 6e 73 74 61 6e 63 | 65 2c 20 73 74 72 65 61 |(instanc|e, strea|
|00002730| 6d 2c 20 66 6e 61 6d 65 | 29 3b 0a 09 45 78 69 74 |m, fname|);..Exit|
|00002740| 43 6f 64 65 52 65 73 6f | 75 72 63 65 28 29 3b 0a |CodeReso|urce();.|
|00002750| 7d 0a 0a 0a 4e 50 45 72 | 72 6f 72 20 50 72 69 76 |}...NPEr|ror Priv|
|00002760| 61 74 65 5f 44 65 73 74 | 72 6f 79 53 74 72 65 61 |ate_Dest|royStrea|
|00002770| 6d 28 4e 50 50 20 69 6e | 73 74 61 6e 63 65 2c 20 |m(NPP in|stance, |
|00002780| 4e 50 53 74 72 65 61 6d | 2a 20 73 74 72 65 61 6d |NPStream|* stream|
|00002790| 2c 20 4e 50 45 72 72 6f | 72 20 72 65 61 73 6f 6e |, NPErro|r reason|
|000027a0| 29 0a 7b 0a 09 4e 50 45 | 72 72 6f 72 20 65 72 72 |).{..NPE|rror err|
|000027b0| 3b 0a 09 45 6e 74 65 72 | 43 6f 64 65 52 65 73 6f |;..Enter|CodeReso|
|000027c0| 75 72 63 65 28 29 3b 0a | 09 50 4c 55 47 49 4e 44 |urce();.|.PLUGIND|
|000027d0| 45 42 55 47 53 54 52 28 | 22 5c 70 44 65 73 74 72 |EBUGSTR(|"\pDestr|
|000027e0| 6f 79 53 74 72 65 61 6d | 3b 67 3b 22 29 3b 0a 09 |oyStream|;g;");..|
|000027f0| 65 72 72 20 3d 20 4e 50 | 50 5f 44 65 73 74 72 6f |err = NP|P_Destro|
|00002800| 79 53 74 72 65 61 6d 28 | 69 6e 73 74 61 6e 63 65 |yStream(|instance|
|00002810| 2c 20 73 74 72 65 61 6d | 2c 20 72 65 61 73 6f 6e |, stream|, reason|
|00002820| 29 3b 0a 09 45 78 69 74 | 43 6f 64 65 52 65 73 6f |);..Exit|CodeReso|
|00002830| 75 72 63 65 28 29 3b 0a | 09 72 65 74 75 72 6e 20 |urce();.|.return |
|00002840| 65 72 72 3b 0a 7d 0a 0a | 69 6e 74 31 36 20 50 72 |err;.}..|int16 Pr|
|00002850| 69 76 61 74 65 5f 48 61 | 6e 64 6c 65 45 76 65 6e |ivate_Ha|ndleEven|
|00002860| 74 28 4e 50 50 20 69 6e | 73 74 61 6e 63 65 2c 20 |t(NPP in|stance, |
|00002870| 76 6f 69 64 2a 20 65 76 | 65 6e 74 29 0a 7b 0a 09 |void* ev|ent).{..|
|00002880| 69 6e 74 31 36 20 72 65 | 73 75 6c 74 3b 0a 09 45 |int16 re|sult;..E|
|00002890| 6e 74 65 72 43 6f 64 65 | 52 65 73 6f 75 72 63 65 |nterCode|Resource|
|000028a0| 28 29 3b 0a 09 50 4c 55 | 47 49 4e 44 45 42 55 47 |();..PLU|GINDEBUG|
|000028b0| 53 54 52 28 22 5c 70 48 | 61 6e 64 6c 65 45 76 65 |STR("\pH|andleEve|
|000028c0| 6e 74 3b 67 3b 22 29 3b | 0a 09 72 65 73 75 6c 74 |nt;g;");|..result|
|000028d0| 20 3d 20 4e 50 50 5f 48 | 61 6e 64 6c 65 45 76 65 | = NPP_H|andleEve|
|000028e0| 6e 74 28 69 6e 73 74 61 | 6e 63 65 2c 20 65 76 65 |nt(insta|nce, eve|
|000028f0| 6e 74 29 3b 0a 09 45 78 | 69 74 43 6f 64 65 52 65 |nt);..Ex|itCodeRe|
|00002900| 73 6f 75 72 63 65 28 29 | 3b 0a 09 72 65 74 75 72 |source()|;..retur|
|00002910| 6e 20 72 65 73 75 6c 74 | 3b 0a 7d 0a 0a 76 6f 69 |n result|;.}..voi|
|00002920| 64 20 50 72 69 76 61 74 | 65 5f 50 72 69 6e 74 28 |d Privat|e_Print(|
|00002930| 4e 50 50 20 69 6e 73 74 | 61 6e 63 65 2c 20 4e 50 |NPP inst|ance, NP|
|00002940| 50 72 69 6e 74 2a 20 70 | 6c 61 74 66 6f 72 6d 50 |Print* p|latformP|
|00002950| 72 69 6e 74 29 0a 7b 0a | 09 45 6e 74 65 72 43 6f |rint).{.|.EnterCo|
|00002960| 64 65 52 65 73 6f 75 72 | 63 65 28 29 3b 0a 09 50 |deResour|ce();..P|
|00002970| 4c 55 47 49 4e 44 45 42 | 55 47 53 54 52 28 22 5c |LUGINDEB|UGSTR("\|
|00002980| 70 50 72 69 6e 74 3b 67 | 3b 22 29 3b 0a 09 4e 50 |pPrint;g|;");..NP|
|00002990| 50 5f 50 72 69 6e 74 28 | 69 6e 73 74 61 6e 63 65 |P_Print(|instance|
|000029a0| 2c 20 70 6c 61 74 66 6f | 72 6d 50 72 69 6e 74 29 |, platfo|rmPrint)|
|000029b0| 3b 0a 09 45 78 69 74 43 | 6f 64 65 52 65 73 6f 75 |;..ExitC|odeResou|
|000029c0| 72 63 65 28 29 3b 0a 7d | 0a 0a 76 6f 69 64 20 50 |rce();.}|..void P|
|000029d0| 72 69 76 61 74 65 5f 55 | 52 4c 4e 6f 74 69 66 79 |rivate_U|RLNotify|
|000029e0| 28 4e 50 50 20 69 6e 73 | 74 61 6e 63 65 2c 20 63 |(NPP ins|tance, c|
|000029f0| 6f 6e 73 74 20 63 68 61 | 72 2a 20 75 72 6c 2c 20 |onst cha|r* url, |
|00002a00| 4e 50 52 65 61 73 6f 6e | 20 72 65 61 73 6f 6e 2c |NPReason| reason,|
|00002a10| 20 76 6f 69 64 2a 20 6e | 6f 74 69 66 79 44 61 74 | void* n|otifyDat|
|00002a20| 61 29 0a 7b 0a 09 45 6e | 74 65 72 43 6f 64 65 52 |a).{..En|terCodeR|
|00002a30| 65 73 6f 75 72 63 65 28 | 29 3b 0a 09 50 4c 55 47 |esource(|);..PLUG|
|00002a40| 49 4e 44 45 42 55 47 53 | 54 52 28 22 5c 70 55 52 |INDEBUGS|TR("\pUR|
|00002a50| 4c 4e 6f 74 69 66 79 3b | 67 3b 22 29 3b 0a 09 4e |LNotify;|g;");..N|
|00002a60| 50 50 5f 55 52 4c 4e 6f | 74 69 66 79 28 69 6e 73 |PP_URLNo|tify(ins|
|00002a70| 74 61 6e 63 65 2c 20 75 | 72 6c 2c 20 72 65 61 73 |tance, u|rl, reas|
|00002a80| 6f 6e 2c 20 6e 6f 74 69 | 66 79 44 61 74 61 29 3b |on, noti|fyData);|
|00002a90| 0a 09 45 78 69 74 43 6f | 64 65 52 65 73 6f 75 72 |..ExitCo|deResour|
|00002aa0| 63 65 28 29 3b 0a 7d 0a | 0a 0a 6a 72 65 66 20 50 |ce();.}.|..jref P|
|00002ab0| 72 69 76 61 74 65 5f 47 | 65 74 4a 61 76 61 43 6c |rivate_G|etJavaCl|
|00002ac0| 61 73 73 28 76 6f 69 64 | 29 0a 7b 0a 09 45 6e 74 |ass(void|).{..Ent|
|00002ad0| 65 72 43 6f 64 65 52 65 | 73 6f 75 72 63 65 28 29 |erCodeRe|source()|
|00002ae0| 3b 0a 09 50 4c 55 47 49 | 4e 44 45 42 55 47 53 54 |;..PLUGI|NDEBUGST|
|00002af0| 52 28 22 5c 70 47 65 74 | 4a 61 76 61 43 6c 61 73 |R("\pGet|JavaClas|
|00002b00| 73 3b 67 3b 22 29 3b 0a | 0a 20 20 20 20 6a 72 65 |s;g;");.|. jre|
|00002b10| 66 20 63 6c 61 7a 7a 20 | 3d 20 4e 50 50 5f 47 65 |f clazz |= NPP_Ge|
|00002b20| 74 4a 61 76 61 43 6c 61 | 73 73 28 29 3b 0a 20 20 |tJavaCla|ss();. |
|00002b30| 20 20 45 78 69 74 43 6f | 64 65 52 65 73 6f 75 72 | ExitCo|deResour|
|00002b40| 63 65 28 29 3b 0a 20 20 | 20 20 69 66 20 28 63 6c |ce();. | if (cl|
|00002b50| 61 7a 7a 29 0a 20 20 20 | 20 7b 0a 09 09 4a 52 49 |azz). | {...JRI|
|00002b60| 45 6e 76 2a 20 65 6e 76 | 20 3d 20 4e 50 4e 5f 47 |Env* env| = NPN_G|
|00002b70| 65 74 4a 61 76 61 45 6e | 76 28 29 3b 0a 09 09 72 |etJavaEn|v();...r|
|00002b80| 65 74 75 72 6e 20 4a 52 | 49 5f 4e 65 77 47 6c 6f |eturn JR|I_NewGlo|
|00002b90| 62 61 6c 52 65 66 28 65 | 6e 76 2c 20 63 6c 61 7a |balRef(e|nv, claz|
|00002ba0| 7a 29 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 72 65 |z);. |}. re|
|00002bb0| 74 75 72 6e 20 4e 55 4c | 4c 3b 0a 7d 0a 0a 0a 76 |turn NUL|L;.}...v|
|00002bc0| 6f 69 64 20 53 65 74 55 | 70 51 44 28 76 6f 69 64 |oid SetU|pQD(void|
|00002bd0| 29 3b 0a 76 6f 69 64 20 | 53 65 74 55 70 51 44 28 |);.void |SetUpQD(|
|00002be0| 76 6f 69 64 29 0a 7b 0a | 09 50 72 6f 63 65 73 73 |void).{.|.Process|
|00002bf0| 53 65 72 69 61 6c 4e 75 | 6d 62 65 72 20 50 53 4e |SerialNu|mber PSN|
|00002c00| 3b 0a 09 46 53 53 70 65 | 63 09 09 09 09 6d 79 46 |;..FSSpe|c....myF|
|00002c10| 53 53 70 65 63 3b 0a 09 | 53 74 72 36 33 09 09 09 |SSpec;..|Str63...|
|00002c20| 09 6e 61 6d 65 3b 0a 09 | 50 72 6f 63 65 73 73 49 |.name;..|ProcessI|
|00002c30| 6e 66 6f 52 65 63 09 09 | 69 6e 66 6f 52 65 63 3b |nfoRec..|infoRec;|
|00002c40| 0a 09 4f 53 45 72 72 09 | 09 09 09 72 65 73 75 6c |..OSErr.|...resul|
|00002c50| 74 20 3d 20 6e 6f 45 72 | 72 3b 0a 09 43 6f 6e 6e |t = noEr|r;..Conn|
|00002c60| 65 63 74 69 6f 6e 49 44 | 20 09 09 63 6f 6e 6e 49 |ectionID| ..connI|
|00002c70| 44 3b 0a 09 53 74 72 32 | 35 35 20 09 09 09 09 65 |D;..Str2|55 ....e|
|00002c80| 72 72 4e 61 6d 65 3b 0a | 09 0a 09 2f 2f 0a 09 2f |rrName;.|...//../|
|00002c90| 2f 20 4d 65 6d 6f 72 69 | 7a 65 20 74 68 65 20 70 |/ Memori|ze the p|
|00002ca0| 6c 75 67 69 6e d5 73 20 | 72 65 73 6f 75 72 63 65 |lugin.s |resource|
|00002cb0| 20 66 69 6c 65 20 0a 09 | 2f 2f 20 72 65 66 6e 75 | file ..|// refnu|
|00002cc0| 6d 20 66 6f 72 20 6c 61 | 74 65 72 20 75 73 65 2e |m for la|ter use.|
|00002cd0| 0a 09 2f 2f 0a 09 67 52 | 65 73 46 69 6c 65 20 3d |..//..gR|esFile =|
|00002ce0| 20 43 75 72 52 65 73 46 | 69 6c 65 28 29 3b 0a 09 | CurResF|ile();..|
|00002cf0| 0a 09 2f 2f 0a 09 2f 2f | 20 41 73 6b 20 74 68 65 |..//..//| Ask the|
|00002d00| 20 73 79 73 74 65 6d 20 | 69 66 20 43 46 4d 20 69 | system |if CFM i|
|00002d10| 73 20 61 76 61 69 6c 61 | 62 6c 65 2e 0a 09 2f 2f |s availa|ble...//|
|00002d20| 0a 09 6c 6f 6e 67 20 72 | 65 73 70 6f 6e 73 65 3b |..long r|esponse;|
|00002d30| 0a 09 4f 53 45 72 72 20 | 65 72 72 20 3d 20 47 65 |..OSErr |err = Ge|
|00002d40| 73 74 61 6c 74 28 67 65 | 73 74 61 6c 74 43 46 4d |stalt(ge|staltCFM|
|00002d50| 41 74 74 72 2c 20 26 72 | 65 73 70 6f 6e 73 65 29 |Attr, &r|esponse)|
|00002d60| 3b 0a 09 42 6f 6f 6c 65 | 61 6e 20 68 61 73 43 46 |;..Boole|an hasCF|
|00002d70| 4d 20 3d 20 42 69 74 54 | 73 74 28 26 72 65 73 70 |M = BitT|st(&resp|
|00002d80| 6f 6e 73 65 2c 20 33 31 | 2d 67 65 73 74 61 6c 74 |onse, 31|-gestalt|
|00002d90| 43 46 4d 50 72 65 73 65 | 6e 74 29 3b 0a 09 09 09 |CFMPrese|nt);....|
|00002da0| 0a 09 69 66 20 28 68 61 | 73 43 46 4d 29 0a 09 7b |..if (ha|sCFM)..{|
|00002db0| 0a 09 09 2f 2f 0a 09 09 | 2f 2f 20 47 65 74 50 72 |...//...|// GetPr|
|00002dc0| 6f 63 65 73 73 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |ocessInf|ormation|
|00002dd0| 20 74 61 6b 65 73 20 61 | 20 70 72 6f 63 65 73 73 | takes a| process|
|00002de0| 20 73 65 72 69 61 6c 20 | 6e 75 6d 62 65 72 20 61 | serial |number a|
|00002df0| 6e 64 20 0a 09 09 2f 2f | 20 77 69 6c 6c 20 67 69 |nd ...//| will gi|
|00002e00| 76 65 20 75 73 20 62 61 | 63 6b 20 74 68 65 20 6e |ve us ba|ck the n|
|00002e10| 61 6d 65 20 61 6e 64 20 | 46 53 53 70 65 63 20 6f |ame and |FSSpec o|
|00002e20| 66 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |f the ap|plicatio|
|00002e30| 6e 2e 0a 09 09 2f 2f 20 | 53 65 65 20 74 68 65 20 |n....// |See the |
|00002e40| 50 72 6f 63 65 73 73 20 | 4d 61 6e 61 67 65 72 20 |Process |Manager |
|00002e50| 69 6e 20 49 4d 2e 0a 09 | 09 2f 2f 0a 09 09 69 6e |in IM...|.//...in|
|00002e60| 66 6f 52 65 63 2e 70 72 | 6f 63 65 73 73 49 6e 66 |foRec.pr|ocessInf|
|00002e70| 6f 4c 65 6e 67 74 68 20 | 3d 20 73 69 7a 65 6f 66 |oLength |= sizeof|
|00002e80| 28 50 72 6f 63 65 73 73 | 49 6e 66 6f 52 65 63 29 |(Process|InfoRec)|
|00002e90| 3b 0a 09 09 69 6e 66 6f | 52 65 63 2e 70 72 6f 63 |;...info|Rec.proc|
|00002ea0| 65 73 73 4e 61 6d 65 20 | 3d 20 6e 61 6d 65 3b 0a |essName |= name;.|
|00002eb0| 09 09 69 6e 66 6f 52 65 | 63 2e 70 72 6f 63 65 73 |..infoRe|c.proces|
|00002ec0| 73 41 70 70 53 70 65 63 | 20 3d 20 26 6d 79 46 53 |sAppSpec| = &myFS|
|00002ed0| 53 70 65 63 3b 0a 09 09 | 0a 09 09 50 53 4e 2e 68 |Spec;...|...PSN.h|
|00002ee0| 69 67 68 4c 6f 6e 67 4f | 66 50 53 4e 20 3d 20 30 |ighLongO|fPSN = 0|
|00002ef0| 3b 0a 09 09 50 53 4e 2e | 6c 6f 77 4c 6f 6e 67 4f |;...PSN.|lowLongO|
|00002f00| 66 50 53 4e 20 3d 20 6b | 43 75 72 72 65 6e 74 50 |fPSN = k|CurrentP|
|00002f10| 72 6f 63 65 73 73 3b 0a | 09 09 0a 09 09 72 65 73 |rocess;.|.....res|
|00002f20| 75 6c 74 20 3d 20 47 65 | 74 50 72 6f 63 65 73 73 |ult = Ge|tProcess|
|00002f30| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 28 26 50 53 4e |Informat|ion(&PSN|
|00002f40| 2c 20 26 69 6e 66 6f 52 | 65 63 29 3b 0a 09 09 69 |, &infoR|ec);...i|
|00002f50| 66 20 28 72 65 73 75 6c | 74 20 21 3d 20 6e 6f 45 |f (resul|t != noE|
|00002f60| 72 72 29 0a 09 09 09 50 | 4c 55 47 49 4e 44 45 42 |rr)....P|LUGINDEB|
|00002f70| 55 47 53 54 52 28 22 5c | 70 46 61 69 6c 65 64 20 |UGSTR("\|pFailed |
|00002f80| 69 6e 20 47 65 74 50 72 | 6f 63 65 73 73 49 6e 66 |in GetPr|ocessInf|
|00002f90| 6f 72 6d 61 74 69 6f 6e | 22 29 3b 0a 09 09 7d 0a |ormation|");...}.|
|00002fa0| 09 65 6c 73 65 0a 09 09 | 2f 2f 0a 09 09 2f 2f 20 |.else...|//...// |
|00002fb0| 49 66 20 6e 6f 20 43 46 | 4d 20 69 6e 73 74 61 6c |If no CF|M instal|
|00002fc0| 6c 65 64 2c 20 61 73 73 | 75 6d 65 20 69 74 20 6d |led, ass|ume it m|
|00002fd0| 75 73 74 20 62 65 20 61 | 20 36 38 4b 20 61 70 70 |ust be a| 68K app|
|00002fe0| 2e 0a 09 09 2f 2f 0a 09 | 09 72 65 73 75 6c 74 20 |....//..|.result |
|00002ff0| 3d 20 2d 31 3b 09 09 0a | 09 09 0a 09 69 66 20 28 |= -1;...|....if (|
|00003000| 72 65 73 75 6c 74 20 3d | 3d 20 6e 6f 45 72 72 29 |result =|= noErr)|
|00003010| 0a 09 7b 0a 09 09 2f 2f | 0a 09 09 2f 2f 20 4e 6f |..{...//|...// No|
|00003020| 77 20 74 68 61 74 20 77 | 65 20 6b 6e 6f 77 20 74 |w that w|e know t|
|00003030| 68 65 20 61 70 70 20 6e | 61 6d 65 20 61 6e 64 20 |he app n|ame and |
|00003040| 46 53 53 70 65 63 2c 20 | 77 65 20 63 61 6e 20 63 |FSSpec, |we can c|
|00003050| 61 6c 6c 20 47 65 74 44 | 69 73 6b 46 72 61 67 6d |all GetD|iskFragm|
|00003060| 65 6e 74 0a 09 09 2f 2f | 20 74 6f 20 67 65 74 20 |ent...//| to get |
|00003070| 61 20 63 6f 6e 6e 49 44 | 20 74 6f 20 75 73 65 20 |a connID| to use |
|00003080| 69 6e 20 61 20 73 75 62 | 73 65 71 75 65 6e 74 20 |in a sub|sequent |
|00003090| 63 61 6c 6c 20 74 6f 20 | 46 69 6e 64 53 79 6d 62 |call to |FindSymb|
|000030a0| 6f 6c 20 28 69 74 20 77 | 69 6c 6c 20 61 6c 73 6f |ol (it w|ill also|
|000030b0| 0a 09 09 2f 2f 20 72 65 | 74 75 72 6e 20 74 68 65 |...// re|turn the|
|000030c0| 20 61 64 64 72 65 73 73 | 20 6f 66 20 d2 6d 61 69 | address| of .mai|
|000030d0| 6e d3 20 69 6e 20 61 70 | 70 2c 20 77 68 69 63 68 |n. in ap|p, which|
|000030e0| 20 77 65 20 69 67 6e 6f | 72 65 29 2e 20 20 49 66 | we igno|re). If|
|000030f0| 20 47 65 74 44 69 73 6b | 46 72 61 67 6d 65 6e 74 | GetDisk|Fragment|
|00003100| 20 0a 09 09 2f 2f 20 72 | 65 74 75 72 6e 73 20 61 | ...// r|eturns a|
|00003110| 6e 20 65 72 72 6f 72 2c | 20 77 65 20 61 73 73 75 |n error,| we assu|
|00003120| 6d 65 20 74 68 65 20 61 | 70 70 20 6d 75 73 74 20 |me the a|pp must |
|00003130| 62 65 20 36 38 4b 2e 0a | 09 09 2f 2f 0a 09 09 50 |be 68K..|..//...P|
|00003140| 74 72 20 6d 61 69 6e 41 | 64 64 72 3b 20 09 0a 09 |tr mainA|ddr; ...|
|00003150| 09 72 65 73 75 6c 74 20 | 3d 20 20 47 65 74 44 69 |.result |= GetDi|
|00003160| 73 6b 46 72 61 67 6d 65 | 6e 74 28 69 6e 66 6f 52 |skFragme|nt(infoR|
|00003170| 65 63 2e 70 72 6f 63 65 | 73 73 41 70 70 53 70 65 |ec.proce|ssAppSpe|
|00003180| 63 2c 20 30 4c 2c 20 30 | 4c 2c 20 69 6e 66 6f 52 |c, 0L, 0|L, infoR|
|00003190| 65 63 2e 70 72 6f 63 65 | 73 73 4e 61 6d 65 2c 0a |ec.proce|ssName,.|
|000031a0| 09 09 09 09 09 09 09 09 | 20 20 6b 4c 6f 61 64 4c |........| kLoadL|
|000031b0| 69 62 2c 20 26 63 6f 6e | 6e 49 44 2c 20 28 50 74 |ib, &con|nID, (Pt|
|000031c0| 72 2a 29 26 6d 61 69 6e | 41 64 64 72 2c 20 65 72 |r*)&main|Addr, er|
|000031d0| 72 4e 61 6d 65 29 3b 0a | 09 7d 0a 0a 09 69 66 20 |rName);.|.}...if |
|000031e0| 28 72 65 73 75 6c 74 20 | 3d 3d 20 6e 6f 45 72 72 |(result |== noErr|
|000031f0| 29 20 0a 09 7b 0a 09 09 | 2f 2f 0a 09 09 2f 2f 20 |) ..{...|//...// |
|00003200| 54 68 65 20 61 70 70 20 | 69 73 20 61 20 50 50 43 |The app |is a PPC|
|00003210| 20 63 6f 64 65 20 66 72 | 61 67 6d 65 6e 74 2c 20 | code fr|agment, |
|00003220| 73 6f 20 63 61 6c 6c 20 | 46 69 6e 64 53 79 6d 62 |so call |FindSymb|
|00003230| 6f 6c 0a 09 09 2f 2f 20 | 74 6f 20 67 65 74 20 74 |ol...// |to get t|
|00003240| 68 65 20 65 78 70 6f 72 | 74 65 64 20 d2 71 64 d3 |he expor|ted .qd.|
|00003250| 20 73 79 6d 62 6f 6c 20 | 73 6f 20 77 65 20 63 61 | symbol |so we ca|
|00003260| 6e 20 61 63 63 65 73 73 | 20 69 74 73 0a 09 09 2f |n access| its.../|
|00003270| 2f 20 51 75 69 63 6b 44 | 72 61 77 20 67 6c 6f 62 |/ QuickD|raw glob|
|00003280| 61 6c 73 2e 0a 09 09 2f | 2f 0a 09 09 53 79 6d 43 |als..../|/...SymC|
|00003290| 6c 61 73 73 20 73 79 6d | 43 6c 61 73 73 3b 0a 09 |lass sym|Class;..|
|000032a0| 09 72 65 73 75 6c 74 20 | 3d 20 46 69 6e 64 53 79 |.result |= FindSy|
|000032b0| 6d 62 6f 6c 28 63 6f 6e | 6e 49 44 2c 20 22 5c 70 |mbol(con|nID, "\p|
|000032c0| 71 64 22 2c 20 28 50 74 | 72 2a 29 26 67 51 44 50 |qd", (Pt|r*)&gQDP|
|000032d0| 74 72 2c 20 26 73 79 6d | 43 6c 61 73 73 29 3b 0a |tr, &sym|Class);.|
|000032e0| 09 09 69 66 20 28 72 65 | 73 75 6c 74 20 21 3d 20 |..if (re|sult != |
|000032f0| 6e 6f 45 72 72 29 0a 09 | 09 09 50 4c 55 47 49 4e |noErr)..|..PLUGIN|
|00003300| 44 45 42 55 47 53 54 52 | 28 22 5c 70 46 61 69 6c |DEBUGSTR|("\pFail|
|00003310| 65 64 20 69 6e 20 46 69 | 6e 64 53 79 6d 62 6f 6c |ed in Fi|ndSymbol|
|00003320| 20 71 64 22 29 3b 0a 09 | 7d 0a 09 65 6c 73 65 0a | qd");..|}..else.|
|00003330| 09 7b 0a 09 09 2f 2f 0a | 09 09 2f 2f 20 54 68 65 |.{...//.|..// The|
|00003340| 20 61 70 70 20 69 73 20 | 36 38 4b 2c 20 73 6f 20 | app is |68K, so |
|00003350| 75 73 65 20 69 74 73 20 | 41 35 20 74 6f 20 63 6f |use its |A5 to co|
|00003360| 6d 70 75 74 65 20 74 68 | 65 20 61 64 64 72 65 73 |mpute th|e addres|
|00003370| 73 0a 09 09 2f 2f 20 6f | 66 20 69 74 73 20 51 75 |s...// o|f its Qu|
|00003380| 69 63 6b 44 72 61 77 20 | 67 6c 6f 62 61 6c 73 2e |ickDraw |globals.|
|00003390| 0a 09 09 2f 2f 0a 09 09 | 67 51 44 50 74 72 20 3d |...//...|gQDPtr =|
|000033a0| 20 28 51 44 47 6c 6f 62 | 61 6c 73 2a 29 28 2a 28 | (QDGlob|als*)(*(|
|000033b0| 28 6c 6f 6e 67 2a 29 53 | 65 74 43 75 72 72 65 6e |(long*)S|etCurren|
|000033c0| 74 41 35 28 29 29 20 2d | 20 28 73 69 7a 65 6f 66 |tA5()) -| (sizeof|
|000033d0| 28 51 44 47 6c 6f 62 61 | 6c 73 29 20 2d 20 73 69 |(QDGloba|ls) - si|
|000033e0| 7a 65 6f 66 28 47 72 61 | 66 50 74 72 29 29 29 3b |zeof(Gra|fPtr)));|
|000033f0| 0a 09 7d 0a 0a 7d 0a 0a | 0a 0a 4e 50 45 72 72 6f |..}..}..|..NPErro|
|00003400| 72 20 6d 61 69 6e 28 4e | 50 4e 65 74 73 63 61 70 |r main(N|PNetscap|
|00003410| 65 46 75 6e 63 73 2a 20 | 6e 73 54 61 62 6c 65 2c |eFuncs* |nsTable,|
|00003420| 20 4e 50 50 6c 75 67 69 | 6e 46 75 6e 63 73 2a 20 | NPPlugi|nFuncs* |
|00003430| 70 6c 75 67 69 6e 46 75 | 6e 63 73 2c 20 4e 50 50 |pluginFu|ncs, NPP|
|00003440| 5f 53 68 75 74 64 6f 77 | 6e 55 50 50 2a 20 75 6e |_Shutdow|nUPP* un|
|00003450| 6c 6f 61 64 55 70 70 29 | 3b 0a 0a 23 69 66 20 47 |loadUpp)|;..#if G|
|00003460| 45 4e 45 52 41 54 49 4e | 47 43 46 4d 0a 52 6f 75 |ENERATIN|GCFM.Rou|
|00003470| 74 69 6e 65 44 65 73 63 | 72 69 70 74 6f 72 20 6d |tineDesc|riptor m|
|00003480| 61 69 6e 52 44 20 3d 20 | 42 55 49 4c 44 5f 52 4f |ainRD = |BUILD_RO|
|00003490| 55 54 49 4e 45 5f 44 45 | 53 43 52 49 50 54 4f 52 |UTINE_DE|SCRIPTOR|
|000034a0| 28 75 70 70 4e 50 50 5f | 4d 61 69 6e 45 6e 74 72 |(uppNPP_|MainEntr|
|000034b0| 79 50 72 6f 63 49 6e 66 | 6f 2c 20 6d 61 69 6e 29 |yProcInf|o, main)|
|000034c0| 3b 0a 23 65 6e 64 69 66 | 0a 20 0a 0a 4e 50 45 72 |;.#endif|. ..NPEr|
|000034d0| 72 6f 72 20 6d 61 69 6e | 28 4e 50 4e 65 74 73 63 |ror main|(NPNetsc|
|000034e0| 61 70 65 46 75 6e 63 73 | 2a 20 6e 73 54 61 62 6c |apeFuncs|* nsTabl|
|000034f0| 65 2c 20 4e 50 50 6c 75 | 67 69 6e 46 75 6e 63 73 |e, NPPlu|ginFuncs|
|00003500| 2a 20 70 6c 75 67 69 6e | 46 75 6e 63 73 2c 20 4e |* plugin|Funcs, N|
|00003510| 50 50 5f 53 68 75 74 64 | 6f 77 6e 55 50 50 2a 20 |PP_Shutd|ownUPP* |
|00003520| 75 6e 6c 6f 61 64 55 70 | 70 29 0a 7b 0a 09 45 6e |unloadUp|p).{..En|
|00003530| 74 65 72 43 6f 64 65 52 | 65 73 6f 75 72 63 65 28 |terCodeR|esource(|
|00003540| 29 3b 0a 09 50 4c 55 47 | 49 4e 44 45 42 55 47 53 |);..PLUG|INDEBUGS|
|00003550| 54 52 28 22 5c 70 6d 61 | 69 6e 22 29 3b 0a 0a 09 |TR("\pma|in");...|
|00003560| 5f 5f 49 6e 69 74 43 6f | 64 65 5f 5f 28 29 3b 0a |__InitCo|de__();.|
|00003570| 0a 09 4e 50 45 72 72 6f | 72 20 65 72 72 20 3d 20 |..NPErro|r err = |
|00003580| 4e 50 45 52 52 5f 4e 4f | 5f 45 52 52 4f 52 3b 0a |NPERR_NO|_ERROR;.|
|00003590| 09 0a 09 2f 2f 0a 09 2f | 2f 20 45 6e 73 75 72 65 |...//../|/ Ensure|
|000035a0| 20 74 68 61 74 20 65 76 | 65 72 79 74 68 69 6e 67 | that ev|erything|
|000035b0| 20 4e 65 74 73 63 61 70 | 65 20 70 61 73 73 65 64 | Netscap|e passed|
|000035c0| 20 75 73 20 69 73 20 76 | 61 6c 69 64 21 0a 09 2f | us is v|alid!../|
|000035d0| 2f 0a 09 69 66 20 28 28 | 6e 73 54 61 62 6c 65 20 |/..if ((|nsTable |
|000035e0| 3d 3d 20 4e 55 4c 4c 29 | 20 7c 7c 20 28 70 6c 75 |== NULL)| || (plu|
|000035f0| 67 69 6e 46 75 6e 63 73 | 20 3d 3d 20 4e 55 4c 4c |ginFuncs| == NULL|
|00003600| 29 20 7c 7c 20 28 75 6e | 6c 6f 61 64 55 70 70 20 |) || (un|loadUpp |
|00003610| 3d 3d 20 4e 55 4c 4c 29 | 29 0a 09 09 65 72 72 20 |== NULL)|)...err |
|00003620| 3d 20 4e 50 45 52 52 5f | 49 4e 56 41 4c 49 44 5f |= NPERR_|INVALID_|
|00003630| 46 55 4e 43 54 41 42 4c | 45 5f 45 52 52 4f 52 3b |FUNCTABL|E_ERROR;|
|00003640| 0a 09 0a 09 2f 2f 0a 09 | 2f 2f 20 43 68 65 63 6b |....//..|// Check|
|00003650| 20 74 68 65 20 d2 6d 61 | 6a 6f 72 d3 20 76 65 72 | the .ma|jor. ver|
|00003660| 73 69 6f 6e 20 70 61 73 | 73 65 64 20 69 6e 20 4e |sion pas|sed in N|
|00003670| 65 74 73 63 61 70 65 d5 | 73 20 66 75 6e 63 74 69 |etscape.|s functi|
|00003680| 6f 6e 20 74 61 62 6c 65 | 2e 0a 09 2f 2f 20 57 65 |on table|...// We|
|00003690| 20 77 6f 6e d5 74 20 6c | 6f 61 64 20 69 66 20 74 | won.t l|oad if t|
|000036a0| 68 65 20 6d 61 6a 6f 72 | 20 76 65 72 73 69 6f 6e |he major| version|
|000036b0| 20 69 73 20 6e 65 77 65 | 72 20 74 68 61 6e 20 77 | is newe|r than w|
|000036c0| 68 61 74 20 77 65 20 65 | 78 70 65 63 74 2e 0a 09 |hat we e|xpect...|
|000036d0| 2f 2f 20 41 6c 73 6f 20 | 63 68 65 63 6b 20 74 68 |// Also |check th|
|000036e0| 61 74 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |at the f|unction |
|000036f0| 74 61 62 6c 65 73 20 70 | 61 73 73 65 64 20 69 6e |tables p|assed in|
|00003700| 20 61 72 65 20 62 69 67 | 20 65 6e 6f 75 67 68 20 | are big| enough |
|00003710| 66 6f 72 0a 09 2f 2f 20 | 61 6c 6c 20 74 68 65 20 |for..// |all the |
|00003720| 66 75 6e 63 74 69 6f 6e | 73 20 77 65 20 6e 65 65 |function|s we nee|
|00003730| 64 20 28 74 68 65 79 20 | 63 6f 75 6c 64 20 62 65 |d (they |could be|
|00003740| 20 62 69 67 67 65 72 2c | 20 69 66 20 4e 65 74 73 | bigger,| if Nets|
|00003750| 63 61 70 65 20 61 64 64 | 65 64 0a 09 2f 2f 20 6e |cape add|ed..// n|
|00003760| 65 77 20 41 50 49 73 2c | 20 62 75 74 20 74 68 61 |ew APIs,| but tha|
|00003770| 74 d5 73 20 4f 4b 20 77 | 69 74 68 20 75 73 20 2d |t.s OK w|ith us -|
|00003780| 2d 20 77 65 d5 6c 6c 20 | 6a 75 73 74 20 69 67 6e |- we.ll |just ign|
|00003790| 6f 72 65 20 74 68 65 6d | 29 2e 0a 09 2f 2f 0a 09 |ore them|)...//..|
|000037a0| 69 66 20 28 65 72 72 20 | 3d 3d 20 4e 50 45 52 52 |if (err |== NPERR|
|000037b0| 5f 4e 4f 5f 45 52 52 4f | 52 29 0a 09 7b 0a 09 09 |_NO_ERRO|R)..{...|
|000037c0| 69 66 20 28 28 6e 73 54 | 61 62 6c 65 2d 3e 76 65 |if ((nsT|able->ve|
|000037d0| 72 73 69 6f 6e 20 3e 3e | 20 38 29 20 3e 20 4e 50 |rsion >>| 8) > NP|
|000037e0| 5f 56 45 52 53 49 4f 4e | 5f 4d 41 4a 4f 52 29 09 |_VERSION|_MAJOR).|
|000037f0| 09 2f 2f 20 4d 61 6a 6f | 72 20 76 65 72 73 69 6f |.// Majo|r versio|
|00003800| 6e 20 69 73 20 69 6e 20 | 68 69 67 68 20 62 79 74 |n is in |high byt|
|00003810| 65 0a 09 09 09 65 72 72 | 20 3d 20 4e 50 45 52 52 |e....err| = NPERR|
|00003820| 5f 49 4e 43 4f 4d 50 41 | 54 49 42 4c 45 5f 56 45 |_INCOMPA|TIBLE_VE|
|00003830| 52 53 49 4f 4e 5f 45 52 | 52 4f 52 3b 0a 2f 2f 09 |RSION_ER|ROR;.//.|
|00003840| 09 69 66 20 28 6e 73 54 | 61 62 6c 65 2d 3e 73 69 |.if (nsT|able->si|
|00003850| 7a 65 20 3c 20 73 69 7a | 65 6f 66 28 4e 50 4e 65 |ze < siz|eof(NPNe|
|00003860| 74 73 63 61 70 65 46 75 | 6e 63 73 29 29 0a 2f 2f |tscapeFu|ncs)).//|
|00003870| 09 09 09 65 72 72 20 3d | 20 4e 50 45 52 52 5f 49 |...err =| NPERR_I|
|00003880| 4e 56 41 4c 49 44 5f 46 | 55 4e 43 54 41 42 4c 45 |NVALID_F|UNCTABLE|
|00003890| 5f 45 52 52 4f 52 3b 0a | 2f 2f 09 09 69 66 20 28 |_ERROR;.|//..if (|
|000038a0| 70 6c 75 67 69 6e 46 75 | 6e 63 73 2d 3e 73 69 7a |pluginFu|ncs->siz|
|000038b0| 65 20 3c 20 73 69 7a 65 | 6f 66 28 4e 50 50 6c 75 |e < size|of(NPPlu|
|000038c0| 67 69 6e 46 75 6e 63 73 | 29 29 09 09 0a 2f 2f 09 |ginFuncs|))...//.|
|000038d0| 09 09 65 72 72 20 3d 20 | 4e 50 45 52 52 5f 49 4e |..err = |NPERR_IN|
|000038e0| 56 41 4c 49 44 5f 46 55 | 4e 43 54 41 42 4c 45 5f |VALID_FU|NCTABLE_|
|000038f0| 45 52 52 4f 52 3b 0a 09 | 7d 0a 09 09 0a 09 0a 09 |ERROR;..|}.......|
|00003900| 69 66 20 28 65 72 72 20 | 3d 3d 20 4e 50 45 52 52 |if (err |== NPERR|
|00003910| 5f 4e 4f 5f 45 52 52 4f | 52 29 0a 09 7b 0a 09 09 |_NO_ERRO|R)..{...|
|00003920| 2f 2f 0a 09 09 2f 2f 20 | 43 6f 70 79 20 61 6c 6c |//...// |Copy all|
|00003930| 20 74 68 65 20 66 69 65 | 6c 64 73 20 6f 66 20 4e | the fie|lds of N|
|00003940| 65 74 73 63 61 70 65 d5 | 73 20 66 75 6e 63 74 69 |etscape.|s functi|
|00003950| 6f 6e 20 74 61 62 6c 65 | 20 69 6e 74 6f 20 6f 75 |on table| into ou|
|00003960| 72 0a 09 09 2f 2f 20 63 | 6f 70 79 20 73 6f 20 77 |r...// c|opy so w|
|00003970| 65 20 63 61 6e 20 63 61 | 6c 6c 20 62 61 63 6b 20 |e can ca|ll back |
|00003980| 69 6e 74 6f 20 4e 65 74 | 73 63 61 70 65 20 6c 61 |into Net|scape la|
|00003990| 74 65 72 2e 20 20 4e 6f | 74 65 20 74 68 61 74 0a |ter. No|te that.|
|000039a0| 09 09 2f 2f 20 77 65 20 | 6e 65 65 64 20 74 6f 20 |..// we |need to |
|000039b0| 63 6f 70 79 20 74 68 65 | 20 66 69 65 6c 64 73 20 |copy the| fields |
|000039c0| 6f 6e 65 20 62 79 20 6f | 6e 65 2c 20 72 61 74 68 |one by o|ne, rath|
|000039d0| 65 72 20 74 68 61 6e 20 | 61 73 73 69 67 6e 69 6e |er than |assignin|
|000039e0| 67 0a 09 09 2f 2f 20 74 | 68 65 20 77 68 6f 6c 65 |g...// t|he whole|
|000039f0| 20 73 74 72 75 63 74 75 | 72 65 2c 20 62 65 63 61 | structu|re, beca|
|00003a00| 75 73 65 20 74 68 65 20 | 4e 65 74 73 63 61 70 65 |use the |Netscape|
|00003a10| 20 66 75 6e 63 74 69 6f | 6e 20 74 61 62 6c 65 0a | functio|n table.|
|00003a20| 09 09 2f 2f 20 63 6f 75 | 6c 64 20 61 63 74 75 61 |..// cou|ld actua|
|00003a30| 6c 6c 79 20 62 65 20 62 | 69 67 67 65 72 20 74 68 |lly be b|igger th|
|00003a40| 61 6e 20 77 68 61 74 20 | 77 65 20 65 78 70 65 63 |an what |we expec|
|00003a50| 74 2e 0a 09 09 2f 2f 0a | 09 09 0a 09 09 69 6e 74 |t....//.|.....int|
|00003a60| 20 6e 61 76 4d 69 6e 6f | 72 56 65 72 73 20 3d 20 | navMino|rVers = |
|00003a70| 6e 73 54 61 62 6c 65 2d | 3e 76 65 72 73 69 6f 6e |nsTable-|>version|
|00003a80| 20 26 20 30 78 46 46 3b | 0a 0a 09 09 67 4e 65 74 | & 0xFF;|....gNet|
|00003a90| 73 63 61 70 65 46 75 6e | 63 73 2e 76 65 72 73 69 |scapeFun|cs.versi|
|00003aa0| 6f 6e 20 3d 20 6e 73 54 | 61 62 6c 65 2d 3e 76 65 |on = nsT|able->ve|
|00003ab0| 72 73 69 6f 6e 3b 0a 09 | 09 67 4e 65 74 73 63 61 |rsion;..|.gNetsca|
|00003ac0| 70 65 46 75 6e 63 73 2e | 73 69 7a 65 20 3d 20 6e |peFuncs.|size = n|
|00003ad0| 73 54 61 62 6c 65 2d 3e | 73 69 7a 65 3b 0a 09 09 |sTable->|size;...|
|00003ae0| 67 4e 65 74 73 63 61 70 | 65 46 75 6e 63 73 2e 70 |gNetscap|eFuncs.p|
|00003af0| 6f 73 74 75 72 6c 20 3d | 20 6e 73 54 61 62 6c 65 |osturl =| nsTable|
|00003b00| 2d 3e 70 6f 73 74 75 72 | 6c 3b 0a 09 09 67 4e 65 |->postur|l;...gNe|
|00003b10| 74 73 63 61 70 65 46 75 | 6e 63 73 2e 67 65 74 75 |tscapeFu|ncs.getu|
|00003b20| 72 6c 20 3d 20 6e 73 54 | 61 62 6c 65 2d 3e 67 65 |rl = nsT|able->ge|
|00003b30| 74 75 72 6c 3b 0a 09 09 | 67 4e 65 74 73 63 61 70 |turl;...|gNetscap|
|00003b40| 65 46 75 6e 63 73 2e 72 | 65 71 75 65 73 74 72 65 |eFuncs.r|equestre|
|00003b50| 61 64 20 3d 20 6e 73 54 | 61 62 6c 65 2d 3e 72 65 |ad = nsT|able->re|
|00003b60| 71 75 65 73 74 72 65 61 | 64 3b 0a 09 09 67 4e 65 |questrea|d;...gNe|
|00003b70| 74 73 63 61 70 65 46 75 | 6e 63 73 2e 6e 65 77 73 |tscapeFu|ncs.news|
|00003b80| 74 72 65 61 6d 20 3d 20 | 6e 73 54 61 62 6c 65 2d |tream = |nsTable-|
|00003b90| 3e 6e 65 77 73 74 72 65 | 61 6d 3b 0a 09 09 67 4e |>newstre|am;...gN|
|00003ba0| 65 74 73 63 61 70 65 46 | 75 6e 63 73 2e 77 72 69 |etscapeF|uncs.wri|
|00003bb0| 74 65 20 3d 20 6e 73 54 | 61 62 6c 65 2d 3e 77 72 |te = nsT|able->wr|
|00003bc0| 69 74 65 3b 0a 09 09 67 | 4e 65 74 73 63 61 70 65 |ite;...g|Netscape|
|00003bd0| 46 75 6e 63 73 2e 64 65 | 73 74 72 6f 79 73 74 72 |Funcs.de|stroystr|
|00003be0| 65 61 6d 20 3d 20 6e 73 | 54 61 62 6c 65 2d 3e 64 |eam = ns|Table->d|
|00003bf0| 65 73 74 72 6f 79 73 74 | 72 65 61 6d 3b 0a 09 09 |estroyst|ream;...|
|00003c00| 67 4e 65 74 73 63 61 70 | 65 46 75 6e 63 73 2e 73 |gNetscap|eFuncs.s|
|00003c10| 74 61 74 75 73 20 3d 20 | 6e 73 54 61 62 6c 65 2d |tatus = |nsTable-|
|00003c20| 3e 73 74 61 74 75 73 3b | 0a 09 09 67 4e 65 74 73 |>status;|...gNets|
|00003c30| 63 61 70 65 46 75 6e 63 | 73 2e 75 61 67 65 6e 74 |capeFunc|s.uagent|
|00003c40| 20 3d 20 6e 73 54 61 62 | 6c 65 2d 3e 75 61 67 65 | = nsTab|le->uage|
|00003c50| 6e 74 3b 0a 09 09 67 4e | 65 74 73 63 61 70 65 46 |nt;...gN|etscapeF|
|00003c60| 75 6e 63 73 2e 6d 65 6d | 61 6c 6c 6f 63 20 3d 20 |uncs.mem|alloc = |
|00003c70| 6e 73 54 61 62 6c 65 2d | 3e 6d 65 6d 61 6c 6c 6f |nsTable-|>memallo|
|00003c80| 63 3b 0a 09 09 67 4e 65 | 74 73 63 61 70 65 46 75 |c;...gNe|tscapeFu|
|00003c90| 6e 63 73 2e 6d 65 6d 66 | 72 65 65 20 3d 20 6e 73 |ncs.memf|ree = ns|
|00003ca0| 54 61 62 6c 65 2d 3e 6d | 65 6d 66 72 65 65 3b 0a |Table->m|emfree;.|
|00003cb0| 09 09 67 4e 65 74 73 63 | 61 70 65 46 75 6e 63 73 |..gNetsc|apeFuncs|
|00003cc0| 2e 6d 65 6d 66 6c 75 73 | 68 20 3d 20 6e 73 54 61 |.memflus|h = nsTa|
|00003cd0| 62 6c 65 2d 3e 6d 65 6d | 66 6c 75 73 68 3b 0a 09 |ble->mem|flush;..|
|00003ce0| 09 67 4e 65 74 73 63 61 | 70 65 46 75 6e 63 73 2e |.gNetsca|peFuncs.|
|00003cf0| 72 65 6c 6f 61 64 70 6c | 75 67 69 6e 73 20 3d 20 |reloadpl|ugins = |
|00003d00| 6e 73 54 61 62 6c 65 2d | 3e 72 65 6c 6f 61 64 70 |nsTable-|>reloadp|
|00003d10| 6c 75 67 69 6e 73 3b 0a | 09 09 69 66 28 20 6e 61 |lugins;.|..if( na|
|00003d20| 76 4d 69 6e 6f 72 56 65 | 72 73 20 3e 3d 20 4e 50 |vMinorVe|rs >= NP|
|00003d30| 56 45 52 53 5f 48 41 53 | 5f 4c 49 56 45 43 4f 4e |VERS_HAS|_LIVECON|
|00003d40| 4e 45 43 54 20 29 0a 09 | 09 7b 0a 09 09 09 67 4e |NECT )..|.{....gN|
|00003d50| 65 74 73 63 61 70 65 46 | 75 6e 63 73 2e 67 65 74 |etscapeF|uncs.get|
|00003d60| 4a 61 76 61 45 6e 76 20 | 3d 20 6e 73 54 61 62 6c |JavaEnv |= nsTabl|
|00003d70| 65 2d 3e 67 65 74 4a 61 | 76 61 45 6e 76 3b 0a 09 |e->getJa|vaEnv;..|
|00003d80| 09 09 67 4e 65 74 73 63 | 61 70 65 46 75 6e 63 73 |..gNetsc|apeFuncs|
|00003d90| 2e 67 65 74 4a 61 76 61 | 50 65 65 72 20 3d 20 6e |.getJava|Peer = n|
|00003da0| 73 54 61 62 6c 65 2d 3e | 67 65 74 4a 61 76 61 50 |sTable->|getJavaP|
|00003db0| 65 65 72 3b 0a 09 09 7d | 0a 09 09 69 66 28 20 6e |eer;...}|...if( n|
|00003dc0| 61 76 4d 69 6e 6f 72 56 | 65 72 73 20 3e 3d 20 4e |avMinorV|ers >= N|
|00003dd0| 50 56 45 52 53 5f 48 41 | 53 5f 4e 4f 54 49 46 49 |PVERS_HA|S_NOTIFI|
|00003de0| 43 41 54 49 4f 4e 20 29 | 0a 09 09 7b 09 0a 09 09 |CATION )|...{....|
|00003df0| 09 67 4e 65 74 73 63 61 | 70 65 46 75 6e 63 73 2e |.gNetsca|peFuncs.|
|00003e00| 67 65 74 75 72 6c 6e 6f | 74 69 66 79 20 3d 20 6e |geturlno|tify = n|
|00003e10| 73 54 61 62 6c 65 2d 3e | 67 65 74 75 72 6c 6e 6f |sTable->|geturlno|
|00003e20| 74 69 66 79 3b 0a 09 09 | 09 67 4e 65 74 73 63 61 |tify;...|.gNetsca|
|00003e30| 70 65 46 75 6e 63 73 2e | 70 6f 73 74 75 72 6c 6e |peFuncs.|posturln|
|00003e40| 6f 74 69 66 79 20 3d 20 | 6e 73 54 61 62 6c 65 2d |otify = |nsTable-|
|00003e50| 3e 70 6f 73 74 75 72 6c | 6e 6f 74 69 66 79 3b 0a |>posturl|notify;.|
|00003e60| 09 09 7d 0a 09 09 0a 09 | 09 2f 2f 0a 09 09 2f 2f |..}.....|.//...//|
|00003e70| 20 53 65 74 20 75 70 20 | 74 68 65 20 70 6c 75 67 | Set up |the plug|
|00003e80| 69 6e 20 66 75 6e 63 74 | 69 6f 6e 20 74 61 62 6c |in funct|ion tabl|
|00003e90| 65 20 74 68 61 74 20 4e | 65 74 73 63 61 70 65 20 |e that N|etscape |
|00003ea0| 77 69 6c 6c 20 75 73 65 | 20 74 6f 0a 09 09 2f 2f |will use| to...//|
|00003eb0| 20 63 61 6c 6c 20 75 73 | 2e 20 20 4e 65 74 73 63 | call us|. Netsc|
|00003ec0| 61 70 65 20 6e 65 65 64 | 73 20 74 6f 20 6b 6e 6f |ape need|s to kno|
|00003ed0| 77 20 61 62 6f 75 74 20 | 6f 75 72 20 76 65 72 73 |w about |our vers|
|00003ee0| 69 6f 6e 20 61 6e 64 20 | 73 69 7a 65 0a 09 09 2f |ion and |size.../|
|00003ef0| 2f 20 61 6e 64 20 68 61 | 76 65 20 61 20 55 6e 69 |/ and ha|ve a Uni|
|00003f00| 76 65 72 73 61 6c 50 72 | 6f 63 50 6f 69 6e 74 65 |versalPr|ocPointe|
|00003f10| 72 20 66 6f 72 20 65 76 | 65 72 79 20 66 75 6e 63 |r for ev|ery func|
|00003f20| 74 69 6f 6e 20 77 65 20 | 69 6d 70 6c 65 6d 65 6e |tion we |implemen|
|00003f30| 74 2e 0a 09 09 2f 2f 0a | 09 09 70 6c 75 67 69 6e |t....//.|..plugin|
|00003f40| 46 75 6e 63 73 2d 3e 76 | 65 72 73 69 6f 6e 20 3d |Funcs->v|ersion =|
|00003f50| 20 28 4e 50 5f 56 45 52 | 53 49 4f 4e 5f 4d 41 4a | (NP_VER|SION_MAJ|
|00003f60| 4f 52 20 3c 3c 20 38 29 | 20 2b 20 4e 50 5f 56 45 |OR << 8)| + NP_VE|
|00003f70| 52 53 49 4f 4e 5f 4d 49 | 4e 4f 52 3b 0a 09 09 70 |RSION_MI|NOR;...p|
|00003f80| 6c 75 67 69 6e 46 75 6e | 63 73 2d 3e 73 69 7a 65 |luginFun|cs->size|
|00003f90| 20 3d 20 73 69 7a 65 6f | 66 28 4e 50 50 6c 75 67 | = sizeo|f(NPPlug|
|00003fa0| 69 6e 46 75 6e 63 73 29 | 3b 0a 09 09 70 6c 75 67 |inFuncs)|;...plug|
|00003fb0| 69 6e 46 75 6e 63 73 2d | 3e 6e 65 77 70 20 3d 20 |inFuncs-|>newp = |
|00003fc0| 4e 65 77 4e 50 50 5f 4e | 65 77 50 72 6f 63 28 50 |NewNPP_N|ewProc(P|
|00003fd0| 72 69 76 61 74 65 5f 4e | 65 77 29 3b 0a 09 09 70 |rivate_N|ew);...p|
|00003fe0| 6c 75 67 69 6e 46 75 6e | 63 73 2d 3e 64 65 73 74 |luginFun|cs->dest|
|00003ff0| 72 6f 79 20 3d 20 4e 65 | 77 4e 50 50 5f 44 65 73 |roy = Ne|wNPP_Des|
|00004000| 74 72 6f 79 50 72 6f 63 | 28 50 72 69 76 61 74 65 |troyProc|(Private|
|00004010| 5f 44 65 73 74 72 6f 79 | 29 3b 0a 09 09 70 6c 75 |_Destroy|);...plu|
|00004020| 67 69 6e 46 75 6e 63 73 | 2d 3e 73 65 74 77 69 6e |ginFuncs|->setwin|
|00004030| 64 6f 77 20 3d 20 4e 65 | 77 4e 50 50 5f 53 65 74 |dow = Ne|wNPP_Set|
|00004040| 57 69 6e 64 6f 77 50 72 | 6f 63 28 50 72 69 76 61 |WindowPr|oc(Priva|
|00004050| 74 65 5f 53 65 74 57 69 | 6e 64 6f 77 29 3b 0a 09 |te_SetWi|ndow);..|
|00004060| 09 70 6c 75 67 69 6e 46 | 75 6e 63 73 2d 3e 6e 65 |.pluginF|uncs->ne|
|00004070| 77 73 74 72 65 61 6d 20 | 3d 20 4e 65 77 4e 50 50 |wstream |= NewNPP|
|00004080| 5f 4e 65 77 53 74 72 65 | 61 6d 50 72 6f 63 28 50 |_NewStre|amProc(P|
|00004090| 72 69 76 61 74 65 5f 4e | 65 77 53 74 72 65 61 6d |rivate_N|ewStream|
|000040a0| 29 3b 0a 09 09 70 6c 75 | 67 69 6e 46 75 6e 63 73 |);...plu|ginFuncs|
|000040b0| 2d 3e 64 65 73 74 72 6f | 79 73 74 72 65 61 6d 20 |->destro|ystream |
|000040c0| 3d 20 4e 65 77 4e 50 50 | 5f 44 65 73 74 72 6f 79 |= NewNPP|_Destroy|
|000040d0| 53 74 72 65 61 6d 50 72 | 6f 63 28 50 72 69 76 61 |StreamPr|oc(Priva|
|000040e0| 74 65 5f 44 65 73 74 72 | 6f 79 53 74 72 65 61 6d |te_Destr|oyStream|
|000040f0| 29 3b 0a 09 09 70 6c 75 | 67 69 6e 46 75 6e 63 73 |);...plu|ginFuncs|
|00004100| 2d 3e 61 73 66 69 6c 65 | 20 3d 20 4e 65 77 4e 50 |->asfile| = NewNP|
|00004110| 50 5f 53 74 72 65 61 6d | 41 73 46 69 6c 65 50 72 |P_Stream|AsFilePr|
|00004120| 6f 63 28 50 72 69 76 61 | 74 65 5f 53 74 72 65 61 |oc(Priva|te_Strea|
|00004130| 6d 41 73 46 69 6c 65 29 | 3b 0a 09 09 70 6c 75 67 |mAsFile)|;...plug|
|00004140| 69 6e 46 75 6e 63 73 2d | 3e 77 72 69 74 65 72 65 |inFuncs-|>writere|
|00004150| 61 64 79 20 3d 20 4e 65 | 77 4e 50 50 5f 57 72 69 |ady = Ne|wNPP_Wri|
|00004160| 74 65 52 65 61 64 79 50 | 72 6f 63 28 50 72 69 76 |teReadyP|roc(Priv|
|00004170| 61 74 65 5f 57 72 69 74 | 65 52 65 61 64 79 29 3b |ate_Writ|eReady);|
|00004180| 0a 09 09 70 6c 75 67 69 | 6e 46 75 6e 63 73 2d 3e |...plugi|nFuncs->|
|00004190| 77 72 69 74 65 20 3d 20 | 4e 65 77 4e 50 50 5f 57 |write = |NewNPP_W|
|000041a0| 72 69 74 65 50 72 6f 63 | 28 50 72 69 76 61 74 65 |riteProc|(Private|
|000041b0| 5f 57 72 69 74 65 29 3b | 0a 09 09 70 6c 75 67 69 |_Write);|...plugi|
|000041c0| 6e 46 75 6e 63 73 2d 3e | 70 72 69 6e 74 20 3d 20 |nFuncs->|print = |
|000041d0| 4e 65 77 4e 50 50 5f 50 | 72 69 6e 74 50 72 6f 63 |NewNPP_P|rintProc|
|000041e0| 28 50 72 69 76 61 74 65 | 5f 50 72 69 6e 74 29 3b |(Private|_Print);|
|000041f0| 0a 09 09 70 6c 75 67 69 | 6e 46 75 6e 63 73 2d 3e |...plugi|nFuncs->|
|00004200| 65 76 65 6e 74 20 3d 20 | 4e 65 77 4e 50 50 5f 48 |event = |NewNPP_H|
|00004210| 61 6e 64 6c 65 45 76 65 | 6e 74 50 72 6f 63 28 50 |andleEve|ntProc(P|
|00004220| 72 69 76 61 74 65 5f 48 | 61 6e 64 6c 65 45 76 65 |rivate_H|andleEve|
|00004230| 6e 74 29 3b 09 0a 09 09 | 69 66 28 20 6e 61 76 4d |nt);....|if( navM|
|00004240| 69 6e 6f 72 56 65 72 73 | 20 3e 3d 20 4e 50 56 45 |inorVers| >= NPVE|
|00004250| 52 53 5f 48 41 53 5f 4e | 4f 54 49 46 49 43 41 54 |RS_HAS_N|OTIFICAT|
|00004260| 49 4f 4e 20 29 0a 09 09 | 7b 09 0a 09 09 09 70 6c |ION )...|{.....pl|
|00004270| 75 67 69 6e 46 75 6e 63 | 73 2d 3e 75 72 6c 6e 6f |uginFunc|s->urlno|
|00004280| 74 69 66 79 20 3d 20 4e | 65 77 4e 50 50 5f 55 52 |tify = N|ewNPP_UR|
|00004290| 4c 4e 6f 74 69 66 79 50 | 72 6f 63 28 50 72 69 76 |LNotifyP|roc(Priv|
|000042a0| 61 74 65 5f 55 52 4c 4e | 6f 74 69 66 79 29 3b 09 |ate_URLN|otify);.|
|000042b0| 09 09 0a 09 09 7d 0a 09 | 09 69 66 28 20 6e 61 76 |.....}..|.if( nav|
|000042c0| 4d 69 6e 6f 72 56 65 72 | 73 20 3e 3d 20 4e 50 56 |MinorVer|s >= NPV|
|000042d0| 45 52 53 5f 48 41 53 5f | 4c 49 56 45 43 4f 4e 4e |ERS_HAS_|LIVECONN|
|000042e0| 45 43 54 20 29 0a 09 09 | 7b 0a 09 09 09 70 6c 75 |ECT )...|{....plu|
|000042f0| 67 69 6e 46 75 6e 63 73 | 2d 3e 6a 61 76 61 43 6c |ginFuncs|->javaCl|
|00004300| 61 73 73 09 3d 20 28 4a | 52 49 47 6c 6f 62 61 6c |ass.= (J|RIGlobal|
|00004310| 52 65 66 29 20 50 72 69 | 76 61 74 65 5f 47 65 74 |Ref) Pri|vate_Get|
|00004320| 4a 61 76 61 43 6c 61 73 | 73 28 29 3b 0a 09 09 7d |JavaClas|s();...}|
|00004330| 0a 09 09 2a 75 6e 6c 6f | 61 64 55 70 70 20 3d 20 |...*unlo|adUpp = |
|00004340| 4e 65 77 4e 50 50 5f 53 | 68 75 74 64 6f 77 6e 50 |NewNPP_S|hutdownP|
|00004350| 72 6f 63 28 50 72 69 76 | 61 74 65 5f 53 68 75 74 |roc(Priv|ate_Shut|
|00004360| 64 6f 77 6e 29 3b 0a 09 | 09 53 65 74 55 70 51 44 |down);..|.SetUpQD|
|00004370| 28 29 3b 0a 09 09 65 72 | 72 20 3d 20 50 72 69 76 |();...er|r = Priv|
|00004380| 61 74 65 5f 49 6e 69 74 | 69 61 6c 69 7a 65 28 29 |ate_Init|ialize()|
|00004390| 3b 0a 09 7d 0a 09 0a 09 | 45 78 69 74 43 6f 64 65 |;..}....|ExitCode|
|000043a0| 52 65 73 6f 75 72 63 65 | 28 29 3b 0a 09 72 65 74 |Resource|();..ret|
|000043b0| 75 72 6e 20 65 72 72 3b | 0a 7d 0a 00 00 00 00 00 |urn err;|.}......|
|000043c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004400| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00004410| 00 0a 00 00 00 69 6d 61 | 67 65 2f 67 69 66 00 00 |.....ima|ge/gif..|
|00004420| 00 00 00 00 00 00 00 00 | 0f 02 00 00 00 00 00 00 |........|........|
|00004430| 09 6e 70 6d 61 63 2e 63 | 70 70 02 00 02 00 54 45 |.npmac.c|pp....TE|
|00004440| 58 54 43 57 49 45 01 00 | ff ff ff ff 00 00 00 00 |XTCWIE..|........|
|00004450| 02 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|00004460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004470| 00 00 ad f4 cd 52 00 00 | 43 3b 00 00 01 9a 00 00 |.....R..|C;......|
|00004480| 03 00 00 00 46 60 ee 31 | 8d 4a 1a 32 00 00 00 00 |....F`.1|.J.2....|
|00004490| a9 26 00 00 00 00 00 00 | 00 12 00 00 00 63 61 63 |.&......|.....cac|
|000044a0| 68 65 36 37 32 34 35 32 | 37 2e 68 74 6d 6c 00 00 |he672452|7.html..|
|000044b0| 00 00 00 01 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 0a 00 00 00 74 65 78 74 | 2f 68 74 6d 6c 00 00 00 |....text|/html...|
|000044e0| 00 00 00 00 00 00 00 a9 | 26 00 00 00 00 00 00 00 |........|&.......|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 03 | 00 04 00 5c 01 8b 02 ef |........|...\....|
|00004530| 03 ea 00 5c 01 8b 02 ef | 03 ea ae 68 54 d9 00 00 |...\....|...hT...|
|00004540| 06 db 00 00 06 db 00 00 | 38 18 01 00 00 00 00 04 |........|8.......|
|00004550| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00004560| 00 00 00 46 05 13 f9 e0 | 21 ca 00 00 00 1c 00 46 |...F....|!......F|
|00004570| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00004580| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00004590| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+