00001
00002
00003
00004
00005
00006
00007
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010 #ifndef STRICT
00011 #define STRICT
00012 #endif
00013 #include "wresource.h"
00014 #include "wcommon.h"
00015 #include "machine.h"
00016
00017 #include "Messages.h"
00018 #include "Warnings.h"
00019 #include "Errors.h"
00020 #include "xscion.h"
00021
00022 #ifdef WITH_TK
00023 extern void flushTKEvents ();
00024 extern int TclEventsLoop(void);
00025 static int BasicScilab = 0;
00026 #endif
00027
00028 extern int GetWITH_GUI(void);
00029
00030
00031
00032
00033 int C2F(checkevts)(int *i)
00034 {
00035
00036 #ifdef WITH_TK
00037 *i= Max(getINXscilab(),1);
00038 #else
00039 *i= getINXscilab();
00040 #endif
00041 return(0);
00042 }
00043
00044
00045
00046
00047
00048 extern TW textwin;
00049
00050 void TextMessage1 (int ctrlflag)
00051 {
00052 MSG msg;
00053 #ifdef WITH_TK
00054 flushTKEvents ();
00055 #endif
00056 while (PeekMessage (&msg, 0, 0, 0, PM_NOREMOVE))
00057 {
00058 #ifdef WITH_TK
00059
00060 if ( TclEventsLoop() ) continue ;
00061 #endif
00062 PeekMessage (&msg, 0, 0, 0, PM_REMOVE);
00063 TranslateMessage (&msg);
00064 DispatchMessage (&msg);
00065 }
00066 if (ctrlflag == 1)
00067 {
00068 CtrlCHit (&textwin);
00069 }
00070 }
00071
00072 int C2F (sxevents) ()
00073 {
00074 if ( GetWITH_GUI() )
00075 {
00076 #ifdef WITH_TK
00077 if (getINXscilab() == 1 || BasicScilab == 0 )
00078 #else
00079 if (getINXscilab() == 1 )
00080 #endif
00081 {
00082 TextMessage1 (1);
00083 }
00084 }
00085 return (0);
00086 }
00087
00088
00089
00090
00091
00092 static void strip_blank (source)
00093 char *source;
00094 {
00095 char *p;
00096 p = source;
00097
00098 while (*p != '\0')
00099 p++;
00100 while (p != source)
00101 {
00102 p--;
00103 if (*p != ' ')
00104 break;
00105 *p = '\0';
00106 }
00107 }
00108
00109