diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-22 06:28:23 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-22 06:28:23 +0000 |
commit | 1afa50deb4cd8a50f3a891d65273984a76072ddf (patch) | |
tree | 1351ee8b39899320a57b45eaf64c51fd5050c954 | |
parent | 5cc13c0e225921cf66aaf8687445935ccca1f435 (diff) |
-rw-r--r-- | etc/daily | 2 | ||||
-rw-r--r-- | gnu/lib/libdialog/lineedit.c | 88 | ||||
-rw-r--r-- | include/stdlib.h | 10 | ||||
-rw-r--r-- | lib/libcurses/refresh.c | 27 | ||||
-rw-r--r-- | lib/libncurses/termcap.h | 13 | ||||
-rw-r--r-- | release/Makefile | 13 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 3 | ||||
-rw-r--r-- | sbin/ipfw/ipfirewall.4 | 4 | ||||
-rw-r--r-- | share/mk/bsd.port.mk | 4 | ||||
-rw-r--r-- | share/syscons/keymaps/german.cp850.kbd | 2 | ||||
-rw-r--r-- | sys/i386/isa/syscons.c | 16 | ||||
-rw-r--r-- | usr.bin/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/config/mkioconf.c | 17 |
13 files changed, 120 insertions, 83 deletions
diff --git a/etc/daily b/etc/daily index 8fd820f039bff..43444bc276a99 100644 --- a/etc/daily +++ b/etc/daily @@ -45,7 +45,7 @@ fi cd /tmp # This is not safe, you need to decide what is appropriate for your # system. Leave a warning note for now. -echo "You did not enable the cleaning of /tmp in /etc/daily!" +echo "You did not enable the cleaning of / in /etc/daily!" # #find / ! -fstype local -a -prune -o \ # \( -name '[#,]*' -o -name '.#*' -o -name a.out -o -name *.core \ diff --git a/gnu/lib/libdialog/lineedit.c b/gnu/lib/libdialog/lineedit.c index 37f7ccefde487..afcf0f54d4400 100644 --- a/gnu/lib/libdialog/lineedit.c +++ b/gnu/lib/libdialog/lineedit.c @@ -78,8 +78,10 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht key = '\n'; goto ret; case '\025': + case '\030': kill_it: memset(instr, 0, sizeof(instr)); + case '\001': case KEY_HOME: input_x = scroll = 0; wmove(dialog, box_y, box_x); @@ -89,9 +91,10 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht wattrset(dialog, old_attr); max_len = MIN(len,box_width); for ( ; i < max_len; i++) - waddch(dialog, instr[i]); + waddch(dialog, instr[i] ? instr[i] : ' '); wmove(dialog, box_y, box_x); continue; + case '\005': case KEY_END: for (i = strlen(instr) - 1; i >= scroll + input_x && instr[i] == ' '; i--) instr[i] = '\0'; @@ -105,9 +108,10 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht wattrset(dialog, old_attr); max_len = MIN(len-scroll,box_width); for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); wmove(dialog, box_y, input_x + box_x); continue; + case '\002': case KEY_LEFT: if (input_x || scroll) { if (!input_x) { @@ -120,14 +124,16 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht wattrset(dialog, old_attr); max_len = MIN(len-scroll,box_width); for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); input_x = oldscroll - 1 - scroll; } else input_x--; wmove(dialog, box_y, input_x + box_x); - } + } else + beep(); continue; + case '\006': case KEY_RIGHT: if ( scroll+input_x < MAX_LEN && (flen < 0 || scroll+input_x < flen) @@ -143,7 +149,7 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht wattrset(dialog, old_attr); max_len = MIN(len-scroll,box_width); for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); wmove(dialog, box_y, box_x + box_width - 1); } else { @@ -157,32 +163,48 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht case '\b': case '\177': case KEY_BACKSPACE: - case KEY_DC: erase_it: if (input_x || scroll) { i = strlen(instr); - memmove(instr+scroll+input_x-1, instr+scroll+input_x, i-scroll+input_x+1); + memmove(instr+scroll+input_x-1, instr+scroll+input_x, i-(scroll+input_x)+1); if (!input_x) { int oldscroll = scroll; scroll = scroll < box_width-1 ? 0 : scroll-(box_width-1); - wmove(dialog, box_y, box_x); - fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; - for (i = 0; i < fix_len; i++) - waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); input_x = oldscroll - 1 - scroll; } else input_x--; - wmove(dialog, box_y, input_x + box_x); + wmove(dialog, box_y, box_x); fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; - for (i = input_x; i < fix_len; i++) + for (i = 0; i < fix_len; i++) waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); wattrset(dialog, old_attr); max_len = MIN(len-scroll,box_width); for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); wmove(dialog, box_y, input_x + box_x); + } else + beep(); + continue; + case '\004': + case KEY_DC: + for (i = strlen(instr) - 1; i >= scroll + input_x && instr[i] == ' '; i--) + instr[i] = '\0'; + i++; + if (i == 0) { + beep(); + continue; } + memmove(instr+scroll+input_x, instr+scroll+input_x+1, i-(scroll+input_x)); + wmove(dialog, box_y, box_x); + fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; + for (i = 0; i < fix_len; i++) + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); + wattrset(dialog, old_attr); + max_len = MIN(len-scroll,box_width); + for ( ; i < max_len; i++) + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); + wmove(dialog, box_y, input_x + box_x); continue; default: if (CCEQ(key, erase_char)) @@ -195,31 +217,21 @@ int line_edit(WINDOW* dialog, int box_y, int box_x, int flen, int box_width, cht i++; if (i < MAX_LEN && (flen < 0 || scroll+input_x < flen)) { if (flen < 0 || i < flen) - memmove(instr+scroll+input_x+1, instr+scroll+input_x, i-scroll+input_x); + memmove(instr+scroll+input_x+1, instr+scroll+input_x, i-(scroll+input_x)); instr[scroll+input_x] = key; - if (input_x == box_width-1 && (flen < 0 || i < flen)) { + if (input_x == box_width-1 && (flen < 0 || i < flen)) scroll++; - wmove(dialog, box_y, box_x); - fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; - for (i = 0; i < fix_len; i++) - waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); - wattrset(dialog, old_attr); - max_len = MIN(len-scroll,box_width); - for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); - wmove(dialog, box_y, input_x + box_x); - } - else { - wmove(dialog, box_y, input_x + box_x); - fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; - for (i = input_x; i < fix_len; i++) - waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); - wattrset(dialog, old_attr); - max_len = MIN(len-scroll,box_width); - for ( ; i < max_len; i++) - waddch(dialog, instr[scroll+i]); - wmove(dialog, box_y, ++input_x + box_x); - } + else + input_x++; + wmove(dialog, box_y, box_x); + fix_len = flen >= 0 ? MIN(flen-scroll,box_width) : box_width; + for (i = 0; i < fix_len; i++) + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); + wattrset(dialog, old_attr); + max_len = MIN(len-scroll,box_width); + for ( ; i < max_len; i++) + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); + wmove(dialog, box_y, input_x + box_x); } else beep(); /* Alarm user about overflow */ continue; @@ -231,7 +243,7 @@ ret: wmove(dialog, box_y, box_x); max_len = MIN(len-scroll,box_width); for (i = 0; i < max_len; i++) - waddch(dialog, instr[scroll+i]); + waddch(dialog, instr[scroll+i] ? instr[scroll+i] : ' '); wmove(dialog, box_y, input_x + box_x); wrefresh(dialog); strcpy(result, instr); diff --git a/include/stdlib.h b/include/stdlib.h index 31fa8e39a0e81..fda6f96ea80ee 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -122,6 +122,16 @@ int setenv __P((const char *, const char *, int)); #endif #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +double drand48 __P((void)); +double erand48 __P((unsigned short[3])); +long lrand48 __P((void)); +long nrand48 __P((unsigned short[3])); +long mrand48 __P((void)); +long jrand48 __P((unsigned short[3])); +void srand48 __P((long)); +unsigned short *seed48 __P((unsigned short[3])); +void lcong48 __P((unsigned short[7])); + void *alloca __P((size_t)); /* built-in for gcc */ /* getcap(3) functions */ char *getbsize __P((int *, long *)); diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c index 4cb87a3a760c6..5b091f9377569 100644 --- a/lib/libcurses/refresh.c +++ b/lib/libcurses/refresh.c @@ -750,7 +750,8 @@ scrolln(starts, startw, curs, bot, top) if (n == 1) goto f_nl1; tputs(__tscroll(SF, n, 0), n, __cputchar); - __mvcur(curscr->maxy - 1, 0, bot - n + 1, 0, 1); + __mvcur(curscr->maxy - 1, 0, oy, ox, 1); + return; } else if (DL != NULL && top != 0) { __mvcur(oy, ox, top, 0, 1); @@ -775,6 +776,10 @@ scrolln(starts, startw, curs, bot, top) tputs(NL, 1, __cputchar); else putchar('\n'); + if (bot == curscr->maxy - 1) { + __mvcur(curscr->maxy - 1, 0, oy, ox, 1); + return; + } __mvcur(curscr->maxy - 1, 0, bot - n + 1, 0, 1); } else @@ -800,12 +805,15 @@ scrolln(starts, startw, curs, bot, top) * n < 0 */ /* Scroll down the screen. */ - if (!DA && SR != NULL && bot == curscr->maxy - 1 && top == 0) { + if (!DA && (SR != NULL || sr != NULL) && bot == curscr->maxy - 1 && top == 0) { __mvcur(oy, ox, 0, 0, 1); - if (sr != NULL && -n == 1) - goto b_sr1; - tputs(__tscroll(SR, -n, 0), -n, __cputchar); - __mvcur(0, 0, top, 0, 1); + if (SR == NULL || sr != NULL && -n == 1) { + for (i = n; i < 0; i++) + tputs(sr, 1, __cputchar); + } else + tputs(__tscroll(SR, -n, 0), -n, __cputchar); + __mvcur(0, 0, oy, ox, 1); + return; } else if (DL != NULL) { __mvcur(oy, ox, bot + n + 1, 0, 1); @@ -821,13 +829,6 @@ scrolln(starts, startw, curs, bot, top) tputs(dl, 1, __cputchar); __mvcur(bot + n + 1, 0, top, 0, 1); } - else if (sr != NULL && bot == curscr->maxy - 1) { - __mvcur(oy, ox, 0, 0, 1); - b_sr1: - for (i = n; i < 0; i++) - tputs(sr, 1, __cputchar); - __mvcur(0, 0, top, 0, 1); - } else abort(); diff --git a/lib/libncurses/termcap.h b/lib/libncurses/termcap.h index 05c86ca7dfe4e..9a5dd3293601e 100644 --- a/lib/libncurses/termcap.h +++ b/lib/libncurses/termcap.h @@ -1,15 +1,10 @@ - - #ifndef _TERMCAP_H #define _TERMCAP_H 1 -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - #include <sys/cdefs.h> +__BEGIN_DECLS + extern char PC; extern char *UP; extern char *BC; @@ -25,8 +20,6 @@ extern int tputs __P((const char *, int, int (*)(int))); extern char *tgoto __P((const char *, int, int)); extern char *tparam __P((const char *, char *, int, ...)); -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* _TERMCAP_H */ diff --git a/release/Makefile b/release/Makefile index 4550c4839c2e9..ffb431522333b 100644 --- a/release/Makefile +++ b/release/Makefile @@ -1,10 +1,11 @@ -# $Id: Makefile,v 1.56 1994/11/21 04:14:30 phk Exp $ +# $Id: Makefile,v 1.57 1994/11/21 08:15:25 phk Exp $ # # Evil floppies are, of course, 1.2MB floppies. FLOPPY= fd0 #EVIL_FLOPPY= yes + .if defined(EVIL_FLOPPY) FDLABEL= fd1200 DDBS= 15k @@ -155,9 +156,10 @@ bar: DESTDIR=${RELEASEDIR}/filesys \ SHARED=copies ) -EXTRADISTRIBUTIONS= des games manpages proflibs dict krb +EXTRADISTRIBUTIONS= secrdist games manpages proflibs dict krb srcdist DISTRIBUTIONS= bindist ${EXTRADISTRIBUTIONS} MTREEFILES= ${.CURDIR}/../etc/mtree +SECRSRC= src/secure src/eBones distribute: -mkdir ${RELEASEDIR} @@ -175,7 +177,7 @@ distribute: install ${COPY} -m 644 ${.CURDIR}/../sys/compile/GENERIC/kernel \ ${RELEASEDIR}/bindist/kernel -tarballs: +beforetarballs: rm -rf ${RELEASEDIR}/manpages/usr/share/man mv ${RELEASEDIR}/bindist/usr/share/man \ ${RELEASEDIR}/manpages/usr/share/man @@ -192,6 +194,11 @@ tarballs: ${RELEASEDIR}/proflibs/usr/lib -cd ${RELEASEDIR} ; \ find ${EXTRADISTRIBUTIONS} -depth -type d -print | xargs rmdir + cd ${RELEASEDIR}/secrdist/usr ; cvs export -r ${RELEASETAG} ${SECRSRC} + cd ${RELEASEDIR}/srcdist/usr ; cvs export -r ${RELEASETAG} src + cd ${RELEASEDIR}/srcdist/usr/src ; rm -rf secure kerberosIV eBones + +tarballs: rm -rf ${RELEASEDIR}/tarballs mkdir ${RELEASEDIR}/tarballs for i in ${DISTRIBUTIONS} ; \ diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 194bc5c4c5829..6a6cbdff081a9 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -125,6 +125,9 @@ struct cmd { { "-link1", -IFF_LINK1, setifflags }, { "link2", IFF_LINK2, setifflags }, { "-link2", -IFF_LINK2, setifflags }, + { "normal", -IFF_LINK0, setifflags }, + { "compress", IFF_LINK0, setifflags }, + { "noicmp", IFF_LINK1, setifflags }, { "mtu", NEXTARG, setifmtu }, { 0, 0, setifaddr }, { 0, 0, setifdstaddr }, diff --git a/sbin/ipfw/ipfirewall.4 b/sbin/ipfw/ipfirewall.4 index e8aaa7c956120..f11cbd54b304f 100644 --- a/sbin/ipfw/ipfirewall.4 +++ b/sbin/ipfw/ipfirewall.4 @@ -3,8 +3,8 @@ .Os .Sh NAME -ipfirewall,ipfw - IP packets filter. -ipaccounting,ipacct - IP packets/traffic accounting. + ipfirewall,ipfw - IP packets filter. + ipaccounting,ipacct - IP packets/traffic accounting. .Sh SYNOPSIS #include <netinet/ip_fw.h> diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk index ec594125de5c7..dab206b799567 100644 --- a/share/mk/bsd.port.mk +++ b/share/mk/bsd.port.mk @@ -3,7 +3,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.71 1994/11/17 10:07:45 jkh Exp $ +# $Id: bsd.port.mk,v 1.72 1994/11/17 15:46:27 jkh Exp $ # # Please view me with 4 column tabs! @@ -473,8 +473,10 @@ clean: pre-clean @echo "===> Cleaning for ${DISTNAME}" @rm -f ${EXTRACT_COOKIE} ${CONFIGURE_COOKIE} ${INSTALL_COOKIE} \ ${BUILD_COOKIE} ${PATCH_COOKIE} +.if !defined(NO_WRKDIR) @rm -rf ${WRKDIR} .endif +.endif # No pre-targets for depend or tags. It would be silly. diff --git a/share/syscons/keymaps/german.cp850.kbd b/share/syscons/keymaps/german.cp850.kbd index 11b2ac75fcb81..5bcd0945cce04 100644 --- a/share/syscons/keymaps/german.cp850.kbd +++ b/share/syscons/keymaps/german.cp850.kbd @@ -15,7 +15,7 @@ 010 '9' ')' gs gs ']' ']' gs gs O 011 '0' '=' nop nop '}' '}' nop nop O 012 225 '?' fs fs '\' '\' fs fs O - 013 179 180 nop nop 179 180 nop nop O + 013 ''' '`' nop nop 179 180 nop nop O 014 bs bs del del bs bs del del O 015 ht btab nop nop ht btab nop nop O 016 'q' 'Q' dc1 dc1 '@' '@' nul nul C diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index a9ae28c870ee3..898c8e1d5a2df 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: syscons.c,v 1.77 1994/11/17 22:03:16 sos Exp $ + * $Id: syscons.c,v 1.79 1994/11/21 14:36:02 ache Exp $ */ #include "sc.h" @@ -1782,28 +1782,28 @@ scan_esc(scr_stat *scp, u_char c) case 'S': /* scroll up n lines */ n = scp->term.param[0]; if (n < 1) n = 1; - if (n > scp->ypos) - n = scp->ypos; + if (n > scp->ysize) + n = scp->ysize; bcopy(scp->crt_base + (scp->xsize * n), scp->crt_base, scp->xsize * (scp->ysize - n) * sizeof(u_short)); fillw(scp->term.cur_attr | scr_map[0x20], scp->crt_base + scp->xsize * - (scp->ysize - 1), - scp->xsize); + (scp->ysize - n), + scp->xsize * n); break; case 'T': /* scroll down n lines */ n = scp->term.param[0]; if (n < 1) n = 1; - if (n > scp->ysize - scp->ypos) - n = scp->ysize - scp->ypos; + if (n > scp->ysize) + n = scp->ysize; bcopy(scp->crt_base, scp->crt_base + (scp->xsize * n), scp->xsize * (scp->ysize - n) * sizeof(u_short)); fillw(scp->term.cur_attr | scr_map[0x20], - scp->crt_base, scp->xsize); + scp->crt_base, scp->xsize * n); break; case 'X': /* delete n characters in line */ diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 72c417d3877d5..56fcec1f460e6 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.3 (Berkeley) 1/7/94 -# $Id: Makefile,v 1.28 1994/11/12 05:32:46 lars Exp $ +# $Id: Makefile,v 1.29 1994/11/20 14:21:25 jkh Exp $ # XXX MISSING: deroff diction graph learn plot # ptx spell spline struct units xsend @@ -18,7 +18,7 @@ SUBDIR= apply ar at banner basename biff cal calendar \ nm nohup pagesize passwd paste pr printenv printf quota ranlib rdist \ renice rev rlogin rpcgen rpcinfo rs rsh rup ruptime rusers rwall \ rwho script sed shar showmount size soelim split \ - strings strip su symorder talk tcopy tee telnet tftp time tip \ + strings strip su symorder talk tconv tcopy tee telnet tftp time tip \ tn3270 touch tput tr true tset tsort tty ul uname unexpand \ unifdef uniq unvis users uudecode uuencode vacation \ vgrind vi vis w wall wc what whereis who whois window write \ diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c index 822f80cc4c554..2757443dee606 100644 --- a/usr.sbin/config/mkioconf.c +++ b/usr.sbin/config/mkioconf.c @@ -605,6 +605,8 @@ i386_ioconf() register int uba_n, slave; int dev_id; FILE *fp; + static struct device olddev; + struct device *old = &olddev; fp = fopen(path("ioconf.c"), "w"); if (fp == 0) { @@ -638,8 +640,9 @@ i386_ioconf() if (mp == 0 || mp == TO_NEXUS || !eq(mp->d_name, "isa")) continue; - fprintf(fp, "extern struct isa_driver %3.3sdriver;", - dp->d_name); + if(!old->d_name || strcmp(old->d_name, dp->d_name)) + fprintf(fp, "extern struct isa_driver %3.3sdriver;", + dp->d_name); if(eq(dp->d_name, "wdc")) seen_wdc++; if(eq(dp->d_name, "fdc")) seen_fdc++; if (dp->d_irq == 2) @@ -647,9 +650,15 @@ i386_ioconf() fprintf(stderr, "remapped irq 2 to irq 9, please update your config file\n"); dp->d_irq = 9; } - if (dp->d_vec != NULL && dp->d_vec->id != NULL) - fprintf(fp, " inthand2_t %s;", shandler(dp)); + if (dp->d_vec != NULL && dp->d_vec->id != NULL) { + char buf[32]; + + strcpy(buf, shandler(old)); + if(!old->d_name || strcmp(buf, shandler(dp))) + fprintf(fp, " inthand2_t %s;", shandler(dp)); + } fprintf(fp, "\n"); + old = dp; } #ifdef STATCLOCK dev_id = 2; |