add OS2 MAIN macro

This commit is contained in:
Asbjørn Pettersen 1999-04-24 09:36:39 +00:00
parent f2546516fe
commit 11219a3742
3 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,13 @@
Sat Apr 24 11:30:34 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
* libgimp/gimp.c (set_gimp_PLUG_IN_INFO): Set the PLUG_IN_INFO
structure in a normal way (at run-time).
The UNIX PLUG_IN_INFO is set at linking time!
The read/writechannel is set in BINARY mode (OS/2 version).
* libgimp/gimp.h (MAIN): Add MAIN macro for OS/2 plugins.
1999-04-24 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/bucket_fill.c: added a "BG Color Fill" radio button.

View File

@ -57,6 +57,9 @@
# include <io.h>
# endif
#endif
#ifdef __EMX__
# include <fcntl.h>
#endif
#include "gimp.h"
#include "gimpprotocol.h"
@ -112,7 +115,15 @@ static GHashTable *temp_proc_ht = NULL;
static GPlugInInfo *PLUG_IN_INFO_PTR;
#define PLUG_IN_INFO (*PLUG_IN_INFO_PTR)
#else
#ifndef __EMX__
extern GPlugInInfo PLUG_IN_INFO;
#else
static GPlugInInfo PLUG_IN_INFO;
void set_gimp_PLUG_IN_INFO(const GPlugInInfo *p)
{
PLUG_IN_INFO = *p;
}
#endif
#endif
@ -161,6 +172,10 @@ gimp_main (int argc,
#ifndef NATIVE_WIN32
_readchannel = g_io_channel_unix_new (atoi (argv[2]));
_writechannel = g_io_channel_unix_new (atoi (argv[3]));
#ifdef __EMX__
setmode(g_io_channel_unix_get_fd(_readchannel), O_BINARY);
setmode(g_io_channel_unix_get_fd(_writechannel), O_BINARY);
#endif
#else
_readchannel = g_io_channel_win32_new_pipe (atoi (argv[2]));
peer = strchr (argv[3], ':') + 1;

View File

@ -206,12 +206,22 @@ struct _GParam
return gimp_main (argc, argv); \
}
#else
#ifndef __EMX__
# define MAIN() \
int \
main (int argc, char *argv[]) \
{ \
return gimp_main (argc, argv); \
}
#else
# define MAIN() \
int \
main (int argc, char *argv[]) \
{ \
set_gimp_PLUG_IN_INFO(&PLUG_IN_INFO); \
return gimp_main (argc, argv); \
}
#endif
#endif