Hi,

An updated patch is attached below. Internationalization support is
included but not tested. This patch applies to the original 1.83.1
sources. It in non-cumulative.

With this patch, you still need to hard code /dev/comx in config.h under
Win98.

Line drawing should be OK (no changes via patching) -- it's just a
~/.termcap or ~/.terminfo configuration that each user needs to work on.

--------------CUT HERE ------------------

diff -p -N -d -r -u2 orig/minicom-1.83.1/src/Makefile cygp/minicom-1.83.1/src/Makefile
--- orig/minicom-1.83.1/src/Makefile    Tue Apr 25 08:42:32 2000
+++ cygp/minicom-1.83.1/src/Makefile    Wed Mar  7 22:22:00 2001
@@ -23,5 +23,5 @@
 
 # Where to install things for Linux sites (FSSTND)
-BINDIR = /usr/bin
+BINDIR = /usr/local/bin
 LIBDIR = /etc
 DOCDIR = /usr/doc/minicom
@@ -61,9 +61,9 @@ PO    = po
 
 # Take these compilation flags for Linux with libncurses.
-FLAGS  = -Wall -D_POSIX -D_SYSV -D_SELECT -pipe # -I/usr/include/ncurses
-PROGS  = minicom runscript ascii-xfr
-LFLAGS = -s
-LIBS   = -lncurses #-lintl
-CC     = cc
+# FLAGS        = -g -Wall -D_POSIX -D_SYSV -D_SELECT -pipe # -I/usr/include/ncurses
+# PROGS        = minicom runscript ascii-xfr
+# LFLAGS       = -s
+# LIBS = -lncurses #-lintl
+# CC   = gcc
 
 # Take these compilation flags for FreeBSD.
@@ -112,4 +112,11 @@ CC = cc
 #CC    = gcc
 
+# Take these compilation flags for Cygwin 1.x.x
+FLAGS  = -g -Wall -D_POSIX -D_SYSV -D_SELECT -pipe -DDEBUG_ME
+PROGS  = minicom runscript ascii-xfr
+LFLAGS = 
+LIBS   = -ltermcap -lintl -lm
+CC     = gcc
+
 # ========== Everything below this line is not well-tested. ===========
 
@@ -207,5 +214,5 @@ all:                $(PROGS) $(PO)
 
 minicom:       $(MOBJS)
-               $(CC) $(LFLAGS) -o minicom $(MOBJS) $(LIBS)
+               $(CC) $(CFLAGS) -o minicom $(MOBJS) $(LIBS)
 
 po: dummy
@@ -213,11 +220,11 @@ po: dummy
 
 keyserv:       $(KOBJS)
-               $(CC) -o keyserv $(LFLAGS) $(KOBJS) $(LIBS)
+               $(CC) -o keyserv $(CFLAGS) $(KOBJS) $(LIBS)
 
 runscript:     $(SOBJS)
-               $(CC) -o runscript $(LFLAGS) $(SOBJS) $(LIBS)
+               $(CC) -o runscript $(CFLAGS) $(SOBJS) $(LIBS)
 
 ascii-xfr:     ascii-xfr.o
-               $(CC) -s -o ascii-xfr $(LFLAGS) ascii-xfr.o
+               $(CC) -s -o ascii-xfr $(CFLAGS) ascii-xfr.o
 
 script.o:      script.c
diff -p -N -d -r -u2 orig/minicom-1.83.1/src/config.h cygp/minicom-1.83.1/src/config.h
--- orig/minicom-1.83.1/src/config.h    Wed Mar 15 08:25:20 2000
+++ cygp/minicom-1.83.1/src/config.h    Wed Mar  7 22:22:00 2001
@@ -40,4 +40,16 @@
 #endif
 
+/* Operating system dependant parameters, per OS. A few samples are given. */
+#if defined(__CYGWIN__)
+#  define DFL_PORT "/dev/com1"         /* Which tty to use */
+#  define DEF_BAUD "57600"             /* Default baud rate */
+#  define CALLOUT  ""                  /* Gets run to get into dial out mode */
+#  define CALLIN   ""                  /* Gets run to get into dial in mode */
+#  undef  UUCPLOCK
+#  define UUCPLOCK "/var/lock"         /* FSSTND 1.2 */
+#  undef KERMIT
+#  define KERMIT "/usr/bin/kermit -l %l -b %b"
+#endif
+
 #if defined (_COHERENT)
 #  define DFL_PORT "/dev/modem"
diff -p -N -d -r -u2 orig/minicom-1.83.1/src/ipc.c cygp/minicom-1.83.1/src/ipc.c
--- orig/minicom-1.83.1/src/ipc.c       Sun Oct 25 10:04:26 1998
+++ cygp/minicom-1.83.1/src/ipc.c       Wed Mar  7 22:22:00 2001
@@ -255,5 +255,13 @@ int *buflen;
        n = 2;
   else if (select(i+1, &fds, NULL, NULL, &tv) > 0)
+#ifdef DEBUG_ME
+        {
+       int idebug;
+       idebug = select(i+1, &fds, NULL, NULL, &tv);
+#endif
        n = 1 * (FD_ISSET(fd1, &fds) > 0) + 2 * (FD_ISSET(fd2, &fds) > 0);
+#ifdef DEBUG_ME
+       }
+#endif
 
   /* If there is data put it in the buffer. */
diff -p -N -d -r -u2 orig/minicom-1.83.1/src/minicom.h 
cygp/minicom-1.83.1/src/minicom.h
--- orig/minicom-1.83.1/src/minicom.h   Fri Jan  7 10:52:02 2000
+++ cygp/minicom-1.83.1/src/minicom.h   Wed Mar  7 22:22:00 2001
@@ -45,4 +45,9 @@ EXTERN int COLS;
 #endif
 
+#ifdef __CYGWIN__
+EXTERN int LINES;
+EXTERN int COLS;
+#endif
+
 EXTERN char stdattr;   /* Standard attribute */
 
diff -p -N -d -r -u2 orig/minicom-1.83.1/src/po/Makefile 
cygp/minicom-1.83.1/src/po/Makefile
--- orig/minicom-1.83.1/src/po/Makefile Fri Feb 18 09:33:40 2000
+++ cygp/minicom-1.83.1/src/po/Makefile Wed Mar  7 22:22:00 2001
@@ -68,3 +68,3 @@ ja_JP.SJIS.po : ja.po ujis2sjis
 
 ujis2sjis : ujis2sjis.c
-       cc $< -o $@
+       $(CC) $< -o $@
diff -p -N -d -r -u2 orig/minicom-1.83.1/src/window.c cygp/minicom-1.83.1/src/window.c
--- orig/minicom-1.83.1/src/window.c    Thu Mar 16 01:44:24 2000
+++ cygp/minicom-1.83.1/src/window.c    Wed Mar  7 22:22:00 2001
@@ -332,5 +332,5 @@ int x, y;
  *                 1: write to both screen and memory
  */
-static void _write(c, doit, x, y,attr, color)
+static void _uwrite(c, doit, x, y,attr, color)
 int c, doit;
 int x, y;
@@ -551,25 +551,25 @@ int doclr;
   /* And draw the window */
   if (border) {
-       _write(border == BSINGLE ? S_UL : D_UL, w->direct, x1, y1,
+       _uwrite(border == BSINGLE ? S_UL : D_UL, w->direct, x1, y1,
                                        xattr, color);
        for(x = x1 + 1; x < x2; x++)
-               _write(border == BSINGLE ? S_HOR : D_HOR, w->direct, x, y1,
+               _uwrite(border == BSINGLE ? S_HOR : D_HOR, w->direct, x, y1,
                                        xattr, color);
-       _write(border == BSINGLE ? S_UR : D_UR, w->direct, x2, y1,
+       _uwrite(border == BSINGLE ? S_UR : D_UR, w->direct, x2, y1,
                                        xattr, color);
        for(y = y1 + 1; y < y2; y++) {
-               _write(border == BSINGLE ? S_VER : D_VER, w->direct, x1, y,
+               _uwrite(border == BSINGLE ? S_VER : D_VER, w->direct, x1, y,
                                        xattr, color);
                for(x = x1 + 1; x < x2; x++)
-                       _write(' ', w->direct, x, y, attr, color);
-               _write(border == BSINGLE ? S_VER : D_VER, w->direct, x2, y,
+                       _uwrite(' ', w->direct, x, y, attr, color);
+               _uwrite(border == BSINGLE ? S_VER : D_VER, w->direct, x2, y,
                                        xattr, color);
        }
-       _write(border == BSINGLE ? S_LL : D_LL, w->direct, x1, y2,
+       _uwrite(border == BSINGLE ? S_LL : D_LL, w->direct, x1, y2,
                                        xattr, color);
        for(x = x1 + 1; x < x2; x++)
-               _write(border == BSINGLE ? S_HOR : D_HOR, w->direct,
+               _uwrite(border == BSINGLE ? S_HOR : D_HOR, w->direct,
                                        x, y2, xattr, color);
-       _write(border == BSINGLE ? S_LR : D_LR, w->direct, x2, y2,
+       _uwrite(border == BSINGLE ? S_LR : D_LR, w->direct, x2, y2,
                                        xattr, color);
        if (w->direct) _gotoxy(x1 + 1, y1 + 1);
@@ -616,10 +616,10 @@ int replace;
                g = gmap + (y * stdwin->xs);
                for(x = 0 ; x < win->x1; x++) {
-                       _write(g->value, 1, x, y, g->attr, g->color);
+                       _uwrite(g->value, 1, x, y, g->attr, g->color);
                        g++;
                }
                /* to here */
                for(x = win->x1; x <= win->x2; x++) {
-                       _write(e->value, 1, x, y, e->attr, e->color);
+                       _uwrite(e->value, 1, x, y, e->attr, e->color);
                        e++;
                }
@@ -688,5 +688,5 @@ void wreturn()
   for(y = 0; y <LINES; y++) {
        for(x = 0; x < COLS; x++) {
-               _write(e->value, -1, x, y, e->attr, e->color);
+               _uwrite(e->value, -1, x, y, e->attr, e->color);
                e++;
        }
@@ -728,5 +728,5 @@ int newdirect;
   for(y = miny; y <= maxy; y++) {
        for(x = minx; x <= maxx; x++) {
-               _write(e->value, -1, x, y, e->attr, e->color);
+               _uwrite(e->value, -1, x, y, e->attr, e->color);
                e++;
        }
@@ -761,5 +761,5 @@ WIN *w;
   }
   for(x = w->curx + w->x1; x <= w->x2; x++) {
-       _write(' ', (w->direct && doit) ? 1 : 0, x, y, w->attr, w->color);
+       _uwrite(' ', (w->direct && doit) ? 1 : 0, x, y, w->attr, w->color);
   }
   return(doit);        
@@ -854,5 +854,5 @@ int dir;
   if (sflag && win->sy2 == (LINES - 1) && win->sy1 != win->sy2) {
        if (dir == S_UP) {
-               _write(oldc.value, 1, COLS - 1, LINES - 2,
+               _uwrite(oldc.value, 1, COLS - 1, LINES - 2,
                        oldc.attr, oldc.color);
        }
@@ -915,5 +915,5 @@ int dir;
                        e = gmap + y * COLS + win->x1;
                        for(x = win->x1; x <= win->x2; x++) {
-                          _write(e->value, win->direct && doit,
+                          _uwrite(e->value, win->direct && doit,
                                        x, y - 1, e->attr, e->color);
                           e++;
@@ -927,5 +927,5 @@ int dir;
                        e = gmap + y * COLS + win->x1;
                        for(x = win->x1; x <= win->x2; x++) {
-                          _write(e->value, win->direct && doit,
+                          _uwrite(e->value, win->direct && doit,
                                        x, y + 1, e->attr, e->color);
                           e++;
@@ -941,5 +941,5 @@ int dir;
 
   if (!doit) for(x = win->x1; x <= win->x2; x++)
-               _write(' ', 0, x, win->y1 + win->cury, win->attr, win->color);
+               _uwrite(' ', 0, x, win->y1 + win->cury, win->attr, win->color);
   if (!_intern && win->direct)
        _gotoxy(win->x1 + win->curx, win->y1 + win->cury);
@@ -1016,5 +1016,5 @@ int c;
                /* Now write the character. */
                if (c != '\n') {
-                       _write(c, win->direct, win->curx + win->x1,
+                       _uwrite(c, win->direct, win->curx + win->x1,
                                win->cury + win->y1, win->attr, win->color);
                        if (++win->curx >= win->xs && !win->wrap) {
@@ -1043,5 +1043,5 @@ ELM *e;
   for(x = w->x1; x <= w->x2; x++)
   {
-       _write(e->value, w->direct, x, y + w->y1, e->attr, e->color);
+       _uwrite(e->value, w->direct, x, y + w->y1, e->attr, e->color);
                /*y + w->y1, XA_NORMAL, e->color);*/
        e++;
@@ -1088,5 +1088,5 @@ ELM *e;
   /* first position */
   x = w->x1;
-  _write(e->value, w->direct, x, y + w->y1, XA_NORMAL, e->color);
+  _uwrite(e->value, w->direct, x, y + w->y1, XA_NORMAL, e->color);
 
   e++;
@@ -1095,5 +1095,5 @@ ELM *e;
   for(x = (w->x1+1); x <= (w->x2-1); x++)
   {
-       _write(e->value, w->direct, x, y + w->y1, XA_BOLD, WHITE);
+       _uwrite(e->value, w->direct, x, y + w->y1, XA_BOLD, WHITE);
        e++;
   }
@@ -1101,5 +1101,5 @@ ELM *e;
   /* last position */
   x = w->x2;
-  _write(e->value, w->direct, x, y + w->y1, XA_NORMAL, e->color);
+  _uwrite(e->value, w->direct, x, y + w->y1, XA_NORMAL, e->color);
 }
 
@@ -1187,8 +1187,8 @@ char *s;
   if (x < w->x1) x = w->x1;
 
-  if (x < w->x2) _write('[', w->direct, x++, w->y1 - 1, w->attr, w->color);
-  while(*s && x <= w->x2) _write(*s++, w->direct, x++, w->y1 - 1,
+  if (x < w->x2) _uwrite('[', w->direct, x++, w->y1 - 1, w->attr, w->color);
+  while(*s && x <= w->x2) _uwrite(*s++, w->direct, x++, w->y1 - 1,
                w->attr, w->color);
-  if (x <= w->x2) _write(']', w->direct, x++, w->y1 - 1, w->attr, w->color);
+  if (x <= w->x2) _uwrite(']', w->direct, x++, w->y1 - 1, w->attr, w->color);
 
   if (w->direct) {
@@ -1228,8 +1228,8 @@ int attr;
        else
                x = ' ';
-       _write(x, w->direct, w->x1, y, attr, e->color);
+       _uwrite(x, w->direct, w->x1, y, attr, e->color);
   } else {
        for(x = w->x1; x <= w->x2; x++) {
-               _write(e->value, w->direct, x, y, attr, e->color);
+               _uwrite(e->value, w->direct, x, y, attr, e->color);
                e++;
        }
@@ -1371,5 +1371,5 @@ WIN *w;
   n = w->x1 + w->curx;
   if( n > w->x2) n = w->x2;
-  for(x = w->x1; x <= n; x++) _write(' ', w->direct, x, y,
+  for(x = w->x1; x <= n; x++) _uwrite(' ', w->direct, x, y,
                w->attr, w->color);
   if (w->direct) {
@@ -1586,5 +1586,5 @@ int move;
   e = buf;
   for(++x; x <= w->x2; x++) {
-       _write(e->value, doit && w->direct, x, y, e->attr, e->color);
+       _uwrite(e->value, doit && w->direct, x, y, e->attr, e->color);
        e++;
   }
@@ -1626,8 +1626,8 @@ WIN *w;
   
   for(; x < w->x2; x++) {
-       _write(e->value, doit && w->direct, x, y, e->attr, e->color);
+       _uwrite(e->value, doit && w->direct, x, y, e->attr, e->color);
        e++;
   }
-  _write(' ', doit && w->direct, x, y, w->attr, w->color);
+  _uwrite(' ', doit && w->direct, x, y, w->attr, w->color);
   wlocate(w, w->curx, w->cury);
 }


------CUT HERE--------

Enoch Wu

Reply via email to