New file.
* plug-ins/makefile.msc: New file.
* plug-ins/*/*.c (Well, not really all files, but many):
Portability fixes. Include config.h, and guard inclusion of POSIX
and Unix headers like <unistd.h>, <dirent.h> and
<sys/time.h>. Include <string.h> if functions from it are
used. Use g_ntohl() and g_htonl() insteead of ntohl() and htonl(),
thus no need to include <netinet/in.h>. Include <io.h> on Win32
when using open/read/write (which actually are defined as
_open/_read/_write by glib.h). Define S_* macros if necessary on
Win32. Define rint() and M_PI if necessary (these definitions
should be factored out somewhere, no sense repeating them in lots
of files). Open files in binary mode when needed.
* plug-ins/FractalExplorer/FractalExplorer.c: Use
g_malloc()/g_free(). Use g_strdup_printf().
* plug-ins/dbbrowser/dbbrowser.c: No need to include <X11/Xlib.h>.
* plug-ins/destripe/destripe.c: Guard use of SIGBUS.
* plug-ins/{flame/flame,hrz/hrz,pnm/pnm}.c: No need to check for
NULL returns from g_malloc() and g_new() as they abort on failure.
Use g_strdup_printf().
* plug-ins/gz/gz.c: Win32 version of running the subprocess.
* plug-ins/hrz/hrz.c: Win32 version. Use more generic tests for
non-Unix (OS/2 and Win32), for instance HAVE_MMAP.
* plug-ins/script-fu/interp_slib.c: Win32 version of myruntime().
* plug-ins/script-fu/interp_sliba.c: Handle \\ (escaped backslahsh).
* plug-ins/script-fu/script-fu-console.c: Bypass on Win32.
* plug-ins/script-fu/script-fu-scripts.c: Portability fixes. Use
g_strdup_printf() instead of separate malloc() and sprintf(). Use
g_strescape() for strings being passed to Scheme. Some Win32-only
stuff.
This commit is contained in:
@ -16,21 +16,37 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "siod.h"
|
||||
#include "script-fu-console.h"
|
||||
#include <plug-ins/dbbrowser/dbbrowser.h>
|
||||
|
||||
#ifdef NATIVE_WIN32
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifndef NATIVE_WIN32
|
||||
|
||||
#define TEXT_WIDTH 400
|
||||
#define TEXT_HEIGHT 400
|
||||
#define ENTRY_WIDTH 400
|
||||
@ -572,6 +588,8 @@ script_fu_close_siod_console ()
|
||||
close (siod_output_pipe[1]);
|
||||
}
|
||||
|
||||
#endif /* !NATIVE_WIN32 */
|
||||
|
||||
void
|
||||
script_fu_eval_run (char *name,
|
||||
int nparams,
|
||||
|
||||
Reference in New Issue
Block a user