|
|
| version 1.12, 2025/03/24 04:05:36 | version 1.14, 2026/01/07 19:51:33 |
|---|---|
| Line 25 | Line 25 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.14 2026/01/07 19:51:33 snw | |
| * Fix segfault in reverse $QUERY | |
| * | |
| * Revision 1.13 2025/04/09 19:52:02 snw | |
| * Eliminate as many warnings as possible while building with -Wall | |
| * | |
| * Revision 1.12 2025/03/24 04:05:36 snw | * Revision 1.12 2025/03/24 04:05:36 snw |
| * Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 | * Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 |
| * | * |
| Line 65 | Line 71 |
| #define MAXZAS NESTLEVLS | #define MAXZAS NESTLEVLS |
| #include "mpsdef.h" | #include "mpsdef.h" |
| #include "shmmgr.h" | |
| #include <time.h> | #include <time.h> |
| Line 91 int scosgr (short att, short bwflag); | Line 98 int scosgr (short att, short bwflag); |
| # endif | # endif |
| # define termio termios | # define termio termios |
| # else | # else |
| # if !defined(MSDOS) | # if !defined(MSDOS) && !defined(__linux__) |
| # include <termio.h> | # include <termio.h> |
| # endif | # else |
| # if defined(__OS2__) | |
| # include <termios.h> | # include <termios.h> |
| # define termio termios | # define termio termios |
| # endif | # endif |
| Line 103 int scosgr (short att, short bwflag); | Line 109 int scosgr (short att, short bwflag); |
| # include <termios.h> | # include <termios.h> |
| #endif | #endif |
| #include <fcntl.h> | #include <fcntl.h> |
| /* search 'string' for occurence of 'pattrn' | /* search 'string' for occurence of 'pattrn' |
| Line 2761 void part_ref (struct vtstyp *scr, short | Line 2768 void part_ref (struct vtstyp *scr, short |
| short l; | short l; |
| short max; | short max; |
| unsigned char exa; | unsigned char exa; |
| #if !defined(LINUX) && defined(COLOR) | |
| unsigned char exc; | unsigned char exc; |
| #endif | |
| short i; | short i; |
| unsigned char *linea; | unsigned char *linea; |
| unsigned char *linex; | unsigned char *linex; |
| unsigned char *linec; | unsigned char *linec; |
| unsigned char ch; | unsigned char ch; |
| unsigned char tmp[1300]; | char tmp[1300]; /* was unsigned char tmp... (snw 4-9-2025) */ |
| /* build up alternate screen */ | /* build up alternate screen */ |
| /* reset SGR,TBM;white on black,go HOME; 25 Lines */ | /* reset SGR,TBM;white on black,go HOME; 25 Lines */ |
| Line 2837 void part_ref (struct vtstyp *scr, short | Line 2846 void part_ref (struct vtstyp *scr, short |
| } | } |
| exa = ~linea[0]; /* dummy value to trigger argument codes on 1st char */ | exa = ~linea[0]; /* dummy value to trigger argument codes on 1st char */ |
| #if !defined(LINUX) && defined(COLOR) | |
| exc = ~linec[0]; /* dummy value to trigger argument codes on 1st char */ | exc = ~linec[0]; /* dummy value to trigger argument codes on 1st char */ |
| #endif | |
| for (l = 0; l <= max; l++) { | for (l = 0; l <= max; l++) { |
| Line 3415 void read_m (char *stuff, long read_time | Line 3427 void read_m (char *stuff, long read_time |
| static char term_key[256] = {EOL, EOL}; | static char term_key[256] = {EOL, EOL}; |
| static short int escptr; | static short int escptr; |
| static short int single; | static short int single; |
| static short int timoflag; /* timeout flag */ | static short int timoflag; /* timeout flag */ |
| static long int timex; | |
| static short int timexms; | |
| static short int i; | static short int i; |
| static int ch; | static int ch; |
| Line 3439 void read_m (char *stuff, long read_time | Line 3449 void read_m (char *stuff, long read_time |
| stuff[0] = EOL; | stuff[0] = EOL; |
| if (length < 1) single = length = 1; | if (length < 1) single = length = 1; |
| timex = 0L; | |
| timexms = 0; | |
| if (io == HOME) opnfile[HOME] = stdin; | if (io == HOME) opnfile[HOME] = stdin; |
| if (io == HOME && !frm_filter) { | if (io == HOME && !frm_filter) { |
| Line 4338 int locking (int fd, int action, long co | Line 4345 int locking (int fd, int action, long co |
| struct flock lock; | struct flock lock; |
| /* skip locking if we own the TP semaphore */ | |
| if (shm_config->hdr->tp_owner == pid) { | |
| return 0; | |
| } | |
| lock.l_whence = 1; /* lock from current position */ | lock.l_whence = 1; /* lock from current position */ |
| lock.l_start = 0; | lock.l_start = 0; |
| lock.l_len = count; | lock.l_len = count; |