| version 1.11, 2016/03/31 05:27:34 |
version 1.12, 2020/10/07 23:53:25 |
|
|
| /* $OpenXM: OpenXM/src/k097/ox_k0.c,v 1.10 2015/10/10 11:29:46 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/ox_k0.c,v 1.11 2016/03/31 05:27:34 takayama Exp $ */ |
| #include <stdio.h> |
#include <stdio.h> |
| #include <sys/types.h> |
#include <sys/types.h> |
| #include <sys/socket.h> |
#include <sys/socket.h> |
|
|
| /* -lnsl -lsocket /usr/ucblib/libucb.a */ |
/* -lnsl -lsocket /usr/ucblib/libucb.a */ |
| #include "../kxx/ox_kan.h" |
#include "../kxx/ox_kan.h" |
| #include "../kxx/serversm.h" |
#include "../kxx/serversm.h" |
| |
#include "ox_k0.h" |
| |
#include "ki.h" |
| |
|
| |
|
| int OxCritical = 0; |
int OxCritical = 0; |
| int OxInterruptFlag = 0; |
int OxInterruptFlag = 0; |
| int PacketMonitor = 0; |
int PacketMonitor = 0; |
| Line 31 jmp_buf EnvOfChildServer; |
|
| Line 34 jmp_buf EnvOfChildServer; |
|
| int JmpMessage = 0; |
int JmpMessage = 0; |
| |
|
| static char *getSuffix(char *s); |
static char *getSuffix(char *s); |
| main(int argc, char *argv[]) { |
void main(int argc, char *argv[]) { |
| char *s; |
char *s; |
| |
|
| if (argc > 1) { |
if (argc > 1) { |
| Line 65 static char *getSuffix(char *s) { |
|
| Line 68 static char *getSuffix(char *s) { |
|
| } |
} |
| return(s); |
return(s); |
| } |
} |
| nullserver(int fdStreamIn,int fdStreamOut) { |
void nullserver(int fdStreamIn,int fdStreamOut) { |
| int mtag; |
int mtag; |
| int message = 1; |
int message = 1; |
| ox_stream ostreamIn; |
ox_stream ostreamIn; |
| Line 232 nullserver(int fdStreamIn,int fdStreamOut) { |
|
| Line 235 nullserver(int fdStreamIn,int fdStreamOut) { |
|
| } |
} |
| } |
} |
| |
|
| nullserverCommand(ox_stream ostreamIn,ox_stream ostreamOut) { |
int nullserverCommand(ox_stream ostreamIn,ox_stream ostreamOut) { |
| int id; |
int id; |
| int mtag; |
int mtag; |
| int n; |
int n; |
| Line 311 nullserverCommand(ox_stream ostreamIn,ox_stream ostrea |
|
| Line 314 nullserverCommand(ox_stream ostreamIn,ox_stream ostrea |
|
| } |
} |
| break; |
break; |
| case SM_popCMO: |
case SM_popCMO: |
| if (message) fprintf(stderr,"popCMO. Start to sending data.\n",n); |
if (message) fprintf(stderr,"popCMO. Start to sending data %d\n",n); |
| oxSendOXheader(ostreamOut,OX_DATA,SerialOX++); |
oxSendOXheader(ostreamOut,OX_DATA,SerialOX++); |
| n=Sm1_popCMO(ostreamOut,SerialCurrent); |
n=Sm1_popCMO(ostreamOut,SerialCurrent); |
| if (message) fprintf(stderr,"Done.\n"); |
if (message) fprintf(stderr,"Done.\n"); |
| break; |
break; |
| case SM_popString: |
case SM_popString: |
| if (message) fprintf(stderr,"popString. send data from the stack.\n",n); |
if (message) fprintf(stderr,"popString. send data from the stack %d\n",n); |
| oxSendOXheader(ostreamOut,OX_DATA,SerialOX++); |
oxSendOXheader(ostreamOut,OX_DATA,SerialOX++); |
| oxSendCmoString(ostreamOut,Sm1_popString()); |
oxSendCmoString(ostreamOut,Sm1_popString()); |
| if (message) fprintf(stderr,"Done.\n"); |
if (message) fprintf(stderr,"Done.\n"); |
| Line 340 nullserverCommand(ox_stream ostreamIn,ox_stream ostrea |
|
| Line 343 nullserverCommand(ox_stream ostreamIn,ox_stream ostrea |
|
| } |
} |
| |
|
| |
|
| nullserver_simplest(int fd) { |
int nullserver_simplest(int fd) { |
| int c; |
int c; |
| while(1) { |
while(1) { |
| c = readOneByte(fd); |
c = readOneByte(fd); |
| Line 383 extern int K00_verbose; |
|
| Line 386 extern int K00_verbose; |
|
| int Startupk2 = 1; |
int Startupk2 = 1; |
| |
|
| |
|
| K0_start() { |
void K0_start() { |
| extern int Saki; |
extern int Saki; |
| extern int Interactive; |
extern int Interactive; |
| int i; |
int i; |
|
|
| KSstop(); closing |
KSstop(); closing |
| */ |
*/ |
| |
|
| K0_executeStringByLocalParser() { |
int K0_executeStringByLocalParser() { |
| extern int Interactive; |
extern int Interactive; |
| char *s; |
char *s; |
| s = Sm1_popString(); |
s = Sm1_popString(); |