head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.112 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.110 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.108 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.3.0.106 pkgsrc-2025Q2-base:1.3 pkgsrc-2025Q1:1.3.0.104 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.3.0.102 pkgsrc-2024Q4-base:1.3 pkgsrc-2024Q3:1.3.0.100 pkgsrc-2024Q3-base:1.3 pkgsrc-2024Q2:1.3.0.98 pkgsrc-2024Q2-base:1.3 pkgsrc-2024Q1:1.3.0.96 pkgsrc-2024Q1-base:1.3 pkgsrc-2023Q4:1.3.0.94 pkgsrc-2023Q4-base:1.3 pkgsrc-2023Q3:1.3.0.92 pkgsrc-2023Q3-base:1.3 pkgsrc-2023Q2:1.3.0.90 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.3.0.88 pkgsrc-2023Q1-base:1.3 pkgsrc-2022Q4:1.3.0.86 pkgsrc-2022Q4-base:1.3 pkgsrc-2022Q3:1.3.0.84 pkgsrc-2022Q3-base:1.3 pkgsrc-2022Q2:1.3.0.82 pkgsrc-2022Q2-base:1.3 pkgsrc-2022Q1:1.3.0.80 pkgsrc-2022Q1-base:1.3 pkgsrc-2021Q4:1.3.0.78 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.76 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.3.0.74 pkgsrc-2021Q2-base:1.3 pkgsrc-2021Q1:1.3.0.72 pkgsrc-2021Q1-base:1.3 pkgsrc-2020Q4:1.3.0.70 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.68 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.64 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.44 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.66 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.62 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.60 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.58 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.56 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.54 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.52 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.50 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.48 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.46 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.42 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.40 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.38 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.36 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.34 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.32 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.30 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.28 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.26 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.24 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.3.0.22 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.20 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.3.0.18 pkgsrc-2014Q2-base:1.3 pkgsrc-2014Q1:1.3.0.16 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.14 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.12 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.10 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.8 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.4 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.2 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.2.0.80 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.78 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.76 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.74 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.72 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.70 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.68 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.66 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.64 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.62 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.60 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.58 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.56 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.54 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.52 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.50 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.48 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.46 pkgsrc-2008Q1:1.2.0.44 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.42 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.40 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.38 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.36 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.34 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.32 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.30 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.28 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.26 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.24 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.22 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.20 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.18 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.16 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 FreeBSD-current-2000-03-16:1.1.1.1 FREEBSD:1.1.1; locks; strict; comment @# @; 1.3 date 2012.05.10.20.53.30; author dholland; state Exp; branches; next 1.2; 1.2 date 2000.03.23.22.08.52; author tron; state Exp; branches; next 1.1; 1.1 date 2000.03.23.22.04.50; author tron; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.03.23.22.04.50; author tron; state Exp; branches; next ; desc @@ 1.3 log @Pass -Wall. Fix a number of minor bugs and possibly some major ones. Should also fix clang build. PKGREVISION++ @ text @$NetBSD: patch-ac,v 1.2 2000/03/23 22:08:52 tron Exp $ - use standard headers - avoid implicit int - look in $PREFIX/share/uemacs for data files - const correctness required by existing const declarations - suppress false initialization warning seen with gcc 4.1 --- src/bind.c.orig 1995-11-19 08:09:20.000000000 +0000 +++ src/bind.c @@@@ -5,13 +5,14 @@@@ */ #include +#include #include "estruct.h" #include "eproto.h" #include "edef.h" #include "elang.h" #include "epath.h" -PASCAL NEAR help(f, n) /* give me some help!!!! +PASCAL NEAR int help(f, n) /* give me some help!!!! bring up a fake buffer and read the help file into it with view mode */ @@@@ -19,7 +20,10 @@@@ int f,n; /* prefix flag and argument */ { register BUFFER *bp; /* buffer pointer to help */ - char *fname; /* file name of help file */ + CONST char *fname; /* file name of help file */ + + /* required by gcc 4.1 */ + fname = NULL; /* first check if we are already here */ bp = bfind("emacs.hlp", FALSE, BFINVS); @@@@ -51,7 +55,7 @@@@ int f,n; /* prefix flag and argument */ return(TRUE); } -PASCAL NEAR deskey(f, n) /* describe the command for a certain key */ +PASCAL NEAR int deskey(f, n) /* describe the command for a certain key */ int f,n; /* prefix flag and argument */ @@@@ -81,7 +85,7 @@@@ int f,n; /* prefix flag and argument */ /* bindtokey: add a new key to the key binding table */ -PASCAL NEAR bindtokey(f, n) +PASCAL NEAR int bindtokey(f, n) int f, n; /* command arguments [IGNORED] */ @@@@ -180,7 +184,7 @@@@ int f, n; /* command arguments [IGNORED] /* macrotokey: Bind a key to a macro in the key binding table */ -PASCAL NEAR macrotokey(f, n) +PASCAL NEAR int macrotokey(f, n) int f, n; /* command arguments [IGNORED] */ @@@@ -258,7 +262,7 @@@@ int f, n; /* command arguments [IGNORED] /* unbindkey: delete a key from the key binding table */ -PASCAL NEAR unbindkey(f, n) +PASCAL NEAR int unbindkey(f, n) int f, n; /* command arguments [IGNORED] */ @@@@ -286,7 +290,7 @@@@ int f, n; /* command arguments [IGNORED] return(TRUE); } -PASCAL NEAR unbindchar(c) +PASCAL NEAR int unbindchar(c) int c; /* command key to unbind */ @@@@ -359,7 +363,7 @@@@ BUFFER *bp; /* buffer to unbind all keys into it with view mode */ -PASCAL NEAR desbind(f, n) +PASCAL NEAR int desbind(f, n) int f,n; /* prefix flag and argument */ @@@@ -367,7 +371,7 @@@@ int f,n; /* prefix flag and argument */ return(buildlist(TRUE, "")); } -PASCAL NEAR apro(f, n) /* Apropos (List functions that match a substring) */ +PASCAL NEAR int apro(f, n) /* Apropos (List functions that match a substring) */ int f,n; /* prefix flag and argument */ @@@@ -383,7 +387,7 @@@@ int f,n; /* prefix flag and argument */ return(buildlist(FALSE, mstring)); } -PASCAL NEAR buildlist(type, mstring) /* build a binding list (limited or full) */ +PASCAL NEAR int buildlist(type, mstring) /* build a binding list (limited or full) */ int type; /* true = full list, false = partial list */ char *mstring; /* match string if a partial list */ @@@@ -519,7 +523,7 @@@@ bfail: /* and on to the next buffer */ return(TRUE); } -PASCAL NEAR strinc(source, sub) /* does source include sub? */ +PASCAL NEAR int strinc(source, sub) /* does source include sub? */ char *source; /* string to search in */ char *sub; /* substring to look for */ @@@@ -579,12 +583,12 @@@@ int mflag; /* going for a meta sequence? /* execute the startup file */ -PASCAL NEAR startup(sfname) +PASCAL NEAR int startup(sfname) char *sfname; /* name of startup file (null if default) */ { - char *fname; /* resulting file name to execute */ + CONST char *fname; /* resulting file name to execute */ char name[NSTRING]; /* name with extention */ /* look up the startup file */ @@@@ -623,29 +627,31 @@@@ char *sfname; /* name of startup file (n directories in table from EPATH.H */ -char *PASCAL NEAR flook(fname, hflag) +CONST char *PASCAL NEAR flook(fname, hflag) -char *fname; /* base file name to search for */ +CONST char *fname; /* base file name to search for */ int hflag; /* Look in the HOME environment variable first? */ { register char *home; /* path to home directory */ register char *path; /* environmental PATH variable */ - register char *sp; /* pointer into path spec */ + register CONST char *sp1; /* pointer into path spec */ + register char *sp2; /* pointer into path spec */ register int i; /* index */ static char fspec[NFILEN]; /* full path spec to search */ - + char patha[NFILEN]; + /* if we have an absolute path.. check only there! */ - sp = fname; - while (*sp) { - if (*sp == ':' || *sp == '\\' || *sp == '/') { + sp1 = fname; + while (*sp1) { + if (*sp1 == ':' || *sp1 == '\\' || *sp1 == '/') { if (ffropen(fname) == FIOSUC) { ffclose(); return(fname); } else return(NULL); } - ++sp; + ++sp1; } #if ENVFUNC @@@@ -689,25 +695,27 @@@@ int hflag; /* Look in the HOME environme #if OS2 path = getenv("DPATH"); #else - path = getenv("PATH"); + strncpy(patha, getenv("PATH"), NFILEN - 25); + strcat(patha, ":%%PREFIX%%/share/uemacs"); #endif #endif + path = patha; if (path != NULL) while (*path) { /* build next possible file spec */ - sp = fspec; + sp2 = fspec; #if TOS while (*path && (*path != PATHCHR) && (*path != ',')) #else while (*path && (*path != PATHCHR)) #endif - *sp++ = *path++; + *sp2++ = *path++; /* add a terminating dir separator if we need it */ - if ((sp != fspec) && (*(sp-1) != DIRSEPCHAR)) - *sp++ = DIRSEPCHAR; - *sp = 0; + if ((sp2 != fspec) && (*(sp2-1) != DIRSEPCHAR)) + *sp2++ = DIRSEPCHAR; + *sp2 = 0; strcat(fspec, fname); /* and try it out */ @@@@ -918,12 +926,13 @@@@ int index; /* index of name to fetch out the ^A form. */ -unsigned int PASCAL NEAR stock(keyname) +unsigned int PASCAL NEAR stock(keyname_c) -unsigned char *keyname; /* name of key to translate to Command key form */ +char *keyname_c; /* name of key to translate to Command key form */ { register unsigned int c; /* key sequence to return */ + unsigned char *keyname = (unsigned char *)keyname_c; /* parse it up */ c = 0; @@@@ -990,12 +999,12 @@@@ unsigned char *keyname; /* name of key t return(c); } -char *PASCAL NEAR transbind(skey) /* string key name to binding name.... */ +CONST char *PASCAL NEAR transbind(skey) /* string key name to binding name.... */ char *skey; /* name of key to get binding for */ { - char *bindname; + CONST char *bindname; bindname = getfname(getbind(stock(skey))); if (bindname == NULL) @ 1.2 log @Adapt this package to NetBSD. @ text @d1 1 a1 1 $NetBSD$ d3 149 a151 4 --- src/bind.c.orig Sun Nov 19 03:09:20 1995 +++ src/bind.c Wed Mar 25 15:00:37 1998 @@@@ -634,7 +634,8 @@@@ register char *sp; /* pointer into path spec */ d158 18 a175 3 sp = fname; while (*sp) { @@@@ -689,9 +690,11 @@@@ d188 52 @ 1.1 log @Initial revision @ text @d1 2 @ 1.1.1.1 log @Import "uemacs" port from FreeBSD ports collection: A full screen editor @ text @@