[BACK]Return to fep+NetBSD-OpenXM.diff CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / fep

Annotation of OpenXM_contrib2/fep/fep+NetBSD-OpenXM.diff, Revision 1.1

1.1     ! noro        1: diff -cr official+NetBSD/Makefile fep-cygwin/Makefile
        !             2: *** official+NetBSD/Makefile   Mon Sep  2 15:54:20 2002
        !             3: --- fep-cygwin/Makefile        Mon Sep  2 18:37:26 2002
        !             4: ***************
        !             5: *** 25,35 ****
        !             6:   #DEBUG       = -O
        !             7:
        !             8:   CFLAGS       += $(DEBUG) $(CONFIG)
        !             9: - .if exists(/usr/lib/libcompat.a)
        !            10: - LDFLAGS = -ltermcap -lcompat
        !            11: - .else
        !            12:   LDFLAGS = -ltermcap
        !            13: - .endif
        !            14:
        !            15:   all: $(TARGET)
        !            16:
        !            17: --- 25,31 ----
        !            18: diff -cr official+NetBSD/fep_alias.c fep-cygwin/fep_alias.c
        !            19: *** official+NetBSD/fep_alias.c        Mon Sep  2 15:54:20 2002
        !            20: --- fep-cygwin/fep_alias.c     Mon Sep  2 19:01:17 2002
        !            21: ***************
        !            22: *** 3,9 ****
        !            23:   #ifndef lint
        !            24:   static char rcsid[]=
        !            25:   "$Header: fep_alias.c,v 4.2 88/11/13 15:50:52 utashiro Exp $ (SRA)";
        !            26: ! #endif lint
        !            27:
        !            28:   #include <stdio.h>
        !            29:   #include <ctype.h>
        !            30: --- 3,9 ----
        !            31:   #ifndef lint
        !            32:   static char rcsid[]=
        !            33:   "$Header: fep_alias.c,v 4.2 88/11/13 15:50:52 utashiro Exp $ (SRA)";
        !            34: ! #endif /* lint */
        !            35:
        !            36:   #include <stdio.h>
        !            37:   #include <ctype.h>
        !            38: diff -cr official+NetBSD/fep_com.c fep-cygwin/fep_com.c
        !            39: *** official+NetBSD/fep_com.c  Mon Sep  2 15:54:20 2002
        !            40: --- fep-cygwin/fep_com.c       Mon Sep  2 19:01:25 2002
        !            41: ***************
        !            42: *** 3,15 ****
        !            43:   #ifndef lint
        !            44:   static char rcsid[]=
        !            45:   "$Header: fep_com.c,v 4.9 91/05/29 14:30:43 utashiro Exp $ (SRA)";
        !            46: ! #endif lint
        !            47:
        !            48:   #include <stdio.h>
        !            49:   #include <sys/ioctl.h>
        !            50:   #ifdef TERMIOS
        !            51:   #include <termios.h>
        !            52: ! #ifdef __linux__
        !            53:   #ifndef _POSIX_VDISABLE
        !            54:   #define _POSIX_VDISABLE '\0'
        !            55:   #endif
        !            56: --- 3,15 ----
        !            57:   #ifndef lint
        !            58:   static char rcsid[]=
        !            59:   "$Header: fep_com.c,v 4.9 91/05/29 14:30:43 utashiro Exp $ (SRA)";
        !            60: ! #endif /* lint */
        !            61:
        !            62:   #include <stdio.h>
        !            63:   #include <sys/ioctl.h>
        !            64:   #ifdef TERMIOS
        !            65:   #include <termios.h>
        !            66: ! #if defined(__linux__) || defined(__CYGWIN__)
        !            67:   #ifndef _POSIX_VDISABLE
        !            68:   #define _POSIX_VDISABLE '\0'
        !            69:   #endif
        !            70: diff -cr official+NetBSD/fep_defs.h fep-cygwin/fep_defs.h
        !            71: *** official+NetBSD/fep_defs.h Mon Sep  2 15:54:20 2002
        !            72: --- fep-cygwin/fep_defs.h      Mon Sep  2 19:04:53 2002
        !            73: ***************
        !            74: *** 3,9 ****
        !            75:   #ifndef lint
        !            76:   # define FEP_DEFS \
        !            77:       "$Header: /home/mmb/utashiro/src/fep/RCS/fep_defs.h,v 4.3 1989/01/06 10:07:29 utashiro Exp $ (SRA)"
        !            78: ! #endif lint
        !            79:
        !            80:   #define      MAXCMDLEN               512     /* maximum command length */
        !            81:   #define MAXARGS                      64      /* maximum number of arguments */
        !            82: --- 3,9 ----
        !            83:   #ifndef lint
        !            84:   # define FEP_DEFS \
        !            85:       "$Header: /home/mmb/utashiro/src/fep/RCS/fep_defs.h,v 4.3 1989/01/06 10:07:29 utashiro Exp $ (SRA)"
        !            86: ! #endif /* lint */
        !            87:
        !            88:   #define      MAXCMDLEN               512     /* maximum command length */
        !            89:   #define MAXARGS                      64      /* maximum number of arguments */
        !            90: ***************
        !            91: *** 31,51 ****
        !            92:   # define isctlchar(c)        (c && !iskanji(c) && (!(c&0140) || c=='\177'))
        !            93:   # define iswordchar(c)       (c && (iskanji(c) || isalnum(c) || iscntrl(c)))
        !            94:   # define isWordchar(c)       ((c) && !isspace((c)))
        !            95: ! #else KANJI
        !            96:   # define isctlchar(c)        (c && (!(c&0140) || c=='\177'))
        !            97:   # define iswordchar(c)       (isalnum(c) || iscntrl(c))
        !            98:   # define isWordchar(c)       ((c) && !isspace((c)))
        !            99: ! #endif KANJI
        !           100:   #define unctl(c)     (((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
        !           101:   #define toctrl(c)    ((c)&~0100)
        !           102:   #define ctrl(c)              ((c)&037)
        !           103:
        !           104:   #define      INDIRECTED      (1<<(sizeof(char*)*8-1))
        !           105:                        /* this is actually 0x80000000 on 32 bit machine,
        !           106:                        that addresses kernel address space */
        !           107:   #define isIndirect(f)        ((u_int)(f)&(u_int)INDIRECTED)
        !           108:   #define setIndirect(f)       (FUNC)((u_int)(f)|(u_int)INDIRECTED)
        !           109:   #define      maskIndirect(f) (FUNC *)((u_int)(f)&~(u_int)INDIRECTED)
        !           110:
        !           111:   /*
        !           112:    * Type of character
        !           113: --- 31,58 ----
        !           114:   # define isctlchar(c)        (c && !iskanji(c) && (!(c&0140) || c=='\177'))
        !           115:   # define iswordchar(c)       (c && (iskanji(c) || isalnum(c) || iscntrl(c)))
        !           116:   # define isWordchar(c)       ((c) && !isspace((c)))
        !           117: ! #else /* KANJI */
        !           118:   # define isctlchar(c)        (c && (!(c&0140) || c=='\177'))
        !           119:   # define iswordchar(c)       (isalnum(c) || iscntrl(c))
        !           120:   # define isWordchar(c)       ((c) && !isspace((c)))
        !           121: ! #endif /* KANJI */
        !           122:   #define unctl(c)     (((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
        !           123:   #define toctrl(c)    ((c)&~0100)
        !           124:   #define ctrl(c)              ((c)&037)
        !           125:
        !           126: + #if defined(__alpha)
        !           127: + #define INDIRECTED      (((u_long)1)<<63)
        !           128: + #define isIndirect(f)   ((u_long)(f)&(u_long)INDIRECTED)
        !           129: + #define setIndirect(f)  (FUNC)((u_long)(f)|(u_long)INDIRECTED)
        !           130: + #define maskIndirect(f) (FUNC *)((u_long)(f)&~(u_long)INDIRECTED)
        !           131: + #else
        !           132:   #define      INDIRECTED      (1<<(sizeof(char*)*8-1))
        !           133:                        /* this is actually 0x80000000 on 32 bit machine,
        !           134:                        that addresses kernel address space */
        !           135:   #define isIndirect(f)        ((u_int)(f)&(u_int)INDIRECTED)
        !           136:   #define setIndirect(f)       (FUNC)((u_int)(f)|(u_int)INDIRECTED)
        !           137:   #define      maskIndirect(f) (FUNC *)((u_int)(f)&~(u_int)INDIRECTED)
        !           138: + #endif
        !           139:
        !           140:   /*
        !           141:    * Type of character
        !           142: ***************
        !           143: *** 53,69 ****
        !           144:   #ifdef KANJI
        !           145:   # define CHAR                unsigned char
        !           146:   # define CHARMASK    0377
        !           147: ! #else KANJI
        !           148:   # define CHAR                char
        !           149:   # define CHARMASK    0177
        !           150: ! #endif KANJI
        !           151:
        !           152:   /*
        !           153:    * Only one machine I know alloca() works is vax.
        !           154:    */
        !           155:   #ifdef vax
        !           156:   # define ALLOCA
        !           157: ! #endif vax
        !           158:
        !           159:   /*
        !           160:    * Typedef's
        !           161: --- 60,76 ----
        !           162:   #ifdef KANJI
        !           163:   # define CHAR                unsigned char
        !           164:   # define CHARMASK    0377
        !           165: ! #else /* KANJI */
        !           166:   # define CHAR                char
        !           167:   # define CHARMASK    0177
        !           168: ! #endif /* KANJI */
        !           169:
        !           170:   /*
        !           171:    * Only one machine I know alloca() works is vax.
        !           172:    */
        !           173:   #ifdef vax
        !           174:   # define ALLOCA
        !           175: ! #endif /* vax */
        !           176:
        !           177:   /*
        !           178:    * Typedef's
        !           179: diff -cr official+NetBSD/fep_edit.c fep-cygwin/fep_edit.c
        !           180: *** official+NetBSD/fep_edit.c Mon Sep  2 15:54:20 2002
        !           181: --- fep-cygwin/fep_edit.c      Mon Sep  2 19:07:54 2002
        !           182: ***************
        !           183: *** 3,9 ****
        !           184:   #ifndef lint
        !           185:   static char rcsid[]=
        !           186:   "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)";
        !           187: ! #endif lint
        !           188:
        !           189:   #include <stdio.h>
        !           190:   #include <sys/types.h>
        !           191: --- 3,9 ----
        !           192:   #ifndef lint
        !           193:   static char rcsid[]=
        !           194:   "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)";
        !           195: ! #endif /* lint */
        !           196:
        !           197:   #include <stdio.h>
        !           198:   #include <sys/types.h>
        !           199: ***************
        !           200: *** 11,17 ****
        !           201:   #include <sys/ioctl.h>
        !           202:   #ifdef TERMIOS
        !           203:   #include <termios.h>
        !           204: ! #ifdef __linux__
        !           205:   #ifndef _POSIX_VDISABLE
        !           206:   #define _POSIX_VDISABLE '\0'
        !           207:   #endif
        !           208: --- 11,17 ----
        !           209:   #include <sys/ioctl.h>
        !           210:   #ifdef TERMIOS
        !           211:   #include <termios.h>
        !           212: ! #if defined(__linux__) || defined(__CYGWIN__)
        !           213:   #ifndef _POSIX_VDISABLE
        !           214:   #define _POSIX_VDISABLE '\0'
        !           215:   #endif
        !           216: ***************
        !           217: *** 21,27 ****
        !           218: --- 21,32 ----
        !           219:   #endif
        !           220:   #include <sys/time.h>
        !           221:   #include <ctype.h>
        !           222: + #if defined(__CYGWIN__)
        !           223: + #include <sys/dirent.h>
        !           224: + #define direct dirent
        !           225: + #else
        !           226:   #include <sys/dir.h>
        !           227: + #endif
        !           228:   #include <sys/file.h>
        !           229:   #include <setjmp.h>
        !           230:   #include "fep_defs.h"
        !           231: ***************
        !           232: *** 207,213 ****
        !           233: --- 212,225 ----
        !           234:       import (cft, initial_ttymode.c_cc[VSTART], ignore);
        !           235:       import (cft, initial_ttymode.c_cc[VSTOP], ignore);
        !           236:       */
        !           237: + #if 0
        !           238:       import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush);
        !           239: + #else
        !           240: +      /* added by noro */
        !           241: +     import (cft, initial_ttymode.c_cc[VINTR], send_int_sig);
        !           242: +      /* XXX : this may not be necessary */
        !           243: +     import (aft, initial_ttymode.c_cc[VINTR], send_int_sig);
        !           244: + #endif
        !           245:       import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush);
        !           246:       /* Now, EOF will be sent on empty line.
        !           247:       import (cft, initial_ttymode.c_cc[VEOF], send_eof);
        !           248: ***************
        !           249: *** 230,236 ****
        !           250: --- 242,253 ----
        !           251:       import (cft, tchars_buf.t_startc, ignore);
        !           252:       import (cft, tchars_buf.t_stopc, ignore);
        !           253:       */
        !           254: + #if 0
        !           255:       import (cft, tchars_buf.t_intrc, insert_and_flush);
        !           256: + #else
        !           257: +     import (cft, tchars_buf.t_intrc, send_int_sig);
        !           258: +     import (aft, tchars_buf.t_intrc, send_int_sig);
        !           259: + #endif
        !           260:       import (cft, tchars_buf.t_quitc, insert_and_flush);
        !           261:       /* Now, EOF will be sent on empty line.
        !           262:       import (cft, tchars_buf.t_eofc, send_eof);
        !           263: ***************
        !           264: *** 461,467 ****
        !           265:       register int i, nbyte = 1, currentNull;
        !           266:   #ifdef KANJI
        !           267:       CHAR byte2;
        !           268: ! #endif KANJI
        !           269:
        !           270:       currentNull = strlen (CommandLine);
        !           271:
        !           272: --- 478,484 ----
        !           273:       register int i, nbyte = 1, currentNull;
        !           274:   #ifdef KANJI
        !           275:       CHAR byte2;
        !           276: ! #endif /* KANJI */
        !           277:
        !           278:       currentNull = strlen (CommandLine);
        !           279:
        !           280: ***************
        !           281: *** 480,486 ****
        !           282:        nbyte = 2;
        !           283:       }
        !           284:       else
        !           285: ! #endif KANJI
        !           286:        putChar (c);
        !           287:       reverse_strcpy (
        !           288:        &CommandLine[CurrentPosition] + nbyte,
        !           289: --- 497,503 ----
        !           290:        nbyte = 2;
        !           291:       }
        !           292:       else
        !           293: ! #endif /* KANJI */
        !           294:        putChar (c);
        !           295:       reverse_strcpy (
        !           296:        &CommandLine[CurrentPosition] + nbyte,
        !           297: ***************
        !           298: *** 492,498 ****
        !           299:       if (nbyte > 1) {
        !           300:        CommandLine[CurrentPosition - 1] = byte2;
        !           301:       }
        !           302: ! #endif KANJI
        !           303:       printS (&CommandLine [CurrentPosition]);
        !           304:
        !           305:       if (CommandLine[CurrentPosition] != '\0') {
        !           306: --- 509,515 ----
        !           307:       if (nbyte > 1) {
        !           308:        CommandLine[CurrentPosition - 1] = byte2;
        !           309:       }
        !           310: ! #endif /* KANJI */
        !           311:       printS (&CommandLine [CurrentPosition]);
        !           312:
        !           313:       if (CommandLine[CurrentPosition] != '\0') {
        !           314: ***************
        !           315: *** 596,602 ****
        !           316:   #ifdef KANJI
        !           317:            && !(CurrentPosition + 1 == position
        !           318:                    && iskanji (CommandLine[CurrentPosition]))
        !           319: ! #endif KANJI
        !           320:        )
        !           321:            (void) forward_n_character (1);
        !           322:   }
        !           323: --- 613,619 ----
        !           324:   #ifdef KANJI
        !           325:            && !(CurrentPosition + 1 == position
        !           326:                    && iskanji (CommandLine[CurrentPosition]))
        !           327: ! #endif /* KANJI */
        !           328:        )
        !           329:            (void) forward_n_character (1);
        !           330:   }
        !           331: ***************
        !           332: *** 620,629 ****
        !           333:   #ifdef KANJI
        !           334:   #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++;
        !           335:   #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--;
        !           336: ! #else KANJI
        !           337:   #define INC(i) i++
        !           338:   #define DEC(i) i--
        !           339: ! #endif KANJI
        !           340:
        !           341:   /*
        !           342:    * Move cursor to end of line
        !           343: --- 637,646 ----
        !           344:   #ifdef KANJI
        !           345:   #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++;
        !           346:   #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--;
        !           347: ! #else /* KANJI */
        !           348:   #define INC(i) i++
        !           349:   #define DEC(i) i--
        !           350: ! #endif /* KANJI */
        !           351:
        !           352:   /*
        !           353:    * Move cursor to end of line
        !           354: ***************
        !           355: *** 681,687 ****
        !           356:            i--;
        !           357:        }
        !           358:        else
        !           359: ! #endif KANJI
        !           360:        putchar (BS);
        !           361:        i--;
        !           362:       }
        !           363: --- 698,704 ----
        !           364:            i--;
        !           365:        }
        !           366:        else
        !           367: ! #endif /* KANJI */
        !           368:        putchar (BS);
        !           369:        i--;
        !           370:       }
        !           371: ***************
        !           372: *** 736,742 ****
        !           373:            nchars++;
        !           374:        }
        !           375:       }
        !           376: ! #else KANJI
        !           377:       while (n--) {
        !           378:        i--, nchars++;
        !           379:        while (i > 0 && !iswordchar (CommandLine [i])) {
        !           380: --- 753,759 ----
        !           381:            nchars++;
        !           382:        }
        !           383:       }
        !           384: ! #else /* KANJI */
        !           385:       while (n--) {
        !           386:        i--, nchars++;
        !           387:        while (i > 0 && !iswordchar (CommandLine [i])) {
        !           388: ***************
        !           389: *** 746,752 ****
        !           390:            i--, nchars++;
        !           391:        }
        !           392:       }
        !           393: ! #endif KANJI
        !           394:       return (backward_n_character (nchars));
        !           395:   }
        !           396:
        !           397: --- 763,769 ----
        !           398:            i--, nchars++;
        !           399:        }
        !           400:       }
        !           401: ! #endif /* KANJI */
        !           402:       return (backward_n_character (nchars));
        !           403:   }
        !           404:
        !           405: ***************
        !           406: *** 797,803 ****
        !           407:            nchars++;
        !           408:        }
        !           409:       }
        !           410: ! #else KANJI
        !           411:       while (n--) {
        !           412:        i--, nchars++;
        !           413:        while (i > 0 && !isWordchar (CommandLine [i]))
        !           414: --- 814,820 ----
        !           415:            nchars++;
        !           416:        }
        !           417:       }
        !           418: ! #else /* KANJI */
        !           419:       while (n--) {
        !           420:        i--, nchars++;
        !           421:        while (i > 0 && !isWordchar (CommandLine [i]))
        !           422: ***************
        !           423: *** 805,811 ****
        !           424:        while (i > 0 && isWordchar (CommandLine [i - 1]))
        !           425:            i--, nchars++;
        !           426:       }
        !           427: ! #endif KANJI
        !           428:       return (backward_n_character (nchars));
        !           429:   }
        !           430:
        !           431: --- 822,828 ----
        !           432:        while (i > 0 && isWordchar (CommandLine [i - 1]))
        !           433:            i--, nchars++;
        !           434:       }
        !           435: ! #endif /* KANJI */
        !           436:       return (backward_n_character (nchars));
        !           437:   }
        !           438:
        !           439: ***************
        !           440: *** 843,849 ****
        !           441:        (void) putchar (CommandLine[i++]);
        !           442:       }
        !           443:       else
        !           444: ! #endif KANJI
        !           445:       if (isctlchar(CommandLine[i])) {
        !           446:        (void) putchar (unctl (CommandLine [i]));
        !           447:        i++;
        !           448: --- 860,866 ----
        !           449:        (void) putchar (CommandLine[i++]);
        !           450:       }
        !           451:       else
        !           452: ! #endif /* KANJI */
        !           453:       if (isctlchar(CommandLine[i])) {
        !           454:        (void) putchar (unctl (CommandLine [i]));
        !           455:        i++;
        !           456: ***************
        !           457: *** 858,864 ****
        !           458:            (void) putchar (CommandLine[i++]);
        !           459:        }
        !           460:        else
        !           461: ! #endif KANJI
        !           462:        putChar (CommandLine [i++]);
        !           463:       }
        !           464:
        !           465: --- 875,881 ----
        !           466:            (void) putchar (CommandLine[i++]);
        !           467:        }
        !           468:        else
        !           469: ! #endif /* KANJI */
        !           470:        putChar (CommandLine [i++]);
        !           471:       }
        !           472:
        !           473: ***************
        !           474: *** 1039,1047 ****
        !           475:            i -= 2, nbyte += 2;
        !           476:        else
        !           477:            i -= 1, nbyte += 1;
        !           478: ! #else KANJI
        !           479:       nbyte = n;
        !           480: ! #endif KANJI
        !           481:
        !           482:       deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte);
        !           483:       restArea = howlong (&CommandLine[CurrentPosition], 0);
        !           484: --- 1056,1064 ----
        !           485:            i -= 2, nbyte += 2;
        !           486:        else
        !           487:            i -= 1, nbyte += 1;
        !           488: ! #else /* KANJI */
        !           489:       nbyte = n;
        !           490: ! #endif /* KANJI */
        !           491:
        !           492:       deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte);
        !           493:       restArea = howlong (&CommandLine[CurrentPosition], 0);
        !           494: ***************
        !           495: *** 1114,1120 ****
        !           496:            nchars++;
        !           497:        }
        !           498:       }
        !           499: ! #else KANJI
        !           500:       while (n--) {
        !           501:        i--, nchars++;
        !           502:        while (i > 0 && !iswordchar (CommandLine [i]))
        !           503: --- 1131,1137 ----
        !           504:            nchars++;
        !           505:        }
        !           506:       }
        !           507: ! #else /* KANJI */
        !           508:       while (n--) {
        !           509:        i--, nchars++;
        !           510:        while (i > 0 && !iswordchar (CommandLine [i]))
        !           511: ***************
        !           512: *** 1122,1128 ****
        !           513:        while (i > 0 && iswordchar (CommandLine [i - 1]))
        !           514:            i--, nchars++;
        !           515:       }
        !           516: ! #endif KANJI
        !           517:
        !           518:       return (delete_previous_n_character (nchars));
        !           519:   }
        !           520: --- 1139,1145 ----
        !           521:        while (i > 0 && iswordchar (CommandLine [i - 1]))
        !           522:            i--, nchars++;
        !           523:       }
        !           524: ! #endif /* KANJI */
        !           525:
        !           526:       return (delete_previous_n_character (nchars));
        !           527:   }
        !           528: ***************
        !           529: *** 1175,1181 ****
        !           530:            nchars++;
        !           531:        }
        !           532:       }
        !           533: ! #else KANJI
        !           534:       while (n--) {
        !           535:        i--, nchars++;
        !           536:        while (i > 0 && !isWordchar (CommandLine [i]))
        !           537: --- 1192,1198 ----
        !           538:            nchars++;
        !           539:        }
        !           540:       }
        !           541: ! #else /* KANJI */
        !           542:       while (n--) {
        !           543:        i--, nchars++;
        !           544:        while (i > 0 && !isWordchar (CommandLine [i]))
        !           545: ***************
        !           546: *** 1183,1189 ****
        !           547:        while (i > 0 && isWordchar (CommandLine [i - 1]))
        !           548:            i--, nchars++;
        !           549:       }
        !           550: ! #endif KANJI
        !           551:
        !           552:       return (delete_previous_n_character (nchars));
        !           553:   }
        !           554: --- 1200,1206 ----
        !           555:        while (i > 0 && isWordchar (CommandLine [i - 1]))
        !           556:            i--, nchars++;
        !           557:       }
        !           558: ! #endif /* KANJI */
        !           559:
        !           560:       return (delete_previous_n_character (nchars));
        !           561:   }
        !           562: ***************
        !           563: *** 1222,1230 ****
        !           564:            else
        !           565:                cp++, nbyte++;
        !           566:       }
        !           567: ! #else KANJI
        !           568:       nbyte = n;
        !           569: ! #endif KANJI
        !           570:
        !           571:       deleteArea = howlong (&CommandLine[CurrentPosition], nbyte);
        !           572:       restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0);
        !           573: --- 1239,1247 ----
        !           574:            else
        !           575:                cp++, nbyte++;
        !           576:       }
        !           577: ! #else /* KANJI */
        !           578:       nbyte = n;
        !           579: ! #endif /* KANJI */
        !           580:
        !           581:       deleteArea = howlong (&CommandLine[CurrentPosition], nbyte);
        !           582:       restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0);
        !           583: ***************
        !           584: *** 1781,1789 ****
        !           585:
        !           586:   # ifdef ALLOCA
        !           587:            fcp = (char *) alloca (strlen (dp->d_name) + 1);
        !           588: ! # else ALLOCA
        !           589:            fcp = (char *) malloc (strlen (dp->d_name) + 1);
        !           590: ! # endif ALLOCA
        !           591:            if (fcp == 0) {
        !           592:                fputs ("\r\n", stdout);
        !           593:                perror ("alloca:");
        !           594: --- 1798,1806 ----
        !           595:
        !           596:   # ifdef ALLOCA
        !           597:            fcp = (char *) alloca (strlen (dp->d_name) + 1);
        !           598: ! # else /* ALLOCA */
        !           599:            fcp = (char *) malloc (strlen (dp->d_name) + 1);
        !           600: ! # endif /* ALLOCA */
        !           601:            if (fcp == 0) {
        !           602:                fputs ("\r\n", stdout);
        !           603:                perror ("alloca:");
        !           604: ***************
        !           605: *** 1844,1850 ****
        !           606:   # ifndef ALLOCA
        !           607:       for (i = 0; fileList [i]; i++)
        !           608:        free (fileList [i]);
        !           609: ! # endif ALLOCA
        !           610:
        !           611:       closedir(dirp);
        !           612:       return (0);
        !           613: --- 1861,1867 ----
        !           614:   # ifndef ALLOCA
        !           615:       for (i = 0; fileList [i]; i++)
        !           616:        free (fileList [i]);
        !           617: ! # endif /* ALLOCA */
        !           618:
        !           619:       closedir(dirp);
        !           620:       return (0);
        !           621: ***************
        !           622: *** 1972,1980 ****
        !           623:        if (prefix (prefixstring, dp->d_name)) {
        !           624:   # ifdef ALLOCA
        !           625:            fcp = (char *) alloca (strlen (dp->d_name) + 1);
        !           626: ! # else ALLOCA
        !           627:            fcp = (char *) malloc (strlen (dp->d_name) + 1);
        !           628: ! # endif ALLOCA
        !           629:            if (fcp == 0) {
        !           630:                fputs ("\r\n", stdout);
        !           631:                perror ("alloca:");
        !           632: --- 1989,1997 ----
        !           633:        if (prefix (prefixstring, dp->d_name)) {
        !           634:   # ifdef ALLOCA
        !           635:            fcp = (char *) alloca (strlen (dp->d_name) + 1);
        !           636: ! # else /* ALLOCA */
        !           637:            fcp = (char *) malloc (strlen (dp->d_name) + 1);
        !           638: ! # endif /* ALLOCA */
        !           639:            if (fcp == 0) {
        !           640:                fputs ("\r\n", stdout);
        !           641:                perror ("alloca:");
        !           642: ***************
        !           643: *** 2018,2024 ****
        !           644:   # ifndef ALLOCA
        !           645:       for (i = 0; fileList [i]; i++)
        !           646:        free (fileList [i]);
        !           647: ! # endif ALLOCA
        !           648:       return;
        !           649:   }
        !           650:
        !           651: --- 2035,2041 ----
        !           652:   # ifndef ALLOCA
        !           653:       for (i = 0; fileList [i]; i++)
        !           654:        free (fileList [i]);
        !           655: ! # endif /* ALLOCA */
        !           656:       return;
        !           657:   }
        !           658:
        !           659: ***************
        !           660: *** 2065,2071 ****
        !           661:        fputs ("\n", stdout);
        !           662:       }
        !           663:   }
        !           664: ! #endif RINFO
        !           665:
        !           666:   bind_key (ft, func, s, dfunc)
        !           667:       FUNC ft[];               /* Function table */
        !           668: --- 2082,2088 ----
        !           669:        fputs ("\n", stdout);
        !           670:       }
        !           671:   }
        !           672: ! #endif /* RINFO */
        !           673:
        !           674:   bind_key (ft, func, s, dfunc)
        !           675:       FUNC ft[];               /* Function table */
        !           676: diff -cr official+NetBSD/fep_funcs.c fep-cygwin/fep_funcs.c
        !           677: *** official+NetBSD/fep_funcs.c        Mon Sep  2 15:54:20 2002
        !           678: --- fep-cygwin/fep_funcs.c     Mon Sep  2 19:03:26 2002
        !           679: ***************
        !           680: *** 3,9 ****
        !           681:   #ifndef lint
        !           682:   static char rcsid[]=
        !           683:   "$Header: fep_funcs.c,v 4.5 91/05/29 14:31:01 utashiro Exp $ (SRA)";
        !           684: ! #endif lint
        !           685:
        !           686:   #include <stdio.h>
        !           687:   #include "fep_defs.h"
        !           688: --- 3,9 ----
        !           689:   #ifndef lint
        !           690:   static char rcsid[]=
        !           691:   "$Header: fep_funcs.c,v 4.5 91/05/29 14:31:01 utashiro Exp $ (SRA)";
        !           692: ! #endif /* lint */
        !           693:
        !           694:   #include <stdio.h>
        !           695:   #include "fep_defs.h"
        !           696: diff -cr official+NetBSD/fep_funcs.h fep-cygwin/fep_funcs.h
        !           697: *** official+NetBSD/fep_funcs.h        Mon Sep  2 15:54:20 2002
        !           698: --- fep-cygwin/fep_funcs.h     Mon Sep  2 19:05:03 2002
        !           699: ***************
        !           700: *** 3,9 ****
        !           701:   #ifndef lint
        !           702:   # define FEP_FUNCS \
        !           703:       "$Header: fep_funcs.h,v 4.5 91/05/29 14:31:03 utashiro Exp $ (SRA)"
        !           704: ! #endif lint
        !           705:
        !           706:   /*
        !           707:    * command line edit functions
        !           708: --- 3,9 ----
        !           709:   #ifndef lint
        !           710:   # define FEP_FUNCS \
        !           711:       "$Header: fep_funcs.h,v 4.5 91/05/29 14:31:03 utashiro Exp $ (SRA)"
        !           712: ! #endif /* lint */
        !           713:
        !           714:   /*
        !           715:    * command line edit functions
        !           716: ***************
        !           717: *** 22,28 ****
        !           718: --- 22,33 ----
        !           719:   int  delete_previous_word();
        !           720:   int  delete_previous_Word();
        !           721:   int  delete_to_kill_buffer();
        !           722: + #if defined(__CYGWIN__)
        !           723: + void terminate(int);
        !           724: + #else
        !           725:   void terminate __P((int));
        !           726: + #endif
        !           727: + int send_int_sig();
        !           728:   int  end_of_line();
        !           729:   int  expand_file_name();
        !           730:   int  forward_character();
        !           731: diff -cr official+NetBSD/fep_glob.h fep-cygwin/fep_glob.h
        !           732: *** official+NetBSD/fep_glob.h Mon Sep  2 15:54:20 2002
        !           733: --- fep-cygwin/fep_glob.h      Mon Sep  2 19:05:16 2002
        !           734: ***************
        !           735: *** 3,9 ****
        !           736:   #ifndef lint
        !           737:   # define FEP_GLOB \
        !           738:       "$Header: fep_glob.h,v 4.1 88/08/28 14:36:41 utashiro Exp $ (SRA)"
        !           739: ! #endif lint
        !           740:
        !           741:   extern FUNC  *curFuncTab;    /* function table */
        !           742:   extern FUNC  *altFuncTab;    /* altanative function table */
        !           743: --- 3,9 ----
        !           744:   #ifndef lint
        !           745:   # define FEP_GLOB \
        !           746:       "$Header: fep_glob.h,v 4.1 88/08/28 14:36:41 utashiro Exp $ (SRA)"
        !           747: ! #endif /* lint */
        !           748:
        !           749:   extern FUNC  *curFuncTab;    /* function table */
        !           750:   extern FUNC  *altFuncTab;    /* altanative function table */
        !           751: diff -cr official+NetBSD/fep_hist.c fep-cygwin/fep_hist.c
        !           752: *** official+NetBSD/fep_hist.c Mon Sep  2 15:54:20 2002
        !           753: --- fep-cygwin/fep_hist.c      Mon Sep  2 19:03:17 2002
        !           754: ***************
        !           755: *** 3,9 ****
        !           756:   #ifndef lint
        !           757:   static char rcsid[]=
        !           758:   "$Header: fep_hist.c,v 4.3 88/11/25 20:45:25 utashiro Exp $ (SRA)";
        !           759: ! #endif lint
        !           760:
        !           761:   #include <stdio.h>
        !           762:   #include <stdlib.h>
        !           763: --- 3,9 ----
        !           764:   #ifndef lint
        !           765:   static char rcsid[]=
        !           766:   "$Header: fep_hist.c,v 4.3 88/11/25 20:45:25 utashiro Exp $ (SRA)";
        !           767: ! #endif /* lint */
        !           768:
        !           769:   #include <stdio.h>
        !           770:   #include <stdlib.h>
        !           771: ***************
        !           772: *** 12,17 ****
        !           773: --- 12,22 ----
        !           774:   #include "fep_defs.h"
        !           775:   #include "fep_glob.h"
        !           776:   #include "fep_funcs.h"
        !           777: +
        !           778: + #if defined(__FreeBSD__) || defined(__CYGWIN__)
        !           779: + #define re_comp regcomp
        !           780: + #define re_exec regexec
        !           781: + #endif
        !           782:
        !           783:   char **HistoryTable;
        !           784:   int  TopOfHist;
        !           785: diff -cr official+NetBSD/fep_main.c fep-cygwin/fep_main.c
        !           786: *** official+NetBSD/fep_main.c Mon Sep  2 15:54:21 2002
        !           787: --- fep-cygwin/fep_main.c      Mon Sep  2 19:03:54 2002
        !           788: ***************
        !           789: *** 3,9 ****
        !           790:   #ifndef lint
        !           791:   static char rcsid[]=
        !           792:   "$Id: fep_main.c,v 4.11 1993/06/10 02:51:28 utashiro Exp $ (SRA)";
        !           793: ! #endif lint
        !           794:
        !           795:   #include <stdio.h>
        !           796:   #include <signal.h>
        !           797: --- 3,9 ----
        !           798:   #ifndef lint
        !           799:   static char rcsid[]=
        !           800:   "$Id: fep_main.c,v 4.11 1993/06/10 02:51:28 utashiro Exp $ (SRA)";
        !           801: ! #endif /* lint */
        !           802:
        !           803:   #include <stdio.h>
        !           804:   #include <signal.h>
        !           805: ***************
        !           806: *** 12,18 ****
        !           807:   #include <sys/ioctl.h>
        !           808:   #ifdef TERMIOS
        !           809:   #include <termios.h>
        !           810: ! #ifdef __linux__
        !           811:   #ifndef _POSIX_VDISABLE
        !           812:   #define _POSIX_VDISABLE '\0'
        !           813:   #endif
        !           814: --- 12,18 ----
        !           815:   #include <sys/ioctl.h>
        !           816:   #ifdef TERMIOS
        !           817:   #include <termios.h>
        !           818: ! #if defined(__linux__) || defined(__CYGWIN__)
        !           819:   #ifndef _POSIX_VDISABLE
        !           820:   #define _POSIX_VDISABLE '\0'
        !           821:   #endif
        !           822: ***************
        !           823: *** 39,45 ****
        !           824:   #ifdef STAT
        !           825:     static char fep_statrc[] = FEP_STAT;
        !           826:   #endif
        !           827: ! #endif lint
        !           828:
        !           829:   char *myself;                        /* the command name */
        !           830:   char *prompt = "";                   /* prompt string */
        !           831: --- 39,45 ----
        !           832:   #ifdef STAT
        !           833:     static char fep_statrc[] = FEP_STAT;
        !           834:   #endif
        !           835: ! #endif /* lint */
        !           836:
        !           837:   char *myself;                        /* the command name */
        !           838:   char *prompt = "";                   /* prompt string */
        !           839: ***************
        !           840: *** 84,90 ****
        !           841:   #ifdef KANJI
        !           842:   struct       jtchars jtchars_buf;            /* kanji tty characters */
        !           843:   int  kmode_buf;                      /* kanji mode */
        !           844: ! #endif KANJI
        !           845:
        !           846:   char master_tty[16];                 /* master tty name */
        !           847:   char slave_tty[16];                  /* slave tty name */
        !           848: --- 84,90 ----
        !           849:   #ifdef KANJI
        !           850:   struct       jtchars jtchars_buf;            /* kanji tty characters */
        !           851:   int  kmode_buf;                      /* kanji mode */
        !           852: ! #endif /* KANJI */
        !           853:
        !           854:   char master_tty[16];                 /* master tty name */
        !           855:   char slave_tty[16];                  /* slave tty name */
        !           856: ***************
        !           857: *** 302,307 ****
        !           858: --- 302,308 ----
        !           859:       sighup = signal (SIGHUP, terminate);
        !           860:       sigchld = signal (SIGCHLD, catchsig);
        !           861:       sigtstp = signal (SIGTSTP, SIG_IGN);
        !           862: +     signal (SIGINT, (void(*)())send_int_sig);
        !           863:   #ifdef SIGWINCH
        !           864:       (void) signal(SIGWINCH, sigwinch);
        !           865:   #endif
        !           866: ***************
        !           867: *** 685,691 ****
        !           868: --- 686,694 ----
        !           869:        */
        !           870:       t = open ("/dev/tty", 2);
        !           871:       if (t >= 0) {
        !           872: + #ifndef __CYGWIN32__
        !           873:        ioctl (t, TIOCNOTTY, (char *) 0);
        !           874: + #endif
        !           875:        (void) close (t);
        !           876:       }
        !           877:
        !           878: ***************
        !           879: *** 818,823 ****
        !           880: --- 821,833 ----
        !           881:       exit (0);
        !           882:   }
        !           883:
        !           884: + send_int_sig() {
        !           885: + #ifndef __CYGWIN__
        !           886: +     kill(child_pid,SIGINT);
        !           887: + #endif
        !           888: +      return 0;
        !           889: + }
        !           890: +
        !           891:   get_pty_master()
        !           892:   {
        !           893:       char    c;
        !           894: ***************
        !           895: *** 828,833 ****
        !           896: --- 838,853 ----
        !           897:        master = 1;
        !           898:        return;
        !           899:       }
        !           900: + #ifdef __CYGWIN32__
        !           901: +     for (i = 0; i < 16; i++) {
        !           902: +      sprintf (master_tty, "/dev/ptmx");
        !           903: +      master = open (master_tty, O_RDWR);
        !           904: +      if (master >= 0) {
        !           905: +          sprintf (slave_tty, "/dev/tty%x",i);
        !           906: +          goto FOUND;
        !           907: +      }
        !           908: +     }
        !           909: + #else
        !           910:       for (c = 'p'; c <= 's'; c++) {
        !           911:        for (i = 0; i < 16; i++) {
        !           912:            sprintf (master_tty, "/dev/pty%c%x", c, i);
        !           913: ***************
        !           914: *** 838,844 ****
        !           915:            }
        !           916:        }
        !           917:       }
        !           918: !
        !           919:       /*
        !           920:        * Can't get master tty
        !           921:        */
        !           922: --- 858,864 ----
        !           923:            }
        !           924:        }
        !           925:       }
        !           926: ! #endif
        !           927:       /*
        !           928:        * Can't get master tty
        !           929:        */
        !           930: ***************
        !           931: *** 877,883 ****
        !           932:   # if defined(TIOCKGETC) && defined(TIOCKSETC)
        !           933:       ioctl (0, TIOCKGETC, (char *) &jtchars_buf);
        !           934:   # endif
        !           935: ! #endif KANJI
        !           936:
        !           937:       FD_ZERO(&stdinmask);
        !           938:       FD_ZERO(&mastermask);
        !           939: --- 897,903 ----
        !           940:   # if defined(TIOCKGETC) && defined(TIOCKSETC)
        !           941:       ioctl (0, TIOCKGETC, (char *) &jtchars_buf);
        !           942:   # endif
        !           943: ! #endif /* KANJI */
        !           944:
        !           945:       FD_ZERO(&stdinmask);
        !           946:       FD_ZERO(&mastermask);
        !           947: ***************
        !           948: *** 916,922 ****
        !           949:   # if defined(TIOCKGETC) && defined(TIOCKSETC)
        !           950:       ioctl (slave, TIOCKSETC, (char *) &jtchars_buf);
        !           951:   # endif
        !           952: ! #endif KANJI
        !           953:
        !           954:   #ifdef TIOCSWINSZ
        !           955:       {
        !           956: --- 936,942 ----
        !           957:   # if defined(TIOCKGETC) && defined(TIOCKSETC)
        !           958:       ioctl (slave, TIOCKSETC, (char *) &jtchars_buf);
        !           959:   # endif
        !           960: ! #endif /* KANJI */
        !           961:
        !           962:   #ifdef TIOCSWINSZ
        !           963:       {
        !           964: ***************
        !           965: *** 944,950 ****
        !           966: --- 964,972 ----
        !           967:   {
        !           968:       long     pid;
        !           969:       void     (*func) __P((int));
        !           970: + #ifndef __CYGWIN32__
        !           971:       int              omask;
        !           972: + #endif
        !           973:       extern int       errno;
        !           974:
        !           975:       pid = getpid ();
        !           976: ***************
        !           977: *** 953,959 ****
        !           978: --- 975,983 ----
        !           979:       signal (SIGTSTP, SIG_DFL);
        !           980:       recover_tty();
        !           981:   #define      mask(s) (1 << ((s)-1))
        !           982: + #ifndef __CYGWIN32__
        !           983:       omask = sigsetmask (sigblock (0) & ~mask (SIGTSTP));
        !           984: + #endif
        !           985:       kill (0, SIGTSTP);
        !           986:
        !           987:       if (kill (child_pid, SIGCONT) < 0 && errno == ESRCH) {
        !           988: ***************
        !           989: *** 964,970 ****
        !           990: --- 988,996 ----
        !           991:       kill (0, SIGCONT);
        !           992:       signal (SIGCHLD, func);
        !           993:       signal (SIGTSTP, SIG_IGN);
        !           994: + #ifndef __CYGWIN32__
        !           995:       sigblock (mask (SIGTSTP));
        !           996: + #endif
        !           997:       fix_tty ();
        !           998:       if (look_var ("auto-repaint"))
        !           999:        fep_repaint(0);
        !          1000: diff -cr official+NetBSD/fep_set.c fep-cygwin/fep_set.c
        !          1001: *** official+NetBSD/fep_set.c  Mon Sep  2 15:54:01 2002
        !          1002: --- fep-cygwin/fep_set.c       Mon Sep  2 19:02:56 2002
        !          1003: ***************
        !          1004: *** 3,9 ****
        !          1005:   #ifndef lint
        !          1006:   static char rcsid[]=
        !          1007:   "$Header: fep_set.c,v 4.3 91/05/29 14:31:08 utashiro Exp $ (SRA)";
        !          1008: ! #endif lint
        !          1009:
        !          1010:   #include <stdio.h>
        !          1011:   #include "fep_defs.h"
        !          1012: --- 3,9 ----
        !          1013:   #ifndef lint
        !          1014:   static char rcsid[]=
        !          1015:   "$Header: fep_set.c,v 4.3 91/05/29 14:31:08 utashiro Exp $ (SRA)";
        !          1016: ! #endif /* lint */
        !          1017:
        !          1018:   #include <stdio.h>
        !          1019:   #include "fep_defs.h"
        !          1020: ***************
        !          1021: *** 67,76 ****
        !          1022:   #ifdef HASH
        !          1023:   #define HASHNUM      10
        !          1024:   VAR *var_htab[HASHNUM];
        !          1025: ! #else HASH
        !          1026:   VAR var_top = {"top", "top", (char *)0, (VAR *)0};
        !          1027:   VAR *var_list = &var_top;
        !          1028: ! #endif HASH
        !          1029:
        !          1030:   /*
        !          1031:    * Functions
        !          1032: --- 67,76 ----
        !          1033:   #ifdef HASH
        !          1034:   #define HASHNUM      10
        !          1035:   VAR *var_htab[HASHNUM];
        !          1036: ! #else /* HASH */
        !          1037:   VAR var_top = {"top", "top", (char *)0, (VAR *)0};
        !          1038:   VAR *var_list = &var_top;
        !          1039: ! #endif /* HASH */
        !          1040:
        !          1041:   /*
        !          1042:    * Functions
        !          1043: ***************
        !          1044: *** 251,262 ****
        !          1045:        for (; vp != (VAR *)0; vp = vp->v_next)
        !          1046:            printf ("%-16s %s\n", vp->v_name, vp->v_value);
        !          1047:       }
        !          1048: ! #else HASH
        !          1049:       register VAR *vp;
        !          1050:
        !          1051:       for (vp = var_list->v_next; vp; vp = vp->v_next)
        !          1052:        printf ("%-16s %s\n", vp->v_name, vp->v_value);
        !          1053: ! #endif HASH
        !          1054:   }
        !          1055:
        !          1056:   #ifdef HASH
        !          1057: --- 251,262 ----
        !          1058:        for (; vp != (VAR *)0; vp = vp->v_next)
        !          1059:            printf ("%-16s %s\n", vp->v_name, vp->v_value);
        !          1060:       }
        !          1061: ! #else /* HASH */
        !          1062:       register VAR *vp;
        !          1063:
        !          1064:       for (vp = var_list->v_next; vp; vp = vp->v_next)
        !          1065:        printf ("%-16s %s\n", vp->v_name, vp->v_value);
        !          1066: ! #endif /* HASH */
        !          1067:   }
        !          1068:
        !          1069:   #ifdef HASH
        !          1070: ***************
        !          1071: *** 273,279 ****
        !          1072:
        !          1073:       return (sum % HASHNUM);
        !          1074:   }
        !          1075: ! #endif HASH
        !          1076:
        !          1077:   /*
        !          1078:    * Get pointer to VAR.
        !          1079: --- 273,279 ----
        !          1080:
        !          1081:       return (sum % HASHNUM);
        !          1082:   }
        !          1083: ! #endif /* HASH */
        !          1084:
        !          1085:   /*
        !          1086:    * Get pointer to VAR.
        !          1087: ***************
        !          1088: *** 288,294 ****
        !          1089:   {
        !          1090:   #ifdef HASH
        !          1091:       register i = getindex (name);
        !          1092: ! #endif HASH
        !          1093:       VAR *vp, *last = (VAR *)0;
        !          1094:
        !          1095:   #ifdef HASH
        !          1096: --- 288,294 ----
        !          1097:   {
        !          1098:   #ifdef HASH
        !          1099:       register i = getindex (name);
        !          1100: ! #endif /* HASH */
        !          1101:       VAR *vp, *last = (VAR *)0;
        !          1102:
        !          1103:   #ifdef HASH
        !          1104: ***************
        !          1105: *** 296,302 ****
        !          1106:        if (strcmp (name, vp->v_value) == 0)
        !          1107:            return (vp);
        !          1108:       }
        !          1109: ! #else HASH
        !          1110:       for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
        !          1111:        int r;
        !          1112:
        !          1113: --- 296,302 ----
        !          1114:        if (strcmp (name, vp->v_value) == 0)
        !          1115:            return (vp);
        !          1116:       }
        !          1117: ! #else /* HASH */
        !          1118:       for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
        !          1119:        int r;
        !          1120:
        !          1121: ***************
        !          1122: *** 309,315 ****
        !          1123:        else if (r < 0)
        !          1124:            break;
        !          1125:       }
        !          1126: ! #endif HASH
        !          1127:
        !          1128:       if (alloc == 0)
        !          1129:        return (0);
        !          1130: --- 309,315 ----
        !          1131:        else if (r < 0)
        !          1132:            break;
        !          1133:       }
        !          1134: ! #endif /* HASH */
        !          1135:
        !          1136:       if (alloc == 0)
        !          1137:        return (0);
        !          1138: ***************
        !          1139: *** 327,335 ****
        !          1140:       else {
        !          1141:        var_htab[i] = vp;
        !          1142:       }
        !          1143: ! #else HASH
        !          1144:       vp->v_next = last->v_next;
        !          1145:       last->v_next = vp;
        !          1146: ! #endif HASH
        !          1147:       return (vp);
        !          1148:   }
        !          1149: --- 327,335 ----
        !          1150:       else {
        !          1151:        var_htab[i] = vp;
        !          1152:       }
        !          1153: ! #else /* HASH */
        !          1154:       vp->v_next = last->v_next;
        !          1155:       last->v_next = vp;
        !          1156: ! #endif /* HASH */
        !          1157:       return (vp);
        !          1158:   }
        !          1159: diff -cr official+NetBSD/fep_stat.h fep-cygwin/fep_stat.h
        !          1160: *** official+NetBSD/fep_stat.h Mon Sep  2 15:54:01 2002
        !          1161: --- fep-cygwin/fep_stat.h      Mon Sep  2 19:05:22 2002
        !          1162: ***************
        !          1163: *** 3,9 ****
        !          1164:   #ifndef lint
        !          1165:   # define FEP_STAT \
        !          1166:       "$Header: fep_stat.h,v 4.0 88/08/05 20:21:58 utashiro Rel $ (SRA)"
        !          1167: ! #endif lint
        !          1168:
        !          1169:   extern long stat_obyte;
        !          1170:   extern long stat_ibyte;
        !          1171: --- 3,9 ----
        !          1172:   #ifndef lint
        !          1173:   # define FEP_STAT \
        !          1174:       "$Header: fep_stat.h,v 4.0 88/08/05 20:21:58 utashiro Rel $ (SRA)"
        !          1175: ! #endif /* lint */
        !          1176:
        !          1177:   extern long stat_obyte;
        !          1178:   extern long stat_ibyte;
        !          1179: diff -cr official+NetBSD/fep_util.c fep-cygwin/fep_util.c
        !          1180: *** official+NetBSD/fep_util.c Mon Sep  2 15:54:01 2002
        !          1181: --- fep-cygwin/fep_util.c      Mon Sep  2 19:04:14 2002
        !          1182: ***************
        !          1183: *** 3,16 ****
        !          1184:   #ifndef lint
        !          1185:   static char rcsid[]=
        !          1186:   "$Header: fep_util.c,v 4.1 88/08/28 18:57:41 utashiro Exp $ (SRA)";
        !          1187: ! #endif lint
        !          1188:
        !          1189:   #ifndef MKARGDEBUG
        !          1190:
        !          1191:   #include <stdio.h>
        !          1192:   #include <pwd.h>
        !          1193:   #include <sys/types.h>
        !          1194:   #include <sys/dir.h>
        !          1195:   #include <ctype.h>
        !          1196:   #include "fep_defs.h"
        !          1197:
        !          1198: --- 3,20 ----
        !          1199:   #ifndef lint
        !          1200:   static char rcsid[]=
        !          1201:   "$Header: fep_util.c,v 4.1 88/08/28 18:57:41 utashiro Exp $ (SRA)";
        !          1202: ! #endif /* lint */
        !          1203:
        !          1204:   #ifndef MKARGDEBUG
        !          1205:
        !          1206:   #include <stdio.h>
        !          1207:   #include <pwd.h>
        !          1208:   #include <sys/types.h>
        !          1209: + #if defined(__CYGWIN__)
        !          1210: + #include <dirent.h>
        !          1211: + #else
        !          1212:   #include <sys/dir.h>
        !          1213: + #endif
        !          1214:   #include <ctype.h>
        !          1215:   #include "fep_defs.h"
        !          1216:
        !          1217: ***************
        !          1218: *** 178,186 ****
        !          1219:   {
        !          1220:       return (d1 > d2 ? d1 : d2);
        !          1221:   }
        !          1222: ! #endif max
        !          1223:
        !          1224: ! #else MKARGDEBUG
        !          1225:
        !          1226:   #include <stdio.h>
        !          1227:   #include <ctype.h>
        !          1228: --- 182,190 ----
        !          1229:   {
        !          1230:       return (d1 > d2 ? d1 : d2);
        !          1231:   }
        !          1232: ! #endif /* max */
        !          1233:
        !          1234: ! #else /* MKARGDEBUG */
        !          1235:
        !          1236:   #include <stdio.h>
        !          1237:   #include <ctype.h>
        !          1238: ***************
        !          1239: *** 198,204 ****
        !          1240:        showArgs (s);
        !          1241:       }
        !          1242:   }
        !          1243: ! #endif MKARGDEBUG
        !          1244:
        !          1245:   showArgs (comline)
        !          1246:       char *comline;
        !          1247: --- 202,208 ----
        !          1248:        showArgs (s);
        !          1249:       }
        !          1250:   }
        !          1251: ! #endif /* MKARGDEBUG */
        !          1252:
        !          1253:   showArgs (comline)
        !          1254:       char *comline;
        !          1255: ***************
        !          1256: *** 402,405 ****
        !          1257:       else
        !          1258:        return (iskanji (*cp));
        !          1259:   }
        !          1260: ! #endif KANJI
        !          1261: --- 406,409 ----
        !          1262:       else
        !          1263:        return (iskanji (*cp));
        !          1264:   }
        !          1265: ! #endif /* KANJI */
        !          1266: diff -cr official+NetBSD/fep_vi.c fep-cygwin/fep_vi.c
        !          1267: *** official+NetBSD/fep_vi.c   Mon Sep  2 15:54:21 2002
        !          1268: --- fep-cygwin/fep_vi.c        Mon Sep  2 19:02:30 2002
        !          1269: ***************
        !          1270: *** 3,15 ****
        !          1271:   #ifndef lint
        !          1272:   static char rcsid[]=
        !          1273:   "$Header: fep_vi.c,v 4.7 91/05/29 14:31:10 utashiro Exp $ (SRA)";
        !          1274: ! #endif lint
        !          1275:
        !          1276:   #include <stdio.h>
        !          1277:   #include <sys/ioctl.h>
        !          1278:   #ifdef TERMIOS
        !          1279:   #include <termios.h>
        !          1280: ! #ifdef __linux__
        !          1281:   #ifndef _POSIX_VDISABLE
        !          1282:   #define _POSIX_VDISABLE '\0'
        !          1283:   #endif
        !          1284: --- 3,15 ----
        !          1285:   #ifndef lint
        !          1286:   static char rcsid[]=
        !          1287:   "$Header: fep_vi.c,v 4.7 91/05/29 14:31:10 utashiro Exp $ (SRA)";
        !          1288: ! #endif /* lint */
        !          1289:
        !          1290:   #include <stdio.h>
        !          1291:   #include <sys/ioctl.h>
        !          1292:   #ifdef TERMIOS
        !          1293:   #include <termios.h>
        !          1294: ! #if defined(__linux__) || defined(__CYGWIN__)
        !          1295:   #ifndef _POSIX_VDISABLE
        !          1296:   #define _POSIX_VDISABLE '\0'
        !          1297:   #endif
        !          1298: ***************
        !          1299: *** 176,183 ****
        !          1300: --- 176,190 ----
        !          1301:       import (cft, initial_ttymode.c_cc[VSTART], ignore);
        !          1302:       import (cft, initial_ttymode.c_cc[VSTOP], ignore);
        !          1303:       */
        !          1304: + #if 0
        !          1305:       import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush);
        !          1306:       import (aft, initial_ttymode.c_cc[VINTR], insert_and_flush);
        !          1307: + #else
        !          1308: +      /* added by noro */
        !          1309: +     import (cft, initial_ttymode.c_cc[VINTR], send_int_sig);
        !          1310: +      /* XXX : this may not be necessary */
        !          1311: +     import (aft, initial_ttymode.c_cc[VINTR], send_int_sig);
        !          1312: + #endif
        !          1313:       import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush);
        !          1314:       import (cft, initial_ttymode.c_cc[VEOF], send_eof);
        !          1315:   #ifdef VSWTC
        !          1316: ***************
        !          1317: *** 198,205 ****
        !          1318: --- 205,217 ----
        !          1319:       import (cft, tchars_buf.t_startx, ignore);
        !          1320:       import (cft, tchars_buf.t_stopc, ignore);
        !          1321:       */
        !          1322: + #if 0
        !          1323:       import (cft, tchars_buf.t_intrc, insert_and_flush);
        !          1324:       import (aft, tchars_buf.t_intrc, insert_and_flush);
        !          1325: + #else
        !          1326: +     import (cft, tchars_buf.t_intrc, send_int_sig);
        !          1327: +     import (aft, tchars_buf.t_intrc, send_int_sig);
        !          1328: + #endif
        !          1329:       import (cft, tchars_buf.t_quitc, insert_and_flush);
        !          1330:       import (cft, tchars_buf.t_eofc, send_eof);
        !          1331:       import (cft, tchars_buf.t_brkc, insert_and_flush);
        !          1332: diff -cr official+NetBSD/feprc.sample fep-cygwin/feprc.sample
        !          1333: *** official+NetBSD/feprc.sample       Mon Sep  2 15:54:02 2002
        !          1334: --- fep-cygwin/feprc.sample    Mon Sep  2 18:35:49 2002
        !          1335: ***************
        !          1336: *** 6,11 ****
        !          1337: --- 6,13 ----
        !          1338:   set alarm-on-eof
        !          1339:   set savehist=50
        !          1340:
        !          1341: + #sed editmode=vi
        !          1342: +
        !          1343:   echo "Welcome to fep! Editmode is" $editmode
        !          1344:   echo "I'm a front end processor for" $command
        !          1345:
        !          1346: ***************
        !          1347: *** 39,41 ****
        !          1348: --- 41,55 ----
        !          1349:   else
        !          1350:        echo "History will be saved to" $history-file
        !          1351:   endif
        !          1352: +
        !          1353: + fep-bind suspend "\^Z"
        !          1354: +
        !          1355: + #Fujimoto's setting
        !          1356: +         fep-bind delete-previous-character "\^H"
        !          1357: +         fep-bind backward-character "\^[[D"
        !          1358: +         fep-bind forward-character "\^[[C"
        !          1359: + #        fep-bind beginning-of-line "\^A"
        !          1360: + #        fep-bind end-of-line "\^E"
        !          1361: +         fep-bind previous-history "\^[[A"
        !          1362: +         fep-bind next-history "\^[[B"
        !          1363: +

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>