Only in : @fifolist.lsp@ Common subdirectories: ram:fifo383/bin and bin Common subdirectories: ram:fifo383/clib and clib Only in : config.cache Only in : config.log Only in : config.status Only in : const.txt Common subdirectories: ram:fifo383/fd and fd Only in : ffi.lsp Only in : fifo-383.diffs Only in : fifo-handler Only in : fifo-handler-383.s Only in : fifo-handler-debug Only in : fifo-handler-debug.o Only in : fifo-handler-well.c diff -c2 ram:fifo383/fifo-handler.c fifo-handler.c *** ram:fifo383/fifo-handler.c Thu Dec 19 21:23:38 1996 --- fifo-handler.c Thu Dec 19 21:40:12 1996 *************** *** 1,5 **** /* ! * FIFO-HANDLER.C V38.2 * * Provide an interface to the fifo.library --- 1,5 ---- /* ! * FIFO-HANDLER.C V38.4 * * Provide an interface to the fifo.library *************** *** 72,76 **** short Done; /* could be local, but DICE2.06 uses up a register */ ! const char verstring[] = "\0$VER: fifo-handler 38.3 (28.8.96)\r\n"; --- 72,76 ---- short Done; /* could be local, but DICE2.06 uses up a register */ ! const char verstring[] = "\0$VER: fifo-handler 38.4 (18.12.96)\r\n"; *************** *** 399,402 **** --- 399,403 ---- han->ff_Flags &= ~FHF_REOF; packet->dp_Res1 = 0; + han->ff_Flags |= FHF_STARTCOOK; /* restart after ctrl-\ */ break; } *************** *** 459,463 **** D(ebug("%ld chars available\n", n)); if (n < 0 /* || (n == 0 && (han->ff_Flags & FHF_REOF)--impossible)*/) { - han->ff_Flags &= ~FHF_REOF; packet->dp_Res1 = 0; break; --- 460,463 ---- *************** *** 808,813 **** packet->dp_Res1 = -1; /* do not return 0 */ packet->dp_Res2 = ERROR_ACTION_NOT_KNOWN; ! returnpacket(packet); /* or loose dp_Res1 */ packet = NULL; break; default: --- 808,844 ---- packet->dp_Res1 = -1; /* do not return 0 */ packet->dp_Res2 = ERROR_ACTION_NOT_KNOWN; ! returnpacket(packet); /* or loose dp_Res1 */ packet = NULL; + break; + /* Added for 38.4 */ + case ACTION_STACK: /* FHArg1,Line,Length Length */ + /* Support for aborting packets only! + * Complete FORCE/STACK/QUEUE/DROP would require a List of stored lines, + * allocating memory for them etc. And what to do with tee readers? + */ + packet->dp_Res2 = ERROR_ACTION_NOT_KNOWN; + /* Handle only special case "\n" */ + if ((packet->dp_Arg3 == 1) && (*(char *)packet->dp_Arg2 == '\n')) { + FHan *han = (FHan *)packet->dp_Arg1; + Message *msg; + packet->dp_Res1 = 1; + while ((msg = (Message *)RemHead((MaxList *)&han->ff_RdWait))) { + DosPacket *packet2; + packet->dp_Res2 = DOS_FALSE; /* accepted */ + packet2 = (DosPacket *)msg->mn_Node.ln_Name; + D(ebug("Returning queued type %ld\n", packet2->dp_Type)); + if (packet2->dp_Type == ACTION_READ) { + /* Play tricks so the STACK packet is returned first */ + returnpacket(packet); + *(char *)packet2->dp_Arg2 = '\n'; + packet2->dp_Res1 = 1; + packet = packet2; /* return this READ packet */ + break; + } else { + /* Enqueuing WAIT_TIMEOUT causes it to be returned */ + PutMsg(PktPort, msg); /* AddHead()? */ + } + } + } break; default: Only in ram:fifo383/: fifo-handler.c.orig Only in : fifo-handler.o Only in : fifo-handler.s Only in : fifo.o Only in : fifo383upd.lha Only in : fifobug.lha Only in : fifolist.c Only in : fifolist.lsp Only in : FILES Only in : FILES-bin Only in : FILES-src Only in : fnf-382.notes Only in : grr diff -c2 ram:fifo383/handler.h handler.h *** ram:fifo383/handler.h Thu Dec 19 21:23:42 1996 --- handler.h Wed Dec 18 18:56:44 1996 *************** *** 18,21 **** --- 18,22 ---- #include #include + #include #include Only in ram:fifo383/: handler.h.orig Only in : htag.o Common subdirectories: ram:fifo383/inline and inline Common subdirectories: ram:fifo383/inlinef and inlinef Common subdirectories: ram:fifo383/l and l Common subdirectories: ram:fifo383/lib and lib Only in : lib.o Common subdirectories: ram:fifo383/libraries and libraries Common subdirectories: ram:fifo383/libs and libs Only in : packets.fas Only in : packets.lib Only in : packets.lsp Common subdirectories: ram:fifo383/proto and proto Only in : RemCLI diff -c2 ram:fifo383/remcli.c remcli.c *** ram:fifo383/remcli.c Tue May 14 21:02:30 1996 --- remcli.c Thu Dec 19 22:35:25 1996 *************** *** 1,3 **** - /* * REMCLI.C --- 1,2 ---- *************** *** 24,27 **** --- 23,32 ---- #include #include + + #include + #include + extern struct ExecBase * SysBase; + extern struct DosLibrary * DOSBase; + #if defined(_DCC) /* at least the very old DICE 2.06 */ #include *************** *** 46,49 **** --- 51,59 ---- #endif + #define STRING(token) #token + #define STRINGIFY(token) STRING(token) + #define CONCAT3_(a,b,c) a##b##c + #define CONCAT3(a,b,c) CONCAT3_(a,b,c) + typedef unsigned char ubyte; typedef unsigned short uword; *************** *** 81,93 **** short Done = 0; struct NewWindow Nw = { 0, 0, 640, 200, -1, -1, ! CLOSEWINDOW|MENUPICK|GADGETUP|GADGETDOWN|NEWSIZE, ! WINDOWSIZING|WINDOWDRAG|WINDOWDEPTH|WINDOWCLOSE|SMART_REFRESH| ! NOCAREREFRESH|ACTIVATE, ! NULL, NULL, (ubyte *)"RemCLI", NULL, NULL, 32, 32, -1, -1, WBENCHSCREEN }; ! const char verstring[] = "\0$VER: RemCLI 38.1 (20.12.95)\r\n"; #define errline(s,len) write(2, s, len) --- 91,115 ---- short Done = 0; + #define MAXTITLENAME 32 + #define TITLEFMT CONCAT3("RemCLI %-.",STRINGIFY(MAXTITLENAME),"s") + char WTitle[MAXTITLENAME+8]; + + #ifdef COMPAT13 + #define MY_WFLG_REFRESH WFLG_SMART_REFRESH|WFLG_NOCAREREFRESH + #define MY_CONUNIT CONU_STANDARD + #else + #define MY_WFLG_REFRESH WFLG_SIMPLE_REFRESH + #define MY_CONUNIT CONU_CHARMAP + #endif + struct NewWindow Nw = { 0, 0, 640, 200, -1, -1, ! IDCMP_CLOSEWINDOW|IDCMP_NEWSIZE, /* |IDCMP_MENUPICK|IDCMP_GADGETUP|IDCMP_GADGETDOWN */ ! WFLG_SIZEGADGET|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|MY_WFLG_REFRESH| ! WFLG_ACTIVATE, ! NULL, NULL, (ubyte *)WTitle, NULL, NULL, 45, 32, -1, -1, WBENCHSCREEN }; ! const char verstring[] = "$VER: RemCLI 38.4 (1.12.96)\r\n"; #define errline(s,len) write(2, s, len) *************** *** 115,119 **** if (ac != 2) { ! errmsg("Demonstration Remote Shell through FIFO:\n"); errmsg("Instructions:\n"); errmsg(" 1> NewShell FIFO:name/rwkecs\n"); --- 137,141 ---- if (ac != 2) { ! errmsg("Remote Shell through FIFO: console\n"); errmsg("Instructions:\n"); errmsg(" 1> NewShell FIFO:name/rwkecs\n"); *************** *** 140,143 **** --- 162,166 ---- sprintf(FifoMast, "%s_m", FifoName); sprintf(FifoSlav, "%s_s", FifoName); + sprintf(WTitle,TITLEFMT,FifoName); IoSink = CreatePort(NULL, 0); *************** *** 190,194 **** Iocw.io_Data = (APTR)Win; Iocw.io_Length = sizeof(*Win); ! if (OpenDevice("console.device", 0, (IORequest *)&Iocw, 0)) { errmsg("can't open console!\n"); exit(1); --- 213,217 ---- Iocw.io_Data = (APTR)Win; Iocw.io_Length = sizeof(*Win); ! if (OpenDevice("console.device", MY_CONUNIT, (IORequest *)&Iocw, CONFLAG_DEFAULT)) { errmsg("can't open console!\n"); exit(1); *************** *** 223,231 **** while ((im = (IMess *)GetMsg(Win->UserPort))) { switch(im->Class) { ! case CLOSEWINDOW: Done = 2; mask = 0; break; ! case NEWSIZE: ConWriteStr("\017\233\164\233\165\233\166\233\167"); break; --- 246,254 ---- while ((im = (IMess *)GetMsg(Win->UserPort))) { switch(im->Class) { ! case IDCMP_CLOSEWINDOW: Done = 2; mask = 0; break; ! case IDCMP_NEWSIZE: ConWriteStr("\017\233\164\233\165\233\166\233\167"); break; *************** *** 328,332 **** CloseFifo(FifoR, FIFOF_EOF); if (FifoW) ! /* no FIFOF_EOF on CLOSEWINDOW to conform to documentation */ CloseFifo(FifoW, Done == 2 ? 0 : FIFOF_EOF); if (FifoBase) --- 351,355 ---- CloseFifo(FifoR, FIFOF_EOF); if (FifoW) ! /* no FIFOF_EOF on IDCMP_CLOSEWINDOW to conform to documentation */ CloseFifo(FifoW, Done == 2 ? 0 : FIFOF_EOF); if (FifoBase) Only in : remcli.o Only in : t.exp Only in : tag.o Only in : testfifo Only in : testfifo.o Only in : tests diff -c2 ram:fifo383/TODO TODO *** ram:fifo383/TODO Tue May 14 21:22:38 1996 --- TODO Thu Dec 19 21:51:52 1996 *************** *** 6,13 **** attempts to read instead of when buffer space is available. ! send EOF only once (at least for OS >= 2.0), like CON: does. This ! is what is documented. Currently, fifo.library will return EOF ! continuously. Another flag might have to be introduced to ! distinguish both cases. How to send EOF without closing a fifo? doc says a future flag to CloseFifo() will delete fifo on last close. --- 6,16 ---- attempts to read instead of when buffer space is available. ! the handler can send EOF once since 38.3. Do this with library ! functions also, as it is documented. Currently, fifo.library will ! return EOF continuously. Another flag might have to be introduced ! to distinguish both cases. How to send EOF without closing a ! fifo? Closing a fifo is no correct way of doing it, since a ! reader may get EOF for as long as no writer has reopened. Also, ! one might wish to send an EOF even with multiple writers. doc says a future flag to CloseFifo() will delete fifo on last close. *************** *** 18,23 **** and if Read/WriteFifo() then still work from hardware interrupts. - as \0 is misused in cooked mode, it cannot be processed normally. - cooked reader hangs until EOF with line longer than CB_SIZE. --- 21,24 ---- *************** *** 27,28 **** --- 28,32 ---- fifolist command to list current fifos (in both library and handler). + + use CONU_SNIPMAP for copy&paste in remcli.c? Found CONU_CHARMAP + to be twice slower than CONU_STANDARD in a simple List+scroll test. diff -c2 ram:fifo383/version.doc version.doc *** ram:fifo383/version.doc Thu Dec 19 21:23:26 1996 --- version.doc Thu Dec 19 21:57:56 1996 *************** *** 3,6 **** --- 3,11 ---- The next version shall be >=2.0 only and thus become smaller. + 38.4 + Added ACTION_STACK support, but only for aborting ACTION_READ + and ACTION_WAIT_CHAR packets! + RemCLI shows fifo name and may use CONU_CHARMAP. Measured + half speed of CONU_STANDARD in a simple List+scroll test. 38.3 *************** *** 11,18 **** processing is only started when ACTION_READ or ACTION_WAIT_CHAR really occur, so that pretyped input is not cooked should the ! application switch to raw mode before reading. 38.1 - Merged 37.4, 37.5 and 38.0. Enhanced and corrected numerous bugs in ACTION_SCREEN_MODE and ACTION_WAIT_CHAR. Added many --- 16,23 ---- processing is only started when ACTION_READ or ACTION_WAIT_CHAR really occur, so that pretyped input is not cooked should the ! application switch to raw mode before reading. The visual effect ! in RemCLI is that no input is seen until a reader is started. 38.1 Merged 37.4, 37.5 and 38.0. Enhanced and corrected numerous bugs in ACTION_SCREEN_MODE and ACTION_WAIT_CHAR. Added many *************** *** 31,35 **** 38.0 ! Work based on 37.4 Switched to GCC. Added support for ACTION_WAIT_CHAR (with timeout). This release was done by Hans Verkuil. Email: hans@wyst.hobby.nl. --- 36,40 ---- 38.0 ! Work based on 37.4. Switched to GCC. Added support for ACTION_WAIT_CHAR (with timeout). This release was done by Hans Verkuil. Email: hans@wyst.hobby.nl. Only in ram:fifo383/: version.doc.orig