head 1.6; access; symbols perseant-exfatfs-base-20250801:1.6 perseant-exfatfs-base-20240630:1.6 perseant-exfatfs:1.6.0.36 perseant-exfatfs-base:1.6 cjep_sun2x:1.6.0.34 cjep_sun2x-base:1.6 cjep_staticlib_x-base1:1.6 cjep_staticlib_x:1.6.0.32 cjep_staticlib_x-base:1.6 phil-wifi-20200421:1.6 phil-wifi-20200411:1.6 phil-wifi-20200406:1.6 pgoyette-compat-merge-20190127:1.6 pgoyette-compat-20190127:1.6 pgoyette-compat-20190118:1.6 pgoyette-compat-1226:1.6 pgoyette-compat-1126:1.6 pgoyette-compat-1020:1.6 pgoyette-compat-0930:1.6 pgoyette-compat-0906:1.6 pgoyette-compat-0728:1.6 pgoyette-compat-0625:1.6 pgoyette-compat-0521:1.6 pgoyette-compat-0502:1.6 pgoyette-compat-0422:1.6 pgoyette-compat-0415:1.6 pgoyette-compat-0407:1.6 pgoyette-compat-0330:1.6 pgoyette-compat-0322:1.6 pgoyette-compat-0315:1.6 pgoyette-compat:1.6.0.30 pgoyette-compat-base:1.6 perseant-stdc-iso10646:1.6.0.28 perseant-stdc-iso10646-base:1.6 prg-localcount2-base3:1.6 prg-localcount2-base2:1.6 prg-localcount2-base1:1.6 prg-localcount2:1.6.0.26 prg-localcount2-base:1.6 pgoyette-localcount-20170426:1.6 bouyer-socketcan-base1:1.6 pgoyette-localcount-20170320:1.6 bouyer-socketcan:1.6.0.24 bouyer-socketcan-base:1.6 pgoyette-localcount-20170107:1.6 pgoyette-localcount-20161104:1.6 localcount-20160914:1.6 pgoyette-localcount-20160806:1.6 pgoyette-localcount-20160726:1.6 pgoyette-localcount:1.6.0.22 pgoyette-localcount-base:1.6 netbsd-5-2-3-RELEASE:1.6 netbsd-5-1-5-RELEASE:1.6 yamt-pagecache-base9:1.6 yamt-pagecache-tag8:1.6 tls-earlyentropy:1.6.0.18 tls-earlyentropy-base:1.6 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6 riastradh-drm2-base3:1.6 netbsd-5-2-2-RELEASE:1.6 netbsd-5-1-4-RELEASE:1.6 netbsd-5-2-1-RELEASE:1.6 netbsd-5-1-3-RELEASE:1.6 agc-symver:1.6.0.20 agc-symver-base:1.6 tls-maxphys-base:1.6 yamt-pagecache-base8:1.6 netbsd-5-2:1.6.0.16 yamt-pagecache-base7:1.6 netbsd-5-2-RELEASE:1.6 netbsd-5-2-RC1:1.6 yamt-pagecache-base6:1.6 yamt-pagecache-base5:1.6 yamt-pagecache-base4:1.6 netbsd-5-1-2-RELEASE:1.6 netbsd-5-1-1-RELEASE:1.6 yamt-pagecache-base3:1.6 yamt-pagecache-base2:1.6 yamt-pagecache:1.6.0.14 yamt-pagecache-base:1.6 bouyer-quota2-nbase:1.6 bouyer-quota2:1.6.0.12 bouyer-quota2-base:1.6 matt-nb5-pq3:1.6.0.10 matt-nb5-pq3-base:1.6 netbsd-5-1:1.6.0.8 netbsd-5-1-RELEASE:1.6 netbsd-5-1-RC4:1.6 netbsd-5-1-RC3:1.6 netbsd-5-1-RC2:1.6 netbsd-5-1-RC1:1.6 netbsd-5-0-2-RELEASE:1.6 netbsd-5-0-1-RELEASE:1.6 jym-xensuspend-nbase:1.6 netbsd-5-0:1.6.0.6 netbsd-5-0-RELEASE:1.6 netbsd-5-0-RC4:1.6 netbsd-5-0-RC3:1.6 netbsd-5-0-RC2:1.6 jym-xensuspend:1.6.0.4 jym-xensuspend-base:1.6 netbsd-5-0-RC1:1.6 netbsd-5:1.6.0.2 netbsd-5-base:1.6 matt-mips64-base2:1.5 matt-mips64:1.5.0.38 mjf-devfs2:1.5.0.36 mjf-devfs2-base:1.5 netbsd-4-0-1-RELEASE:1.5 wrstuden-revivesa-base-3:1.5 wrstuden-revivesa-base-2:1.5 wrstuden-fixsa-newbase:1.5 wrstuden-revivesa-base-1:1.5 yamt-pf42-base4:1.5 yamt-pf42-base3:1.5 hpcarm-cleanup-nbase:1.5 yamt-pf42-baseX:1.5 yamt-pf42-base2:1.5 wrstuden-revivesa:1.5.0.34 wrstuden-revivesa-base:1.5 yamt-pf42:1.5.0.32 yamt-pf42-base:1.5 keiichi-mipv6-nbase:1.5 keiichi-mipv6:1.5.0.30 keiichi-mipv6-base:1.5 matt-armv6-nbase:1.5 matt-armv6-prevmlocking:1.5 wrstuden-fixsa-base-1:1.5 netbsd-4-0:1.5.0.28 netbsd-4-0-RELEASE:1.5 cube-autoconf:1.5.0.26 cube-autoconf-base:1.5 netbsd-4-0-RC5:1.5 netbsd-4-0-RC4:1.5 netbsd-4-0-RC3:1.5 netbsd-4-0-RC2:1.5 netbsd-4-0-RC1:1.5 matt-armv6:1.5.0.24 matt-armv6-base:1.5 matt-mips64-base:1.5 hpcarm-cleanup:1.5.0.22 hpcarm-cleanup-base:1.5 netbsd-3-1-1-RELEASE:1.5 netbsd-3-0-3-RELEASE:1.5 wrstuden-fixsa:1.5.0.20 wrstuden-fixsa-base:1.5 abandoned-netbsd-4-base:1.5 abandoned-netbsd-4:1.5.0.14 netbsd-3-1:1.5.0.16 netbsd-3-1-RELEASE:1.5 netbsd-3-0-2-RELEASE:1.5 netbsd-3-1-RC4:1.5 netbsd-3-1-RC3:1.5 netbsd-3-1-RC2:1.5 netbsd-3-1-RC1:1.5 netbsd-4:1.5.0.18 netbsd-4-base:1.5 chap-midi-nbase:1.5 netbsd-3-0-1-RELEASE:1.5 chap-midi:1.5.0.12 chap-midi-base:1.5 netbsd-3-0:1.5.0.10 netbsd-3-0-RELEASE:1.5 netbsd-3-0-RC6:1.5 netbsd-3-0-RC5:1.5 netbsd-3-0-RC4:1.5 netbsd-3-0-RC3:1.5 netbsd-3-0-RC2:1.5 netbsd-3-0-RC1:1.5 netbsd-2-0-3-RELEASE:1.5 netbsd-2-1:1.5.0.8 netbsd-2-1-RELEASE:1.5 netbsd-2-1-RC6:1.5 netbsd-2-1-RC5:1.5 netbsd-2-1-RC4:1.5 netbsd-2-1-RC3:1.5 netbsd-2-1-RC2:1.5 netbsd-2-1-RC1:1.5 netbsd-2-0-2-RELEASE:1.5 netbsd-3:1.5.0.6 netbsd-3-base:1.5 netbsd-2-0-1-RELEASE:1.5 netbsd-2:1.5.0.4 netbsd-2-base:1.5 netbsd-2-0-RELEASE:1.5 netbsd-2-0-RC5:1.5 netbsd-2-0-RC4:1.5 netbsd-2-0-RC3:1.5 netbsd-2-0-RC2:1.5 netbsd-2-0-RC1:1.5 netbsd-2-0:1.5.0.2 netbsd-2-0-base:1.5 netbsd-1-6-PATCH002-RELEASE:1.4 netbsd-1-6-PATCH002:1.4 netbsd-1-6-PATCH002-RC4:1.4 netbsd-1-6-PATCH002-RC3:1.4 netbsd-1-6-PATCH002-RC2:1.4 netbsd-1-6-PATCH002-RC1:1.4 netbsd-1-6-PATCH001:1.4 netbsd-1-6-PATCH001-RELEASE:1.4 netbsd-1-6-PATCH001-RC3:1.4 netbsd-1-6-PATCH001-RC2:1.4 netbsd-1-6-PATCH001-RC1:1.4 fvdl_fs64_base:1.4 netbsd-1-6-RELEASE:1.4 netbsd-1-6-RC3:1.4 netbsd-1-6-RC2:1.4 netbsd-1-6-RC1:1.4 netbsd-1-6:1.4.0.2 netbsd-1-6-base:1.4 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH002:1.3 netbsd-1-5-PATCH001:1.3 nvi_1_79:1.1.1.2 netbsd-1-5-RELEASE:1.3 netbsd-1-5-BETA2:1.3 netbsd-1-5-BETA:1.3 netbsd-1-4-PATCH003:1.2 netbsd-1-5-ALPHA2:1.3 netbsd-1-5:1.3.0.2 netbsd-1-5-base:1.3 minoura-xpg4dl-base:1.2 minoura-xpg4dl:1.2.0.8 netbsd-1-4-PATCH002:1.2 wrstuden-devbsize-19991221:1.2 wrstuden-devbsize:1.2.0.6 wrstuden-devbsize-base:1.2 comdex-fall-1999:1.2.0.4 comdex-fall-1999-base:1.2 netbsd-1-4-PATCH001:1.2 netbsd-1-4-RELEASE:1.2 netbsd-1-4:1.2.0.2 netbsd-1-4-base:1.2 netbsd-1-3-PATCH003:1.1.1.1 netbsd-1-3-PATCH003-CANDIDATE2:1.1.1.1 netbsd-1-3-PATCH003-CANDIDATE1:1.1.1.1 netbsd-1-3-PATCH003-CANDIDATE0:1.1.1.1 netbsd-1-3-PATCH002:1.1.1.1 netbsd-1-3-PATCH001:1.1.1.1 netbsd-1-3-RELEASE:1.1.1.1 netbsd-1-3-BETA:1.1.1.1 netbsd-1-3:1.1.1.1.0.2 netbsd-1-3-base:1.1.1.1 netbsd-1-2-PATCH001:1.1.1.1 netbsd-1-2-RELEASE:1.1.1.1 netbsd-1-2-BETA:1.1.1.1 netbsd-1-2:1.1.1.1.0.4 netbsd-1-2-base:1.1.1.1 nvi_1_66:1.1.1.1 BOSTIC:1.1.1; locks; strict; comment @ * @; 1.6 date 2008.10.29.16.49.35; author christos; state dead; branches; next 1.5; 1.5 date 2003.08.27.15.15.16; author dsl; state Exp; branches; next 1.4; 1.4 date 2001.03.31.11.37.46; author aymeric; state Exp; branches; next 1.3; 1.3 date 2000.06.19.20.09.37; author aymeric; state Exp; branches; next 1.2; 1.2 date 98.01.09.08.07.00; author perry; state Exp; branches 1.2.8.1; next 1.1; 1.1 date 96.05.20.02.05.10; author mrg; state Exp; branches 1.1.1.1; next ; 1.2.8.1 date 2000.06.23.16.40.09; author minoura; state Exp; branches; next ; 1.1.1.1 date 96.05.20.02.05.10; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2001.03.31.11.30.02; author aymeric; state Exp; branches; next ; desc @@ 1.6 log @bye old vi! @ text @/* $NetBSD: options.h,v 1.5 2003/08/27 15:15:16 dsl Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * @@(#)options.h 10.19 (Berkeley) 10/10/96 */ /* * Edit option information. Historically, if you set a boolean or numeric * edit option value to its "default" value, it didn't show up in the :set * display, i.e. it wasn't considered "changed". String edit options would * show up as changed, regardless. We maintain a parallel set of values * which are the default values and never consider an edit option changed * if it was reset to the default value. * * Macros to retrieve boolean, integral and string option values, and to * set, clear and test boolean option values. Some options (secure, lines, * columns, terminal type) are global in scope, and are therefore stored * in the global area. The offset in the global options array is stored * in the screen's value field. This is set up when the options are first * initialized. */ #define O_V(sp, o, fld) \ (F_ISSET(&(sp)->opts[(o)], OPT_GLOBAL) ? \ (sp)->gp->opts[(sp)->opts[(o)].o_cur.val].fld : \ (sp)->opts[(o)].fld) /* Global option macros. */ #define OG_CLR(gp, o) ((gp)->opts[(o)].o_cur.val) = 0 #define OG_SET(gp, o) ((gp)->opts[(o)].o_cur.val) = 1 #define OG_STR(gp, o) ((gp)->opts[(o)].o_cur.str) #define OG_VAL(gp, o) ((gp)->opts[(o)].o_cur.val) #define OG_ISSET(gp, o) OG_VAL(gp, o) #define OG_D_STR(gp, o) ((gp)->opts[(o)].o_def.str) #define OG_D_VAL(gp, o) ((gp)->opts[(o)].o_def.val) /* * Flags to o_set(); need explicit OS_STR as can be setting the value to * NULL. */ #define OS_DEF 0x01 /* Set the default value. */ #define OS_NOFREE 0x02 /* Don't free the old string. */ #define OS_STR 0x04 /* Set to string argument. */ #define OS_STRDUP 0x08 /* Copy then set to string argument. */ struct _option { union { u_long val; /* Value or boolean. */ char *str; /* String. */ } o_cur; #define O_CLR(sp, o) o_set(sp, o, 0, NULL, 0) #define O_SET(sp, o) o_set(sp, o, 0, NULL, 1) #define O_STR(sp, o) O_V(sp, o, o_cur.str) #define O_VAL(sp, o) O_V(sp, o, o_cur.val) #define O_ISSET(sp, o) O_VAL(sp, o) union { u_long val; /* Value or boolean. */ char *str; /* String. */ } o_def; #define O_D_CLR(sp, o) o_set(sp, o, OS_DEF, NULL, 0) #define O_D_SET(sp, o) o_set(sp, o, OS_DEF, NULL, 1) #define O_D_STR(sp, o) O_V(sp, o, o_def.str) #define O_D_VAL(sp, o) O_V(sp, o, o_def.val) #define O_D_ISSET(sp, o) O_D_VAL(sp, o) #define OPT_GLOBAL 0x01 /* Option is global. */ #define OPT_SELECTED 0x02 /* Selected for display. */ u_int8_t flags; }; /* List of option names, associated update functions and information. */ struct _optlist { char *name; /* Name. */ /* Change function. */ int (*func) __P((SCR *, OPTION *, char *, u_long *)); /* Type of object. */ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type; #define OPT_ADISP 0x001 /* Always display the option. */ #define OPT_ALWAYS 0x002 /* Always call the support function. */ #define OPT_NDISP 0x004 /* Never display the option. */ #define OPT_NOSAVE 0x008 /* Mkexrc command doesn't save. */ #define OPT_NOSET 0x010 /* Option may not be set. */ #define OPT_NOUNSET 0x020 /* Option may not be unset. */ #define OPT_NOZERO 0x040 /* Option may not be set to 0. */ #define OPT_EARLYSET 0x080 /* Subsys called after value is set. */ #define OPT_PAIRS 0x100 /* String with even length */ int flags; }; /* Option argument to opts_dump(). */ enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY }; /* Options array. */ extern OPTLIST const optlist[]; #include "options_def.h" @ 1.5 log @Increase maximum terminal size from 500x500 to 4000x4000. Add a 'matchchars' option to set the character pairs that % looks for. Traditionally this was []{}() but someone added <> to nvi - probably for editing html, but it is a pain for C. :set matchars=[]{}() will restore the traditional behaviour. If the 'open' and 'close' characters are the same (eg "" or '') then % will alternate forwards and backwards searches. Use common code to detect options that must have an even number of characters. @ text @d1 1 a1 1 /* $NetBSD: options.h,v 1.4 2001/03/31 11:37:46 aymeric Exp $ */ @ 1.4 log @merge changes after import of nvi 1.79 @ text @d1 1 a1 1 /* $NetBSD: options.h,v 1.3 2000/06/19 20:09:37 aymeric Exp $ */ d95 2 a96 1 u_int8_t flags; @ 1.3 log @Correct behavior of options octal, print and noprint This fixes PR #6800 @ text @d1 1 a1 1 /* $NetBSD: options.h,v 1.2 1998/01/09 08:07:00 perry Exp $ */ d11 1 a11 1 * @@(#)options.h 10.16 (Berkeley) 5/16/96 d44 4 a47 1 /* Flags to o_set(). */ d49 3 a51 3 #define OS_FREE 0x02 /* Free old string if set. */ #define OS_STR 0x04 /* Set to the str value. */ #define OS_STRDUP 0x08 /* Copy and set to the str value. */ d91 1 a91 1 #define OPT_NOSET 0x010 /* Option may not be unset. */ d94 1 a94 1 #define OPT_EARLYSET 0x080 /* Func called after value is set */ @ 1.2 log @RCS Id Police. @ text @d1 1 a1 1 /* $NetBSD$ */ d91 1 @ 1.2.8.1 log @Sync w/ netbsd-1-5-base. @ text @d1 1 a1 1 /* $NetBSD: options.h,v 1.3 2000/06/19 20:09:37 aymeric Exp $ */ a90 1 #define OPT_EARLYSET 0x080 /* Func called after value is set */ @ 1.1 log @Initial revision @ text @d1 2 @ 1.1.1.1 log @import of nvi 1.66 @ text @@ 1.1.1.2 log @import of nvi 1.79 @ text @d9 1 a9 1 * @@(#)options.h 10.19 (Berkeley) 10/10/96 d42 1 a42 4 /* * Flags to o_set(); need explicit OS_STR as can be setting the value to * NULL. */ d44 3 a46 3 #define OS_NOFREE 0x02 /* Don't free the old string. */ #define OS_STR 0x04 /* Set to string argument. */ #define OS_STRDUP 0x08 /* Copy then set to string argument. */ d86 1 a86 1 #define OPT_NOSET 0x010 /* Option may not be set. */ @