Set svn:eol-style to native
Pierre Marechal [Thu, 15 Nov 2007 08:35:07 +0000 (08:35 +0000)]
14 files changed:
scilab/modules/gui/src/c/LibScilab_Import.def
scilab/modules/gui/src/c/gui_header.def
scilab/modules/output_stream/includes/errmds.h
scilab/modules/output_stream/includes/error.h
scilab/modules/output_stream/includes/sciprint_full.h
scilab/modules/output_stream/src/c/Console_Import.def
scilab/modules/output_stream/src/c/errmds.c
scilab/modules/output_stream/src/c/error.c
scilab/modules/output_stream/src/c/error_internal.c
scilab/modules/output_stream/src/c/error_internal.h
scilab/modules/output_stream/src/c/sciprint_full.c
scilab/modules/shell/help/en_US/prompt.xml
scilab/modules/shell/sci_gateway/c/sci_prompt.c
scilab/modules/tclsci/Gui_Import.def

index 69b1256..e44b1bf 100644 (file)
@@ -1,21 +1,21 @@
-LIBRARY    LibScilab.dll\r
-\r
-\r
-EXPORTS\r
-com_\r
-checklhs_\r
-checkrhs_\r
-IsAScalar\r
-createvar_\r
-createvarfromptr_\r
-putlhsvar_\r
-stack_\r
-getrhsvar_\r
-gettype_\r
-intersci_\r
-vstk_\r
-getScilabMode\r
-callFunctionFromGateway\r
-SetFunction\r
-;\r
-\r
+LIBRARY    LibScilab.dll
+
+
+EXPORTS
+com_
+checklhs_
+checkrhs_
+IsAScalar
+createvar_
+createvarfromptr_
+putlhsvar_
+stack_
+getrhsvar_
+gettype_
+intersci_
+vstk_
+getScilabMode
+callFunctionFromGateway
+SetFunction
+;
+
index 1604b53..7acb0aa 100644 (file)
@@ -1,7 +1,7 @@
-LIBRARY    scigui.dll\r
-\r
-\r
-EXPORTS\r
-; --------------------------------------- \r
-; gui\r
-; --------------------------------------- \r
+LIBRARY    scigui.dll
+
+
+EXPORTS
+; --------------------------------------- 
+; gui
+; --------------------------------------- 
index 0ffc3ac..860218c 100644 (file)
@@ -1,22 +1,22 @@
-/*-----------------------------------------------------------------------------------*/\r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/\r
-#ifndef __ERRMDS_H__\r
-#define __ERRMDS_H__\r
-\r
-#include "machine.h"\r
-\r
-/* routine used by fortran */\r
-\r
-/**\r
-* this routine extract error modes out of errct variable\r
-* @param imess : if 0 error message is displayed\r
-* @param imode : error recovery mode\r
-* @param num  : error to catch, if num=-1 all errors are catched\r
-* @return 0\r
-*/\r
-int C2F(errmds)(integer *num, integer *imess, integer *imode);\r
-\r
-#endif /* __ERRMDS_H__ */\r
-/*-----------------------------------------------------------------------------------*/\r
+/*-----------------------------------------------------------------------------------*/
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/
+#ifndef __ERRMDS_H__
+#define __ERRMDS_H__
+
+#include "machine.h"
+
+/* routine used by fortran */
+
+/**
+* this routine extract error modes out of errct variable
+* @param imess : if 0 error message is displayed
+* @param imode : error recovery mode
+* @param num  : error to catch, if num=-1 all errors are catched
+* @return 0
+*/
+int C2F(errmds)(integer *num, integer *imess, integer *imode);
+
+#endif /* __ERRMDS_H__ */
+/*-----------------------------------------------------------------------------------*/
index 2f71709..6e5da9b 100644 (file)
@@ -1,29 +1,29 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#ifndef __ERROR_H__\r
-#define __ERROR_H__\r
-\r
-#include "machine.h" /* C2F */\r
-\r
-/* routine used by fortran */\r
-\r
-/**\r
-* error display and handling\r
-* @param[in]  n : error number \r
-* @return 0\r
-*/\r
-int C2F(error)(integer *n);\r
-\r
-\r
-/**\r
-* error display and handling\r
-* as Scierror uses default message associated to 'n'\r
-* @param n error code\r
-*/\r
-void SciError(int n);\r
-\r
-\r
-#endif /* __ERROR_H__ */\r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/ 
+#ifndef __ERROR_H__
+#define __ERROR_H__
+
+#include "machine.h" /* C2F */
+
+/* routine used by fortran */
+
+/**
+* error display and handling
+* @param[in]  n : error number 
+* @return 0
+*/
+int C2F(error)(integer *n);
+
+
+/**
+* error display and handling
+* as Scierror uses default message associated to 'n'
+* @param n error code
+*/
+void SciError(int n);
+
+
+#endif /* __ERROR_H__ */
+/*-----------------------------------------------------------------------------------*/ 
index 53ab841..749923f 100644 (file)
@@ -1,20 +1,20 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Francois VOGEL  sciprint_full function */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#ifndef __SCIPRINT_FULL_H__\r
-#define __SCIPRINT_FULL_H__\r
-\r
-#include <stdarg.h>\r
-\r
-/**\r
-* sciprint geared towards long strings (>MAXPRINTF) \r
-* the long string is splitted in elements of length \r
-* equal to the number of columns from lines()                   \r
-* @param fmt Format of the format string\r
-* @param ...\r
-*/\r
-void sciprint_full(char *fmt,...) ;\r
-\r
-#endif /* __SCIPRINT_FULL_H__ */\r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Francois VOGEL  sciprint_full function */
+/*-----------------------------------------------------------------------------------*/ 
+#ifndef __SCIPRINT_FULL_H__
+#define __SCIPRINT_FULL_H__
+
+#include <stdarg.h>
+
+/**
+* sciprint geared towards long strings (>MAXPRINTF) 
+* the long string is splitted in elements of length 
+* equal to the number of columns from lines()                   
+* @param fmt Format of the format string
+* @param ...
+*/
+void sciprint_full(char *fmt,...) ;
+
+#endif /* __SCIPRINT_FULL_H__ */
+/*-----------------------------------------------------------------------------------*/ 
index 45101f3..6241bb0 100644 (file)
@@ -1,6 +1,6 @@
-       LIBRARY    sciconsole.dll\r
-\r
-\r
-EXPORTS\r
-       ConsolePrintf\r
+       LIBRARY    sciconsole.dll
+
+
+EXPORTS
+       ConsolePrintf
        
\ No newline at end of file
index bbdb039..1da0a97 100644 (file)
@@ -1,26 +1,26 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#include "errmds.h"\r
-#include "stack-def.h"\r
-/*-----------------------------------------------------------------------------------*/ \r
-int C2F(errmds)(integer *num, integer *imess, integer *imode)\r
-{\r
-       *num = 0;\r
-\r
-       if (C2F(errgst).errct > 0) \r
-       {\r
-               *num = C2F(errgst).errct - C2F(errgst).errct / isizt * isizt;\r
-               *imode = C2F(errgst).errct / isizt;\r
-       } else if (C2F(errgst).errct < 0) \r
-       {\r
-               *num = -1;\r
-               *imode = -C2F(errgst).errct / isizt;\r
-       }\r
-       *imess = *imode / 8;\r
-       *imode -= *imess << 3;\r
-\r
-       return 0;\r
-} \r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/ 
+#include "errmds.h"
+#include "stack-def.h"
+/*-----------------------------------------------------------------------------------*/ 
+int C2F(errmds)(integer *num, integer *imess, integer *imode)
+{
+       *num = 0;
+
+       if (C2F(errgst).errct > 0) 
+       {
+               *num = C2F(errgst).errct - C2F(errgst).errct / isizt * isizt;
+               *imode = C2F(errgst).errct / isizt;
+       } else if (C2F(errgst).errct < 0) 
+       {
+               *num = -1;
+               *imode = -C2F(errgst).errct / isizt;
+       }
+       *imess = *imode / 8;
+       *imode -= *imess << 3;
+
+       return 0;
+} 
+/*-----------------------------------------------------------------------------------*/ 
index 3abcfc2..087ae52 100644 (file)
@@ -1,18 +1,18 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#include "error.h"\r
-#include "MALLOC.h" /* NULL*/\r
-#include "error_internal.h"\r
-/*-----------------------------------------------------------------------------------*/ \r
-int C2F(error)(integer *n)\r
-{\r
-       return error_internal(n,NULL,ERROR_FROM_FORTRAN);\r
-} \r
-/*-----------------------------------------------------------------------------------*/ \r
-void SciError(int n)\r
-{\r
-       C2F(error)(&n);\r
-}\r
-/*-----------------------------------------------------------------------------------*/\r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/ 
+#include "error.h"
+#include "MALLOC.h" /* NULL*/
+#include "error_internal.h"
+/*-----------------------------------------------------------------------------------*/ 
+int C2F(error)(integer *n)
+{
+       return error_internal(n,NULL,ERROR_FROM_FORTRAN);
+} 
+/*-----------------------------------------------------------------------------------*/ 
+void SciError(int n)
+{
+       C2F(error)(&n);
+}
+/*-----------------------------------------------------------------------------------*/
index 4fae21a..9e31bfd 100644 (file)
@@ -1,80 +1,80 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#include <string.h>\r
-#include "error_internal.h"\r
-#include "sciprint.h"\r
-#include "msgstore.h"\r
-#include "BOOL.h"\r
-#include "stack-def.h"\r
-#include "errmsg.h"\r
-#include "errmds.h"\r
-/*-----------------------------------------------------------------------------------*/ \r
-extern int C2F(errloc)(); /* fortran */\r
-extern int C2F(errmgr)(); /* fortran */\r
-/*-----------------------------------------------------------------------------------*/ \r
-int error_internal(integer *n,char *buffer,int mode)\r
-{\r
-       integer num = 0;\r
-       integer lct1 = 0;\r
-       integer imode = 0;\r
-       integer imess = 0;\r
-       integer errtyp = 0;\r
-\r
-       /* extract error modes out of errct variable */\r
-       C2F(errmds)(&num, &imess, &imode);\r
-\r
-       /* de-activate output control */\r
-       lct1 = C2F(iop).lct[0];\r
-       C2F(iop).lct[0] = 0;\r
-\r
-       /* errors are recoverable */\r
-       errtyp = 0;\r
-\r
-       if (C2F(errgst).err1 == 0) \r
-       {\r
-               BOOL trace = ! ((num < 0 || num == *n) && imess != 0);\r
-               /* locate the error in the current statement */\r
-               if (trace) \r
-               {\r
-                       C2F(errloc)(n);\r
-               }\r
-               else\r
-               {\r
-                       /* output error message */\r
-                       C2F(iop).lct[0] = -1;\r
-               }\r
-\r
-               if (mode == ERROR_FROM_FORTRAN)\r
-               {\r
-                       C2F(errmsg)(n, &errtyp);\r
-               }\r
-               else /* ERROR_FROM_C */\r
-               {\r
-                       int len = (integer)strlen(buffer);\r
-\r
-                       /* free message table */\r
-                       C2F(freemsgtable)();\r
-\r
-                       /* store error number */\r
-                       C2F(errstore)(n);\r
-\r
-                       /* store message */\r
-                       C2F(msgstore)(buffer,&len);\r
-\r
-                       /* display error */\r
-                       if (C2F(iop).lct[0] != -1) sciprint(buffer);\r
-               }\r
-               C2F(iop).lct[0] = 0;\r
-       }\r
-\r
-       /* handle the error */\r
-       C2F(errmgr)(n, &errtyp);\r
-\r
-       /* re-activate output control */\r
-       C2F(iop).lct[0] = lct1;\r
-\r
-       return 0;\r
-}\r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/ 
+#include <string.h>
+#include "error_internal.h"
+#include "sciprint.h"
+#include "msgstore.h"
+#include "BOOL.h"
+#include "stack-def.h"
+#include "errmsg.h"
+#include "errmds.h"
+/*-----------------------------------------------------------------------------------*/ 
+extern int C2F(errloc)(); /* fortran */
+extern int C2F(errmgr)(); /* fortran */
+/*-----------------------------------------------------------------------------------*/ 
+int error_internal(integer *n,char *buffer,int mode)
+{
+       integer num = 0;
+       integer lct1 = 0;
+       integer imode = 0;
+       integer imess = 0;
+       integer errtyp = 0;
+
+       /* extract error modes out of errct variable */
+       C2F(errmds)(&num, &imess, &imode);
+
+       /* de-activate output control */
+       lct1 = C2F(iop).lct[0];
+       C2F(iop).lct[0] = 0;
+
+       /* errors are recoverable */
+       errtyp = 0;
+
+       if (C2F(errgst).err1 == 0) 
+       {
+               BOOL trace = ! ((num < 0 || num == *n) && imess != 0);
+               /* locate the error in the current statement */
+               if (trace) 
+               {
+                       C2F(errloc)(n);
+               }
+               else
+               {
+                       /* output error message */
+                       C2F(iop).lct[0] = -1;
+               }
+
+               if (mode == ERROR_FROM_FORTRAN)
+               {
+                       C2F(errmsg)(n, &errtyp);
+               }
+               else /* ERROR_FROM_C */
+               {
+                       int len = (integer)strlen(buffer);
+
+                       /* free message table */
+                       C2F(freemsgtable)();
+
+                       /* store error number */
+                       C2F(errstore)(n);
+
+                       /* store message */
+                       C2F(msgstore)(buffer,&len);
+
+                       /* display error */
+                       if (C2F(iop).lct[0] != -1) sciprint(buffer);
+               }
+               C2F(iop).lct[0] = 0;
+       }
+
+       /* handle the error */
+       C2F(errmgr)(n, &errtyp);
+
+       /* re-activate output control */
+       C2F(iop).lct[0] = lct1;
+
+       return 0;
+}
+/*-----------------------------------------------------------------------------------*/ 
index 6d78adb..44b3ce9 100644 (file)
@@ -1,23 +1,23 @@
-/*-----------------------------------------------------------------------------------*/ \r
-/* INRIA 2007 */\r
-/* Allan CORNET */\r
-/*-----------------------------------------------------------------------------------*/ \r
-#ifndef __ERROR_INTERNAL_H__\r
-#define __ERROR_INTERNAL_H__\r
-\r
-#define ERROR_FROM_FORTRAN 0\r
-#define ERROR_FROM_C 1\r
-\r
-#include "machine.h"\r
-\r
-/**\r
-* error_internal\r
-* @param [in] n : error code\r
-* @param [in] buffer : string error\r
-* @param [in] mode : ERROR_FROM_FORTRAN (not use buffer) or ERROR_FROM_C\r
-* @return 0\r
-*/\r
-int error_internal(integer *n,char *buffer,int mode);\r
-\r
-#endif /* __ERROR_INTERNAL_H__ */\r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/ 
+/* INRIA 2007 */
+/* Allan CORNET */
+/*-----------------------------------------------------------------------------------*/ 
+#ifndef __ERROR_INTERNAL_H__
+#define __ERROR_INTERNAL_H__
+
+#define ERROR_FROM_FORTRAN 0
+#define ERROR_FROM_C 1
+
+#include "machine.h"
+
+/**
+* error_internal
+* @param [in] n : error code
+* @param [in] buffer : string error
+* @param [in] mode : ERROR_FROM_FORTRAN (not use buffer) or ERROR_FROM_C
+* @return 0
+*/
+int error_internal(integer *n,char *buffer,int mode);
+
+#endif /* __ERROR_INTERNAL_H__ */
+/*-----------------------------------------------------------------------------------*/ 
index fdf08f1..73c9e73 100644 (file)
-/*-----------------------------------------------------------------------------------*/\r
-/* Francois VOGEL  sciprint_full function */\r
-/*-----------------------------------------------------------------------------------*/\r
-/* sciprint geared towards long strings (>MAXPRINTF) */\r
-/* the long string is splitted in elements of length equal to the number of columns  */\r
-/* from lines()                                                                      */\r
-/*-----------------------------------------------------------------------------------*/\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include "sciprint_full.h"\r
-#include "sciprint.h"\r
-#include "MALLOC.h"\r
-#include "localization.h"\r
-#include "../../shell/includes/scilines.h"\r
-/*-----------------------------------------------------------------------------------*/\r
-#ifdef _MSC_VER\r
-#define vsnprintf _vsnprintf\r
-#endif\r
-/*-----------------------------------------------------------------------------------*/\r
-/* MAXCHARSSCIPRINT_FULL is for sciprint_full - more than this gets truncated */\r
-#define MAXCHARSSCIPRINT_FULL 5000  \r
-/*-----------------------------------------------------------------------------------*/\r
-void sciprint_full(char *fmt,...) \r
-{\r
-       integer lstr;\r
-       va_list ap;\r
-       char *s_buf=NULL;\r
-       char *split_s_buf=NULL;\r
-       int count=0;\r
-       int p_s=0;\r
-       static integer colwidth;\r
-       char *MSG;\r
-\r
-       s_buf=MALLOC(sizeof(char)*(MAXCHARSSCIPRINT_FULL+1));\r
-       if (s_buf == (char *) 0)\r
-       {\r
-               sciprint(_("sciprint_full : No more memory.\n"));\r
-               return;\r
-       }\r
-\r
-       /* number of columns as set by command lines() */\r
-       colwidth = getLinesSize();\r
-       /* clamp to a minimum: value is arbitrary */\r
-       if (colwidth < 20) {colwidth=20;}\r
-       /* clamp to a maximum: value is selected so that each line fits in a single console line */\r
-       /* this is needed because computation of the lines() value in ON_WND_TEXT_WM_SIZE is not */\r
-       /* consistent with the limit before a carriage return occurs in TextPutStr - this latter */\r
-       /* limit uses lptw->ScreenSize, which is set to x=120,y=80 at init and apparently never  */\r
-       /* changed on window resizing                                                            */\r
-       if (colwidth > 109) {colwidth=109;}\r
-\r
-       split_s_buf=MALLOC(sizeof(char)*(colwidth+1));\r
-       if (split_s_buf == (char *) 0)\r
-       {\r
-               sciprint(_("sciprint_full : No more memory.\n"));\r
-               return;\r
-       }\r
-\r
-       va_start(ap,fmt);\r
-\r
-#if defined(linux) || defined(_MSC_VER)\r
-       count = vsnprintf (s_buf,MAXCHARSSCIPRINT_FULL-1, fmt, ap );\r
-       if (count == -1)\r
-       {\r
-               s_buf[MAXCHARSSCIPRINT_FULL-1]='\0';\r
-       }\r
-#else\r
-       (void )vsprintf(s_buf, fmt, ap );\r
-#endif\r
-\r
-       va_end(ap);\r
-\r
-       lstr=(integer)strlen(s_buf);\r
-\r
-       if (lstr<colwidth)\r
-       {\r
-               sciprint("%s",s_buf);\r
-       } \r
-       else \r
-       {\r
-               strncpy(split_s_buf,s_buf+p_s,colwidth-1);\r
-               split_s_buf[colwidth]='\0';\r
-               p_s=p_s+colwidth-1;\r
-               sciprint("%s",split_s_buf);\r
-               sciprint("\n");\r
-               while (p_s+colwidth-1<(int)lstr) \r
-               {\r
-                       strncpy(split_s_buf,s_buf+p_s,colwidth-1);\r
-                       split_s_buf[colwidth]='\0';\r
-                       p_s=p_s+colwidth-1;\r
-                       MSG=_("  (cont'd) %s");\r
-                       if (MSG)\r
-                       {\r
-                               sciprint(MSG,split_s_buf);\r
-                               sciprint("\n");\r
-                       }\r
-                       if (MSG) {FREE(MSG);MSG=NULL;}\r
-               }\r
-               strncpy(split_s_buf,s_buf+p_s,lstr-p_s);\r
-               split_s_buf[lstr-p_s]='\0';\r
-               MSG=_("     (end) %s");\r
-               if (MSG)\r
-               {\r
-                       sciprint(MSG,split_s_buf);\r
-                       sciprint("\n");\r
-               }\r
-               if (MSG) {FREE(MSG);MSG=NULL;}\r
-       }\r
-\r
-       if (s_buf){FREE(s_buf);s_buf=NULL;}\r
-       if (split_s_buf){FREE(split_s_buf);split_s_buf=NULL;}\r
-\r
-}\r
-/*-----------------------------------------------------------------------------------*/ \r
+/*-----------------------------------------------------------------------------------*/
+/* Francois VOGEL  sciprint_full function */
+/*-----------------------------------------------------------------------------------*/
+/* sciprint geared towards long strings (>MAXPRINTF) */
+/* the long string is splitted in elements of length equal to the number of columns  */
+/* from lines()                                                                      */
+/*-----------------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "sciprint_full.h"
+#include "sciprint.h"
+#include "MALLOC.h"
+#include "localization.h"
+#include "../../shell/includes/scilines.h"
+/*-----------------------------------------------------------------------------------*/
+#ifdef _MSC_VER
+#define vsnprintf _vsnprintf
+#endif
+/*-----------------------------------------------------------------------------------*/
+/* MAXCHARSSCIPRINT_FULL is for sciprint_full - more than this gets truncated */
+#define MAXCHARSSCIPRINT_FULL 5000  
+/*-----------------------------------------------------------------------------------*/
+void sciprint_full(char *fmt,...) 
+{
+       integer lstr;
+       va_list ap;
+       char *s_buf=NULL;
+       char *split_s_buf=NULL;
+       int count=0;
+       int p_s=0;
+       static integer colwidth;
+       char *MSG;
+
+       s_buf=MALLOC(sizeof(char)*(MAXCHARSSCIPRINT_FULL+1));
+       if (s_buf == (char *) 0)
+       {
+               sciprint(_("sciprint_full : No more memory.\n"));
+               return;
+       }
+
+       /* number of columns as set by command lines() */
+       colwidth = getLinesSize();
+       /* clamp to a minimum: value is arbitrary */
+       if (colwidth < 20) {colwidth=20;}
+       /* clamp to a maximum: value is selected so that each line fits in a single console line */
+       /* this is needed because computation of the lines() value in ON_WND_TEXT_WM_SIZE is not */
+       /* consistent with the limit before a carriage return occurs in TextPutStr - this latter */
+       /* limit uses lptw->ScreenSize, which is set to x=120,y=80 at init and apparently never  */
+       /* changed on window resizing                                                            */
+       if (colwidth > 109) {colwidth=109;}
+
+       split_s_buf=MALLOC(sizeof(char)*(colwidth+1));
+       if (split_s_buf == (char *) 0)
+       {
+               sciprint(_("sciprint_full : No more memory.\n"));
+               return;
+       }
+
+       va_start(ap,fmt);
+
+#if defined(linux) || defined(_MSC_VER)
+       count = vsnprintf (s_buf,MAXCHARSSCIPRINT_FULL-1, fmt, ap );
+       if (count == -1)
+       {
+               s_buf[MAXCHARSSCIPRINT_FULL-1]='\0';
+       }
+#else
+       (void )vsprintf(s_buf, fmt, ap );
+#endif
+
+       va_end(ap);
+
+       lstr=(integer)strlen(s_buf);
+
+       if (lstr<colwidth)
+       {
+               sciprint("%s",s_buf);
+       } 
+       else 
+       {
+               strncpy(split_s_buf,s_buf+p_s,colwidth-1);
+               split_s_buf[colwidth]='\0';
+               p_s=p_s+colwidth-1;
+               sciprint("%s",split_s_buf);
+               sciprint("\n");
+               while (p_s+colwidth-1<(int)lstr) 
+               {
+                       strncpy(split_s_buf,s_buf+p_s,colwidth-1);
+                       split_s_buf[colwidth]='\0';
+                       p_s=p_s+colwidth-1;
+                       MSG=_("  (cont'd) %s");
+                       if (MSG)
+                       {
+                               sciprint(MSG,split_s_buf);
+                               sciprint("\n");
+                       }
+                       if (MSG) {FREE(MSG);MSG=NULL;}
+               }
+               strncpy(split_s_buf,s_buf+p_s,lstr-p_s);
+               split_s_buf[lstr-p_s]='\0';
+               MSG=_("     (end) %s");
+               if (MSG)
+               {
+                       sciprint(MSG,split_s_buf);
+                       sciprint("\n");
+               }
+               if (MSG) {FREE(MSG);MSG=NULL;}
+       }
+
+       if (s_buf){FREE(s_buf);s_buf=NULL;}
+       if (split_s_buf){FREE(split_s_buf);split_s_buf=NULL;}
+
+}
+/*-----------------------------------------------------------------------------------*/ 
index a0e3aa0..6b02cbb 100644 (file)
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>\r
-<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">\r
-<MAN>\r
-  <LANGUAGE>eng</LANGUAGE>\r
-  <TITLE>prompt</TITLE>\r
-  <TYPE>Scilab Function</TYPE>\r
-  <DATE>$LastChangedDate: 2007-05-13 12:13:33 +0200 (dim., 13 mai 2007) $</DATE>\r
-\r
-  <SHORT_DESCRIPTION name="prompt">get current prompt</SHORT_DESCRIPTION>\r
-\r
-  <CALLING_SEQUENCE>\r
-    <CALLING_SEQUENCE_ITEM>p=prompt()</CALLING_SEQUENCE_ITEM>\r
-  </CALLING_SEQUENCE>\r
-\r
-  <DESCRIPTION>\r
-    <P><VERB>prompt()</VERB> get current prompt.</P>\r
-  </DESCRIPTION>\r
-\r
-  <SEE_ALSO>\r
-    <SEE_ALSO_ITEM><LINK>pause</LINK></SEE_ALSO_ITEM>\r
-  </SEE_ALSO>\r
-\r
-  <AUTHORS>\r
-    <AUTHORS_ITEM>A.C.</AUTHORS_ITEM>\r
-  </AUTHORS>\r
-</MAN>\r
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
+<MAN>
+  <LANGUAGE>eng</LANGUAGE>
+  <TITLE>prompt</TITLE>
+  <TYPE>Scilab Function</TYPE>
+  <DATE>$LastChangedDate: 2007-05-13 12:13:33 +0200 (dim., 13 mai 2007) $</DATE>
+
+  <SHORT_DESCRIPTION name="prompt">get current prompt</SHORT_DESCRIPTION>
+
+  <CALLING_SEQUENCE>
+    <CALLING_SEQUENCE_ITEM>p=prompt()</CALLING_SEQUENCE_ITEM>
+  </CALLING_SEQUENCE>
+
+  <DESCRIPTION>
+    <P><VERB>prompt()</VERB> get current prompt.</P>
+  </DESCRIPTION>
+
+  <SEE_ALSO>
+    <SEE_ALSO_ITEM><LINK>pause</LINK></SEE_ALSO_ITEM>
+  </SEE_ALSO>
+
+  <AUTHORS>
+    <AUTHORS_ITEM>A.C.</AUTHORS_ITEM>
+  </AUTHORS>
+</MAN>
index 3955acd..573771c 100644 (file)
@@ -1,34 +1,34 @@
-/*-----------------------------------------------------------------------------------*/\r
-/* Copyright INRIA 2007                                                              */\r
-/* Author : Allan Cornet                                                             */\r
-/* desc : interface for prompt primitive                                             */\r
-/*-----------------------------------------------------------------------------------*/\r
-#include "gw_shell.h"\r
-#include "stack-c.h"\r
-#include "prompt.h"\r
-/*-----------------------------------------------------------------------------------*/\r
-#define PROMPT_SIZE_MAX 64\r
-/*-----------------------------------------------------------------------------------*/\r
-int C2F(sci_prompt) _PARAMS((char *fname,unsigned long fname_len))\r
-{\r
-       char currentPrompt[PROMPT_SIZE_MAX];\r
-       static int n1 = 0, m1 = 0;\r
-       int outIndex = 0 ;\r
-\r
-       CheckRhs(0,0);\r
-       CheckLhs(0,1);\r
-\r
-       GetCurrentPrompt(currentPrompt);\r
-\r
-       m1= (int)strlen(currentPrompt);\r
-       n1=1;\r
-\r
-       CreateVar( Rhs+1,STRING_DATATYPE,&m1,&n1,&outIndex);\r
-       strcpy(cstk(outIndex), currentPrompt);\r
-\r
-       LhsVar(1) = Rhs+1;\r
-       C2F(putlhsvar)();\r
-\r
-       return 0;\r
-}\r
-/*-----------------------------------------------------------------------------------*/\r
+/*-----------------------------------------------------------------------------------*/
+/* Copyright INRIA 2007                                                              */
+/* Author : Allan Cornet                                                             */
+/* desc : interface for prompt primitive                                             */
+/*-----------------------------------------------------------------------------------*/
+#include "gw_shell.h"
+#include "stack-c.h"
+#include "prompt.h"
+/*-----------------------------------------------------------------------------------*/
+#define PROMPT_SIZE_MAX 64
+/*-----------------------------------------------------------------------------------*/
+int C2F(sci_prompt) _PARAMS((char *fname,unsigned long fname_len))
+{
+       char currentPrompt[PROMPT_SIZE_MAX];
+       static int n1 = 0, m1 = 0;
+       int outIndex = 0 ;
+
+       CheckRhs(0,0);
+       CheckLhs(0,1);
+
+       GetCurrentPrompt(currentPrompt);
+
+       m1= (int)strlen(currentPrompt);
+       n1=1;
+
+       CreateVar( Rhs+1,STRING_DATATYPE,&m1,&n1,&outIndex);
+       strcpy(cstk(outIndex), currentPrompt);
+
+       LhsVar(1) = Rhs+1;
+       C2F(putlhsvar)();
+
+       return 0;
+}
+/*-----------------------------------------------------------------------------------*/
index ad4b119..ed8047f 100644 (file)
@@ -1,6 +1,6 @@
-LIBRARY    scigui.dll\r
-\r
-\r
-EXPORTS\r
-       GetScreenProperty\r
+LIBRARY    scigui.dll
+
+
+EXPORTS
+       GetScreenProperty
        
\ No newline at end of file