Rev 193 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 193 | Rev 259 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | This file is part of a common library for Adobe(R) Illustrator(R) plugins |
2 | This file is part of a common library for Adobe(R) Illustrator(R) plugins |
3 | Copyright (C) 2002-6 Toby Thain, toby@telegraphics.com.au |
3 | Copyright (C) 2002-6 Toby Thain, toby@telegraphics.com.au |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, |
10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. |
13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License |
15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ |
18 | */ |
19 | 19 | ||
20 | #include "common.h" |
20 | #include "common.h" |
21 | 21 | ||
22 | #include "aipluginmain.h" |
22 | #include "aipluginmain.h" |
23 | 23 | ||
24 | DLLEXPORT FXErr ai6main( char *selector, void *stuff ){ |
24 | DLLEXPORT FXErr ai6main( char *selector, void *stuff ){ |
25 | FXErr e = kSPNoError; |
25 | FXErr e = kSPNoError; |
26 | 26 | ||
27 | PUSH_GLOBALS |
27 | PUSH_GLOBALS |
28 | 28 | ||
29 | if(!strcmp(selector,kSelectorAI60StartupPlugin)) |
29 | if(!strcmp(selector,kSelectorAI60StartupPlugin)) |
30 | plugin_startup( (SPInterfaceMessage*)message ); |
30 | plugin_startup( (SPInterfaceMessage*)message ); |
31 | else if(!strcmp(selector,kSelectorAI60ShutdownPlugin)) |
31 | else if(!strcmp(selector,kSelectorAI60ShutdownPlugin)) |
32 | plugin_shutdown( (SPInterfaceMessage*)message ); |
32 | plugin_shutdown( (SPInterfaceMessage*)message ); |
33 | else if(!strcmp(selector,kSelectorAI60AboutPlugin)) |
33 | else if(!strcmp(selector,kSelectorAI60AboutPlugin)) |
34 | plugin_about( (SPInterfaceMessage*)message ); |
34 | plugin_about( (SPInterfaceMessage*)message ); |
35 | #ifdef ISFILTER |
35 | #ifdef ISFILTER |
36 | else if(!strcmp(selector,)) |
36 | else if(!strcmp(selector,)) |
37 | filter_go( (AIFilterMessage*)message ); |
37 | filter_go( (AIFilterMessage*)message ); |
38 | #endif |
38 | #endif |
39 | 39 | ||
40 | POP_GLOBALS |
40 | POP_GLOBALS |
41 | 41 | ||
42 | return e; |
42 | return e; |
43 | } |
43 | } |
44 | 44 | ||
45 | #ifdef kAIRealMathSuite |
45 | #ifdef kAIRealMathSuite |
46 | SPErr acq_suite( SPMessageData *m,const char *name, long version, const void **suite ) // from AI10 SDK |
46 | SPErr acq_suite( SPMessageData *m,const char *name, long version, const void **suite ) // from AI10 SDK |
47 | #else |
47 | #else |
48 | SPErr acq_suite( SPMessageData *m,char *name, long version, void **suite ) // from AI7 SDK |
48 | SPErr acq_suite( SPMessageData *m,char *name, long version, void **suite ) // from AI7 SDK |
49 | #endif |
49 | #endif |
50 | { |
50 | { |
51 | SPErr e = m->basic->AcquireSuite(name,version,suite); |
51 | SPErr e = m->basic->AcquireSuite(name,version,suite); |
52 | if(e){ |
52 | if(e){ |
53 | char s[0x100]; |
53 | char s[0x100]; |
54 | SPRINTF(s,"AcquireSuite \"%s\" (%ld) failed: %c%c%c%c",name,version,e>>24,e>>16,e>>8,e); |
54 | SPRINTF(s,"AcquireSuite \"%s\" (%ld) failed: %c%c%c%c",name,version,e>>24,e>>16,e>>8,e); |
55 | dbg(s); |
55 | dbg(s); |
56 | } |
56 | } |
57 | return e; |
57 | return e; |
58 | } |
58 | } |