LIBS = -lm \r
FLIBS=\r
#******************************************************************* \r
-INCLUDES= $(XFLAGS) $(TK_INC_PATH) $(TCL_INC_PATH) -I$(SCIDIR)/routines \r
-\r
-# we do not set CFLAGS and FFLAGS here \r
-#CFLAGS = $(CC_OPTIONS) \r
-#FFLAGS = $(FC_OPTIONS) \r
\r
QUIET=--quiet\r
\r
$(SCIDIR)/bin/scilab -nw -e "scitest('$(LIBRARY_NAME).tst');quit;"\r
\r
$(LIBRARY_NAME).dll : $(LIBRARY_NAME).def \r
- $(CC) --shared -s -o $(LIBRARY_NAME).dll $(LIBRARY_NAME).def \\r
- $(OBJS) $(SCIDIR)/bin/libsci.a --whole-archive -lg2c $(WINLIBS)\r
+ @$(ECHO) ------- Building $@ --------\r
+ @$(CC) --shared -s -o $(LIBRARY_NAME).dll $(LIBRARY_NAME).def \\r
+ $(OBJS) $(OTHERLIBS) $(SCIDIR)/bin/libsci.a -lg2c $(WINLIBS);\\r
+ dlltool -k --as as --dllname $(LIBRARY_NAME).dll --def $(LIBRARY_NAME).def --output-lib $(LIBRARY_NAME).a ;\r
\r
# here we could also use dumpexts XXXX \r
ECHO=echo\r
@$(RM) Defs\r
\r
\r
-.SUFFIXES: .F .F90 .f90 $(SUFFIXES)\r
+\r
+.SUFFIXES: .F $(SUFFIXES)\r
\r
FCOMPILE = echo "to be done" \r
\r
.f.o:\r
@echo "compiling $< with f2c (g77 pbs with dllimport)"\r
- @$(SCIDIR)/bin/f2c $(INCLUDES) -A $< ; \\r
- $(CC) $(INCLUDES) -I"$(SCIDIR)/routines/f2c" $(CFLAGS) -c $*.c; \\r
- $(RM) $*.c \r
+ @$(SCIDIR)/bin/f2c -I"$(SCIDIR)/routines/f2c" \\r
+ -I"$(SCIDIR)/routines" -A $< ; \r
+ $(CC) $(CFLAGS) -I"$(SCIDIR)/routines/f2c" -c $*.c; \\r
+ $(RM) $*.c \r
\r
.F.o:\r
- @echo "compiling $<"\r
- @$(FCOMPILE) -c $<\r
-\r
-.F90.o:\r
- @echo "compiling $<"\r
- @$(FCOMPILE) -c $<\r
+ @echo "compiling $< with f2c (g77 pbs with dllimport)"\r
+ @$(SCIDIR)/bin/f2c -I"$(SCIDIR)/routines/f2c" \\r
+ -I"$(SCIDIR)/routines" -A $< ; \r
+ $(CC) $(CFLAGS) -I"$(SCIDIR)/routines/f2c" -c $*.c; \\r
+ $(RM) $*.c \r
\r
-.f90.o:\r
- @echo "compiling $<"\r
- @$(FCOMPILE) -c $<\r
\r
\r
\r
# scilex-lib
bin/scilex : scilex-lib routines/wsci/Rscilab.o $(DLL_NAME).dll
- gcc -Wl,-subsystem,console -o $@.exe libs/main.o -L./bin -lsci $(WINLIBS)
+ gcc -mconsole -o $@.exe libs/main.o -L./bin -lsci $(WINLIBS)
# with gcc -mno-cygwin et f2c
# g77 -mno-cygwin -Wl,-subsystem,console --shared
# -mno-cygwin \
# -------------------------------------
+# -Wl,--whole-archive \
+# libs/*.a \
+# -Wl,--no-whole-archive -lg2c \
$(DLL_NAME).dll : $(DLL_NAME).def
- x=1;if test -f $(DLL_NAME).dll; then \
+ @x=1;if test -f $(DLL_NAME).dll; then \
x=`find $(DEFAULTS) $(LIBR) \( -name '*.a' -o -name '*.o' \) \
-newer $(DLL_NAME).dll -print | wc -l `; \
fi;\
if test $$x -ne 0; then \
$(RM) $@; \
echo "linking"; \
- $(CC) -v --shared -s \
- -o $(DLL_NAME).dll $(DLL_NAME).def $(DEFAULTS) $(RESOURCES) $(LIBR) \
- --whole-archive -Bstatic -lg2c -Bdynamic $(WINLIBS) ; \
+ $(LD) --shared -s -o $(DLL_NAME).dll $(DLL_NAME).def \
+ $(DEFAULTS) $(RESOURCES) \
+ $(LIBR) -lg2c $(WINLIBS) ; \
else \
echo $(DLL_NAME) is up to date ; \
fi
$(DLL_NAME).def : $(DEFAULTS) $(RESOURCES) $(LIBR)
@$(ECHO) ------- Building $@ --------
- @$(ECHO) LIBRARY $* > $*.def
+ @$(ECHO) LIBRARY $(DLL_NAME) > $*.def
@$(ECHO) EXPORTS >> $*.def
@cat libs/libg2c.def >> $*.def
@$(NM) $^ > Defs
# XXXXX attention on veut un --whole-archive pour lg2c
scilex-force :
- $(CC) -Wl,-subsystem,console -o bin/scilex.exe libs/scimain.o \
- $(RESOURCES) bin/libsci.a $(WINLIBS) --enable-stdcall-fixup
+ $(CC) -mconsole -o bin/scilex.exe libs/scimain.o \
+ $(RESOURCES) bin/libsci.a $(WINLIBS) --enable-stdcall-fixup
bin/sci.exe :
- $(CC) -Wl,-subsystem,console -o bin/sci.exe \
+ $(CC) -mconsole -o bin/sci.exe \
$(DEFAULTS) $(RESOURCES) $(LIBR) -lg2c $(WINLIBS)
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
+# small patch added to detect if a cygwin should not be considered
+# as mingw32 (using gcc) Jean-Philippe Chancelier 2002
+#
-timestamp='2001-09-04'
+timestamp='2002-07-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ int main (argc, argv) int argc; char *argv[]; {
+ #if defined (__MINGW32__)
+ printf ("%s-pc-mingw32\n",argv[1]);
+ #else
+ printf ("%s-pc-cygwin\n",argv[1]);
+ #endif
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy "${UNAME_MACHINE}" \
+ && rm -f $dummy.c $dummy.exe && exit 0
+ rm -f $dummy.c $dummy.exe
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
@echo "Type \"make tests\" in examples directory"
@echo " to test link and addinter features"
-SUBDIRS = interface-tour interface-tour-so \
- interface-tutorial interface-tutorial-so \
- interface-lapack intersci-examples intersci-examples-so \
+SUBDIRS1 = interface-tour-so interface-tutorial-so \
+ intersci-examples-so \
+ link-examples-so \
interface-general \
- link-examples link-examples-so \
- misc-examples man-examples macros-examples mex-examples
+ mex-examples/mex-with-so
+
+SUBDIRS2 = interface-tour interface-tutorial \
+ interface-lapack intersci-examples \
+ link-examples misc-examples man-examples macros-examples mex-examples
+
+SUBDIRS= $(SUBDIRS1) $(SUBDIRS2)
distclean::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
$(MAKE) $(MFLAGS) clean); \
done
-TEST_SUBDIRS = interface-tour interface-tour-so \
- interface-tutorial interface-tutorial-so \
- interface-lapack intersci-examples intersci-examples-so \
- link-examples link-examples-so \
- misc-examples man-examples macros-examples mex-examples
+TEST_SUBDIRS = $(SUBDIRS1)
tests::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
clean ::
@echo Cleaning
- @$(RM) -f -r *.o *.lo *.la *.so *.sl *.a *.dia .job.sce so_locations
+ @$(RM) -f -r *.o *.dll *.lo *.la *.so *.sl *.a *.dia .job.sce so_locations
@$(RM) -f -r .libs f3cloader.sce f3cmake f3floader.sce f3fmake
distclean:: clean
// loader.sce (../lib/loader.sce)
flag = "c"; // ext1c is a C function
-files = ['foo.o bar.o' ]; // objects files for ext1c
+files = ['foo.o';'bar.o' ]; // objects files for ext1c
libs = []; // other libs needed for linking
// the next call generates files (Makelib,loader.sce) used
include $(SCIDIR)/Makefile.incl
-all :: Makelib job
+all :: Makelib
make -f Makelib
Makelib : builder.sce
@echo running builder: BE PATIENT ...
@$(SCIDIR)/util/scidem $(SCIDIR) builder.sce builder.dia
-job :
- make -f Makelib
-
tests : all
make -f Makelib tests
clean ::
@echo Cleaning
- @$(RM) -f -r *.o *.lo *.la *.so *.sl *.a *.dia .job.sce so_locations
+ @$(RM) -f -r *.o *.lo *.la *.so *.dll *.sl *.a *.dia .job.sce so_locations
@$(RM) -f -r .libs f3cloader.sce f3cmake f3floader.sce f3fmake
distclean:: clean
\r
OBJSC = $(CINTERFACES) $(OTHERCOBJS)\r
\r
-f3f.obj : \r
- $(FC) $(FFLAGS) f3f.f\r
\r
-f3f.dll: f3f.obj\r
+f3f.dll: f3f.obj \r
@$(DUMPEXTS) -o "$*.def" "$*.dll" $**\r
- @$(LINKER) $(LINKER_FLAGS) f3f.obj $(SCIIMPLIB) $(XLIBSBIN) $(TERMCAPLIB) /nologo /dll /out:"$*.dll" /implib:"$*.ilib" /def:"$*.def" \r
+ $(LINKER) $(LINKER_FLAGS) f3f.obj $(SCIIMPLIB) $(XLIBSBIN) $(TERMCAPLIB) /nologo /dll /out:"$*.dll" /implib:"$*.ilib" /def:"$*.def" \r
\r
f3c.obj :\r
$(CC) $(CFLAGS) f3c.c\r
clean ::
@echo Cleaning
- @$(RM) -f -r *.o *.lo *.la *.so *.a *.dia .job.sce so_locations
+ @$(RM) -f -r *.o *.lo *.la *.so *.dll *.a *.dia .job.sce so_locations
@$(RM) -f -r .libs
distclean:: clean
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/*********************************************
* external fonction for ode
c with this calling sequence y is a n+np vector
c where np=dimension of scilab variable param
c
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision t, y, ydot, param
dimension y(3), ydot(3),param(3)
param(1)=y(n+1)
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
-#include "../../routines/stack-c.h"
+#include "stack-c.h"
/****************************************
* exemple with a call to ReadMatrix
c -->link('ext11f.o','ext11f')
c -->y=ode([1;0;0],0,[0.4,4],'ext11f')
c param must be defined as a scilab variable
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision t, y, ydot, param
logical creadmat
dimension y(3), ydot(3), param(3)
-/* Copyright INRIA */
-#include "../../routines/stack-c.h"
+/* Copyright Inria/Enpc */
+#include "stack-c.h"
/****************************************
* same example with call to GetMatrixptr
c -->param=[0.04,10000,3d+7];
c -->link('ext12f.o','ext12f')
c -->y=ode([1;0;0],0,[0.4,4],'ext12f')
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision t, y, ydot
logical cmatptr
dimension y(3), ydot(3)
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
struct {
float b[10];
subroutine ext13if(n,a)
-c Copyright INRIA
+c Copyright Inria/Enpc
common/cmntest/b(10)
real a(*)
do 1 k=1,max(n,10)
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/************************************
* (very) simple example 1
* c=a+b
************************************/
-#include "../../routines/stack-c.h"
+#include "stack-c.h"
int ext14cI(fname)
char* fname;
-c Copyright INRIA
+c Copyright Inria/Enpc
subroutine ext14fi(fname)
character*(*) fname
logical getrhsvar, createvar, putlhsvar
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/************************************
* (very) simple example 1
c -->a=[1,2,3];b=[4,5,6];n=3;
c -->c=call('ext1f',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d')
c c=a+b
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(*),b(*),c(*)
do 1 k=1,n
c(k)=a(k)+b(k)
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/************************************
* simple example 2 (using sin and cos)
c -->a=[1,2,3];b=[4,5,6];n=3;
c -->c=call('ext2f',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d')
c -->c=sin(a)+cos(b)
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(*),b(*),c(*)
do 1 k=1,n
c(k)=sin(a(k))+cos(b(k))
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/************************************
c -->c=call('ext3f','yes',1,'c',n,2,'i',a,3,'d',b,4,'d','out',[1,3],5,'d')
c -->c=sin(a)+cos(b)
c -------------------------------------
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(*),b(*),c(*)
character*(*) ch
if(ch(1:3).eq.'yes') then
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
#include <math.h>
-#include "../../routines/stack-c.h"
+#include "stack-c.h"
/************************************
* simple example 4 (reading a scilab chain)
c -->yes='no'
c -->c=a+b
c -->clear yes --> undefined variable : yes
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(*),b(*),c(*)
integer chmax
logical creadchain
-/* Copyright INRIA */
-#include "../../routines/stack-c.h"
+/* Copyright Inria/Enpc */
+#include "stack-c.h"
/******************************************
* Example 5
c -->a=[1,2,3];b=[2,3,4];
c -->c=call('ext5f',b,1,'d','out',[1,3],2,'d')
c -->c=a+2*b
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(3),b(*),c(*)
logical creadmat
-/* Copyright INRIA */
-#include "../../routines/stack-c.h"
+/* Copyright Inria/Enpc */
+#include "stack-c.h"
/******************************************
* example 6
c -->a=[1,2,3];b=[2,3,4];
c -->c=call('ext6f','a',1,'c',b,2,'d','out',[1,3],3,'d')
c -->c=a+2*b
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(3),b(*),c(*)
logical creadmat
character*(*) aname
-/* Copyright INRIA */
-#include "../../routines/stack-c.h"
+/* Copyright Inria/Enpc */
+#include "stack-c.h"
/******************************************
* example 7
c -->call('ext7f',a,1,'d',b,2,'d','out',1);
c c now exists
c -->c=a+2*b
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision a(3),b(3),c(3),w
logical cwritemat,cwritechain
do 1 k=1,3
-/* Copyright INRIA */
-#include "../../routines/stack-c.h"
+/* Copyright Inria/Enpc */
+#include "stack-c.h"
/****************************************
* an example with GetMatrixptr
c -->param=[1,2,3];
c -->link('ext8c.o','ext8c','C');
c -->y=call('ext8c','out',size(param),1,'d');
-c Copyright INRIA
+c Copyright Inria/Enpc
logical cmatptr
double precision y(*)
include '../../routines/stack.h'
-/* Copyright INRIA */
+/* Copyright Inria/Enpc */
/*********************************************
* argument function for ode
c -->link('ext9f.o','ext9f')
c -->ode([1;0;0],0,[0.4,4],'ext9f')
c
-c Copyright INRIA
+c Copyright Inria/Enpc
double precision t, y, ydot
dimension y(3), ydot(3)
ydot(1) = -.0400d+0*y(1) + 1.0d+4*y(2)*y(3)
include ../../Makefile.incl
-CFLAGS = $(CC_OPTIONS) -I../ -Wall
+CFLAGS = $(CC_OPTIONS)
FFLAGS = $(FC_OPTIONS)
include ../Make.lib
../../libs/scimain.o :
$(CC) $(CFLAGS) -o ../../libs/scimain.o -c scimain.c
+distclean::
+ @$(RM) ../../libs/scimain.o
+
#================= resources
RESOURCES= Rscilab.o
all :: $(RESOURCES)
-Rscilab.o : Rscilab.res
- $(CVTRES) Rscilab.res Rscilab.o
-
-Rscilab.res: Rscilab.rc wresource.h
- $(RC) $(RCVARS) /foRscilab.res Rscilab.rc
+Rscilab.o : Rscilab.rc wresource.h
+ $(RC) Rscilab.rc $(RCVARS) -o Rscilab.o
#===================test ========================
all:: ../../bin/lpr.exe
../../bin/lpr.exe : lpr.o
- $(CC) $(CFLAGS) -DGVW_ALONE $(LINKEROPT) -o $@ \
- lpr.o $(WIN32LIBS)
+ $(CC) $(CFLAGS) -DGVW_ALONE $(LINKEROPT) -o $@ $^ $(WIN32LIBS)
lpr.o : gvwprn.c
-#=================== runscilab========================
-
-RUNOBJSC = runscilab.o
-RUNRESOURCES= Rrunscilab.o
+distclean::
+ @$(RM) ../../bin/lpr.exe
-RUNLINKEROPT=-Wl,-subsystem,windows,-S
+#=================== runscilab========================
all :: ../../bin/runscilab.exe
-../../bin/runscilab.exe : $(RUNOBJSC) $(RUNRESOURCES)
- $(CC) $(CFLAGS) $(RUNLINKEROPT) -o ../../bin/runscilab.exe $(RUNOBJSC) \
- $(RUNRESOURCES) $(WIN32LIBS)
+../../bin/runscilab.exe: runscilab.o Rrunscilab.o
+ $(CC) $(CFLAGS) -o $@ $^ $(WIN32LIBS)
-all :: $(RUNRESOURCES)
+Rrunscilab.o: Rrunscilab.rc wresource.h
+ $(RC) Rrunscilab.rc $(RCVARS) -o Rrunscilab.o
-Rrunscilab.o : Rrunscilab.res
- $(CVTRES) Rrunscilab.res Rrunscilab.o
+distclean::
+ @$(RM) ../../bin/runscilab.exe
-Rrunscilab.res: Rrunscilab.rc
- $(RC) $(RCVARS) /foRrunscilab.res Rrunscilab.rc
+#=================== general ========================
clean ::
- $(RM) $(RUNOBJSC) $(RUNRESOURCES) Rsunscilab.res
+ @$(RM) *.o
-distclean::
- $(RM) $(RUNOBJSC) $(RUNRESOURCES) Rsunscilab.res
+distclean :: clean
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/*
* jpc_Xloop.c :
* (1997) : Jean-Philippe Chancelier
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
#ifndef GVW_ALONE
#define GVW_ALONE
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
#include <stdio.h>
#include <stdlib.h>
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/**************************************
* performs I/O in a console window
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
+#include <conio.h>
#ifdef __CYGWIN32__
#include <unistd.h> /* for isatty */
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/**************************************
* performs I/O in a windows window
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/*
Simple program to start Scilab with its console window hidden.
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
-
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
#include <stdio.h>
#include <windows.h>
#include <string.h>
+#include "common.h"
HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup, hChildStdoutRd,
hChildStdoutWr, hInputFile, hSaveStdin, hSaveStdout;
#include "../graphics/periWin-bcg.h" /* Scilab graphic window */
#include "wadd.h"
+#include "common.h"
+
/* wgnuplib.c */
extern HINSTANCE hdllInstance;
extern LPSTR szParentGraphClass;
extern LPSTR szAboutClass;
-void * LocalAllocPtr(UINT flags, UINT size);
-void LocalFreePtr(void *ptr);
-LPSTR GetInt(LPSTR str, LPINT pval);
-LPSTR GetLInt(LPSTR str, long int *pval);
+extern void * LocalAllocPtr(UINT flags, UINT size);
+extern void LocalFreePtr(void *ptr);
+extern LPSTR GetInt(LPSTR str, LPINT pval);
+extern LPSTR GetLInt(LPSTR str, long int *pval);
/* wtext.c */
-int CtrlCHit(LPTW lptw);
-void UpdateText(LPTW, int);
-void NewLine(LPTW);
-void TextPutStr(LPTW lptw, LPSTR str);
-void WriteTextIni(LPTW lptw);
-void ReadTextIni(LPTW lptw);
-void DragFunc(LPTW lptw, HDROP hdrop);
+extern void TextSelectFont (LPTW lptw);
+extern void TextCopyClip (LPTW lptw);
+extern int CtrlCHit(LPTW lptw);
+extern void UpdateText(LPTW, int);
+extern void NewLine(LPTW);
+extern void TextPutStr(LPTW lptw, LPSTR str);
+extern void WriteTextIni(LPTW lptw);
+extern void ReadTextIni(LPTW lptw);
+extern void DragFunc(LPTW lptw, HDROP hdrop);
extern int C2F(sxevents)();
/* wmenu.c - Menu */
int getleft;
} GFILE;
-void SendMacro(LPTW lptw, UINT m);
-void LoadMacros(LPTW lptw);
-void CloseMacros(LPTW lptw);
-void MenuFixCurrentWin(int ivalue);
-BOOL SciOpenSave(HWND hWndParent, BYTE **s, char **d,int *ierr);
-int GetLine(char * buffer, int len, GFILE *gfile);
-void LeftJustify(char *d, char *s);
+extern void SendMacro(LPTW lptw, UINT m);
+extern void LoadMacros(LPTW lptw);
+extern void CloseMacros(LPTW lptw);
+extern void MenuFixCurrentWin(int ivalue);
+extern BOOL SciOpenSave(HWND hWndParent, BYTE **s, char **d,int *ierr);
+extern int GetLine(char * buffer, int len, GFILE *gfile);
+extern void LeftJustify(char *d, char *s);
extern GFILE * Gfopen(LPSTR lpszFileName, int fnOpenMode);
extern void Gfclose(GFILE * gfile);
extern int Gfgets(LPSTR lp, int size, GFILE *gfile);
/* wprinter.c - Printer setup and dump */
-BOOL PrintSize(HDC printer, HWND hwnd, LPRECT lprect);
-void PrintRegister(LPPRINT lpr);
-void PrintUnregister(LPPRINT lpr);
+extern BOOL PrintSize(HDC printer, HWND hwnd, LPRECT lprect);
+extern void PrintRegister(LPPRINT lpr);
+extern void PrintUnregister(LPPRINT lpr);
-EXPORT BOOL CALLBACK PrintAbortProc(HDC hdcPrn, int code);
-EXPORT BOOL CALLBACK PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+extern EXPORT BOOL CALLBACK PrintAbortProc(HDC hdcPrn, int code);
+extern EXPORT BOOL CALLBACK PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* wstatbar.c */
extern int Pause(LPSTR mess);
extern void WinExit(void);
-EXPORT int CALLBACK ShutDown(void);
+extern EXPORT int CALLBACK ShutDown(void);
extern void Scistring(char *str);
extern int C2F(clearexit)(integer *n);
extern int ReadKey(void);
-int WriteStr(char *s, FILE *file);
-int WriteKey(char c, FILE *file);
+extern int WriteStr(char *s, FILE *file);
+extern int WriteKey(char c, FILE *file);
/* ../menusX */
/* readline-nowin */
extern void add_history_nw();
-char *readline_nw(char *prompt);
+extern char *readline_nw(char *prompt);
/* readline */
extern void add_history_win();
-char *readline_win(char *prompt);
+extern char *readline_win(char *prompt);
/* wgmenu */
extern int C2F(addmen)(integer *,char *,integer *,integer *,integer *,
integer *,
char *, integer *);
-void AddMenu(integer *win_num,char * button_name,char ** entries,
+extern void AddMenu(integer *win_num,char * button_name,char ** entries,
integer * ne,integer *typ,char * fname, integer * ierr);
/* gvwprn.c */
/* wtloop */
extern void sci_windows_main(int,int *,char *,int,int *,int);
-void SciMenuSelect(char *Name);
-void test_sci();
-void test_mouse();
-void C2F(setfbutn)(char *buf,int *rep);
-void C2F(fbutn)(char *buf,int *win,int *ent);
-void SignalCtrC(void);
+extern void SciMenuSelect(char *Name);
+extern void test_sci();
+extern void test_mouse();
+extern void C2F(setfbutn)(char *buf,int *rep);
+extern void C2F(fbutn)(char *buf,int *win,int *ent);
+extern void SignalCtrC(void);
/* wgnuplib */
extern void NoDll(HINSTANCE hInstance);
#endif
-
/** wgraph */
extern void DebugGW (char *fmt, ...);
-EXPORT void WINAPI GraphPrint(struct BCG *ScilabGC);
-EXPORT void WINAPI GraphRedraw(struct BCG *ScilabGC);
+extern EXPORT void WINAPI GraphPrint(struct BCG *ScilabGC);
+extern EXPORT void WINAPI GraphRedraw(struct BCG *ScilabGC);
extern int C2F(deletewin)(integer *number) ;
extern void NewCopyClip(struct BCG *ScilabGC);
extern void CopyClip(struct BCG *ScilabGC);
/* wmprint */
-int ScilabPsToEps(char orientation,char *filenamein,char *filenameout);
+extern int ScilabPsToEps(char orientation,char *filenamein,char *filenameout);
/* wmtex.c */
-int ScilabPsToTeX(char orientation,char *filenamein,char *filenameout,double xs,double ys);
+extern int ScilabPsToTeX(char orientation,char *filenamein,char *filenameout,double xs,double ys);
/* elsewhere in scilab : in Fortran code maybe */
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/* Scilab wgmenu.c
* Menus for graphic window ( from wmenu.c )
/* add handlers for delete action */
-void scig_deletegwin_handler_none (win)
- int win;
+void scig_deletegwin_handler_none (int win)
{
};
static But ClickBuf[MaxCB];
static int lastc = 0;
-int scig_click_handler_none (win, x, y, ibut, motion, release)
- int win, x, y, ibut, motion, release;
+int scig_click_handler_none (int win,int x,int y,int ibut,int motion,int release)
{
return 0;
};
break;
case SB_PAGEDOWN:
deltax = horzsi.nPos;
- horzsi.nPos = min (horzsi.nMax - horzsi.nPage, horzsi.nPos + 50);
+ horzsi.nPos = min (horzsi.nMax - (int)horzsi.nPage, horzsi.nPos + 50);
deltax = deltax - horzsi.nPos;
break;
case SB_LINEUP:
break;
case SB_LINEDOWN:
deltax = horzsi.nPos;
- horzsi.nPos = min (horzsi.nMax - horzsi.nPage, horzsi.nPos + 5);
+ horzsi.nPos = min (horzsi.nMax - (int) horzsi.nPage, horzsi.nPos + 5);
deltax = deltax - horzsi.nPos;
break;
case SB_THUMBTRACK:
break;
case SB_PAGEDOWN:
deltay = vertsi.nPos;
- vertsi.nPos = min (vertsi.nMax - vertsi.nPage, vertsi.nPos + 50);
+ vertsi.nPos = min (vertsi.nMax - (int) vertsi.nPage, vertsi.nPos + 50);
deltay = deltay - vertsi.nPos;
break;
case SB_LINEUP:
break;
case SB_LINEDOWN:
deltay = vertsi.nPos;
- vertsi.nPos = min (vertsi.nMax - vertsi.nPage, vertsi.nPos + 5);
+ vertsi.nPos = min (vertsi.nMax - (int) vertsi.nPage, vertsi.nPos + 5);
deltay = deltay - vertsi.nPos;
break;
case SB_THUMBTRACK:
#include <windowsx.h>
#include <commctrl.h>
-#ifdef __STDC__
-#include <stdlib.h>
-#else
-#include <malloc.h>
-#endif
-
#if (defined __MSC__ ) || (defined __MINGW32__)
#define putenv(x) _putenv(x)
#endif
static void AllGraphWinDelete ();
static int startupf = 0; /** 0 if we execute startup else 1 **/
static int nointeractive = 0;
+static int show_logo = 1;
#define MIN_STACKSIZE 180000
return nointeractive;
}
+int
+C2F(showlogo) ()
+{
+ return show_logo;
+}
+
+
+
int
MyPutCh (int ch)
{
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/************************************************************************
* wmhelp
* help menu for scilab
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#ifndef __STDC__
-#include <malloc.h>
-#endif
#include <stdio.h>
-
#include "../machine.h"
+#include "common.h"
+
+
static int Sed __PARAMS ((int, char *, FILE *, char *, char *, char *, char *, char *, char *));
static void readOneLine __PARAMS ((char *buff, int *stop, FILE * fd));
static void FileNameChange __PARAMS ((char *filein, char *fileout, char *, char *));
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/*********************************************
* STATBAR.C -- Status bar helper functions.
* (c) Paul Yao, 1996
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
#ifndef TEST
#include "wresource.h"
#include "wcommon.h"
#include "../sun/h_help.h"
+#include "../sun/Sun.h"
+#include "../stack-c.h"
extern char input_line[];
-
-/* Copyright (C) 1998 Chancelier Jean-Philippe */
+/* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
/************************************
* reading functions for scilab
* Scilab 1997
else if (*pause > 0)
sprintf (save_prompt, "-%d->", *pause);
else
- sprintf (save_prompt, ">>", *pause);
+ sprintf (save_prompt, ">>");
}