FreeBSD Bugzilla – Attachment 207740 Details for
Bug 240770
editors/hnb: Fixes runtime segfaults in amd64 platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix runtime segfaults in amd64 platform
hnb.amd64-fix.patch (text/plain), 74.56 KB, created by
Santhosh Raju
on 2019-09-23 12:57:30 UTC
(
hide
)
Description:
Patch to fix runtime segfaults in amd64 platform
Filename:
MIME Type:
Creator:
Santhosh Raju
Created:
2019-09-23 12:57:30 UTC
Size:
74.56 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 510950) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= hnb > PORTVERSION= 1.9.17 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= editors > MASTER_SITES= SF > >@@ -11,16 +11,12 @@ > COMMENT= Hierarchical NoteBook a data organizer > > LICENSE= GPLv2+ >-LICENSE_FILE= ${WRKSRC}/../COPYING >+LICENSE_FILE= ${WRKSRC}/COPYING > >-ONLY_FOR_ARCHS= i386 >+USES= gmake > >-USES= gmake >-ALL_TARGET= # empty > MAKE_JOBS_UNSAFE= yes > >-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src >- > PLIST_FILES= bin/${PORTNAME} \ > man/man1/${PORTNAME}.1.gz > PORTDOCS= * >@@ -29,15 +25,18 @@ > > post-patch: > @${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS+=|; s|make|$${MAKE}|' \ >- ${WRKSRC}/Makefile >- @${REINPLACE_CMD} -e '/^CFLAGS/d' ${WRKSRC}/libcli/Makefile >+ ${WRKSRC}/src/Makefile >+ @${REINPLACE_CMD} -e '/^CFLAGS/d' ${WRKSRC}/src/libcli/Makefile > >+do-build: >+ cd ${WRKSRC}/src && ${GMAKE} >+ > do-install: >- ${INSTALL_PROGRAM} ${WRKSRC}/hnb ${STAGEDIR}${PREFIX}/bin >- ${INSTALL_MAN} ${WRKSRC}/../doc/hnb.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 >+ ${INSTALL_PROGRAM} ${WRKSRC}/src/hnb ${STAGEDIR}${PREFIX}/bin >+ ${INSTALL_MAN} ${WRKSRC}/doc/hnb.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 > ${MKDIR} ${STAGEDIR}${DOCSDIR} > .for FILE in Documentation.hnb Documentation.html hnbrc >- ${INSTALL_DATA} ${WRKSRC}/../doc/${FILE} ${STAGEDIR}${DOCSDIR} >+ ${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${STAGEDIR}${DOCSDIR} > .endfor > > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 510950) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >+TIMESTAMP = 1567488547 > SHA256 (hnb-1.9.17.tar.gz) = c233c00aaef5b7fb93759d7888c885f99f40aec689a7f3e0d5d8b5797bf80cd4 > SIZE (hnb-1.9.17.tar.gz) = 143700 >Index: files/patch-src_Makefile >=================================================================== >--- files/patch-src_Makefile (nonexistent) >+++ files/patch-src_Makefile (working copy) >@@ -0,0 +1,33 @@ >+Added the curses library path for ports. >+ >+--- src/Makefile.orig 2003-03-13 01:09:46 UTC >++++ src/Makefile >+@@ -1,5 +1,5 @@ >+-LIBS=-lncurses libcli/libcli.a >+-CFLAGS=-I.. -Ilibcli -DHAVE_CONFIG_H -Wall -pedantic -g >++LIBS=-Wl,-R${PREFIX}/lib -lncurses libcli/libcli.a >++CFLAGS+=-I.. -Ilibcli -DHAVE_CONFIG_H -Wall -pedantic -g >+ >+ CFILES=$(wildcard *.c) >+ OBJS=$(patsubst %.c,%.o,$(CFILES)) >+@@ -11,9 +11,9 @@ hnb: libcli/libcli.a Makefile $(OBJS) init_subsystems. >+ $(CC) -o hnb $(OBJS) $(LIBS) $(CFLAGS) >+ # strip hnb >+ libcli/libcli.a: libcli/*.c >+- (cd libcli;make libcli.a) >++ (cd libcli;${MAKE} libcli.a) >+ libcli/libcli_p.a: libcli/*.c >+- (cd libcli;make libcli_p.a) >++ (cd libcli;${MAKE} libcli_p.a) >+ init_subsystems.c: *.c >+ echo "/* this file is autogenerated, do not edit */">init_subsystems.c >+ cat *.c | grep "^\!init_" | sort | sed -e "s/^\!/void /g">>init_subsystems.c >+@@ -23,7 +23,7 @@ init_subsystems.c: *.c >+ echo "}">>init_subsystems.c >+ clean: >+ rm -f xml_debug hnb $(OBJS) *~ cli_*.inc >+- (cd libcli;make clean) >++ (cd libcli;${MAKE} clean) >+ hnb_p: *.c libcli/libcli_p.a init_subsystems.c >+ $(CC) -o hnb_p *.c -pg -lncurses_p libcli/libcli_p.a -I.. -Ilibcli -DHAVE_CONFIG_H >+ > >Property changes on: files/patch-src_Makefile >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_actions.c >=================================================================== >--- files/patch-src_actions.c (nonexistent) >+++ files/patch-src_actions.c (working copy) >@@ -0,0 +1,53 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/actions.c.orig 2003-03-14 01:06:36 UTC >++++ src/actions.c >+@@ -32,7 +32,7 @@ static char address[1024]="";*/ >+ static char web_command[255] = "galeon -n *"; >+ static char mail_command[255] = "rxvt -rv +sb -e mutt *"; >+ >+-static int cmd_system(int argc, char **argv, void *data){ >++static uint64_t cmd_system(int argc, char **argv, void *data){ >+ Node *pos=(Node *)data; >+ int ui_was_inited = ui_inited; >+ if (argc>1) { >+@@ -42,7 +42,7 @@ static int cmd_system(int argc, char **argv, void *dat >+ if (ui_was_inited) >+ ui_init (); >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ static int action_node (Node *node) >+@@ -136,21 +136,21 @@ static int action_node (Node *node) >+ * url/email address substring,.. and launches an app based on that? >+ * >+ */ >+-static int cmd_action (int argc, char **argv, void *data) >++static uint64_t cmd_action (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ Node *node = node_right (pos); >+ >+ while (node) { >+ if (!action_node (node)) >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ node = node_down (node); >+ } >+ if (!action_node (pos)) { >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } else { >+ cli_outfunf ("nothing to do"); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /*** > >Property changes on: files/patch-src_actions.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_cal.c >=================================================================== >--- files/patch-src_cal.c (nonexistent) >+++ files/patch-src_cal.c (working copy) >@@ -0,0 +1,59 @@ >+1. The <stdlib.h> header uses the word bufsize as a parameter name in >+ a function prototype. The "file.h" header #defines bufsize to 4096, >+ which leads to a parser error. >+2. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+3. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/cal.c.orig 2003-03-09 18:18:01 UTC >++++ src/cal.c >+@@ -19,15 +19,15 @@ >+ */ >+ >+ /**************/ >++#include <stdlib.h> >++#include <stdio.h> >++#include <time.h> >++ >+ #include "tree.h" >+ #include "cli.h" >+ #include "ui.h" >+ #include "file.h" >+ >+-#include <stdlib.h> >+-#include <stdio.h> >+-#include <time.h> >+- >+ static char *const wday[] = >+ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", " "}; >+ >+@@ -35,7 +35,7 @@ static char *const mname[] = { >+ "", "January", "February", "March", "April", "May" ,"June", "July", >+ "August", "September", "October", "November" , "December"}; >+ >+-static int insert_cal(int argc, char **argv, void *data){ >++static uint64_t insert_cal(int argc, char **argv, void *data){ >+ Node *pos=(void *)data; >+ >+ int year; >+@@ -44,7 +44,7 @@ static int insert_cal(int argc, char **argv, void *dat >+ >+ if( (argc!=3) || (atoi(argv[1])>12 )){ >+ cli_outfunf("usage: %s <month> <year>", argv[0]); >+- return (int)data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ month=atoi(argv[1]); >+@@ -96,7 +96,7 @@ static int insert_cal(int argc, char **argv, void *dat >+ } >+ } >+ >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_cal.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_cli__macro.c >=================================================================== >--- files/patch-src_cli__macro.c (nonexistent) >+++ files/patch-src_cli__macro.c (working copy) >@@ -0,0 +1,45 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/cli_macro.c.orig 2003-03-09 20:44:27 UTC >++++ src/cli_macro.c >+@@ -80,7 +80,7 @@ static Node *do_macro(MacroT *macro, Node *pos){ >+ return pos; >+ } >+ >+-static int cmd_macro (int argc, char **argv, void *data) >++static uint64_t cmd_macro (int argc, char **argv, void *data) >+ { >+ Node *pos=(Node *)data; >+ if(argc==1){ >+@@ -88,7 +88,7 @@ static int cmd_macro (int argc, char **argv, void *dat >+ } else if(argc==2){ >+ MacroT *tmacro=lookup_macro(argv[1]); >+ if(tmacro){ >+- return (int)do_macro(tmacro,pos); >++ return PTR_TO_UINT64(do_macro(tmacro,pos)); >+ } else { >+ cli_outfunf("no such macro defined '%s'",argv[1]); >+ } >+@@ -97,7 +97,7 @@ static int cmd_macro (int argc, char **argv, void *dat >+ if(!strcmp(argv[1],"define") ){ >+ if(lookup_macro(argv[2])){ >+ cli_outfunf("error macro %s already exist,.. this might turn out badly,.. " ,argv[2]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } else { >+ MacroT *tmacro; >+ if(!macro){ >+@@ -119,7 +119,7 @@ static int cmd_macro (int argc, char **argv, void *dat >+ >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ > >Property changes on: files/patch-src_cli__macro.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_clipboard.c >=================================================================== >--- files/patch-src_clipboard.c (nonexistent) >+++ files/patch-src_clipboard.c (working copy) >@@ -0,0 +1,53 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/clipboard.c.orig 2003-03-09 17:42:20 UTC >++++ src/clipboard.c >+@@ -29,7 +29,7 @@ >+ >+ static Node *clipboard = NULL; >+ >+-static int copy_cmd (int argc,char **argv, void *data) >++static uint64_t copy_cmd (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -39,10 +39,10 @@ static int copy_cmd (int argc,char **argv, void *data) >+ clipboard = node_new (); >+ >+ clipboard = tree_duplicate (pos, clipboard); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int cut_cmd (int argc,char **argv, void *data) >++static uint64_t cut_cmd (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -53,10 +53,10 @@ static int cut_cmd (int argc,char **argv, void *data) >+ >+ clipboard = tree_duplicate (pos, clipboard); >+ pos = node_remove (pos); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int paste_cmd (int argc,char **argv, void *data) >++static uint64_t paste_cmd (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -68,7 +68,7 @@ static int paste_cmd (int argc,char **argv, void *data >+ temp = node_insert_down (pos); >+ tree_duplicate (clipboard, temp); >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_clipboard.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_evilloop.c >=================================================================== >--- files/patch-src_evilloop.c (nonexistent) >+++ files/patch-src_evilloop.c (working copy) >@@ -0,0 +1,22 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/evilloop.c.orig 2003-03-14 04:40:35 UTC >++++ src/evilloop.c >+@@ -122,10 +122,10 @@ static char *keep_inputbuf[]={ >+ >+ int quit_hnb=0; >+ >+-static int cmd_quit(int argc,char **argv,void *data){ >++static uint64_t cmd_quit(int argc,char **argv,void *data){ >+ Node *pos=(Node *)data; >+ quit_hnb=1; >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_evilloop.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_expanded.c >=================================================================== >--- files/patch-src_expanded.c (nonexistent) >+++ files/patch-src_expanded.c (working copy) >@@ -0,0 +1,70 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/expanded.c.orig 2003-03-13 21:31:18 UTC >++++ src/expanded.c >+@@ -18,16 +18,18 @@ >+ * Temple Place - Suite 330, Boston, MA 02111-1307, USA. >+ */ >+ >++#include <string.h> >++ >+ #include "tree.h" >+ #include "cli.h" >+-#define NULL 0 >++//#define NULL 0 >+ >+ #include "evilloop.h" >+ #include "ctype.h" >+ #include "ui_binding.h" >+ >+ >+-static int cmd_expand (int argc,char **argv, void *data) >++static uint64_t cmd_expand (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ if(argc==1){ >+@@ -36,7 +38,7 @@ static int cmd_expand (int argc,char **argv, void *dat >+ inputbuf[strlen (inputbuf) + 1] = 0; >+ inputbuf[strlen (inputbuf)] = lastbinding->key; >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ node_setflag(pos,F_expanded,1); >+ } else if((!strcmp(argv[1],"-a"))||(!strcmp(argv[1],"--all"))){ >+@@ -48,10 +50,10 @@ static int cmd_expand (int argc,char **argv, void *dat >+ } >+ cli_outfun ("expanded all nodes"); >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int cmd_collapse (int argc,char **argv, void *data) >++static uint64_t cmd_collapse (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ if(argc==1){ >+@@ -60,7 +62,7 @@ static int cmd_collapse (int argc,char **argv, void *d >+ inputbuf[strlen (inputbuf) + 1] = 0; >+ inputbuf[strlen (inputbuf)] = lastbinding->key; >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ node_setflag(pos,F_expanded,0); >+ } else if((!strcmp(argv[1],"-a"))||(!strcmp(argv[1],"--all"))){ >+@@ -73,7 +75,7 @@ static int cmd_collapse (int argc,char **argv, void *d >+ cli_outfun ("collapsed all nodes"); >+ } >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_expanded.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file.c >=================================================================== >--- files/patch-src_file.c (nonexistent) >+++ files/patch-src_file.c (working copy) >@@ -0,0 +1,40 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file.c.orig 2003-03-13 22:55:13 UTC >++++ src/file.c >+@@ -150,7 +150,7 @@ int file_check (char *filename) >+ } >+ >+ >+-static int cmd_save (int argc,char **argv, void *data) >++static uint64_t cmd_save (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -167,10 +167,10 @@ static int cmd_save (int argc,char **argv, void *data) >+ docmd (node_root (pos), buf); >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int cmd_revert (int argc,char **argv, void *data) >++static uint64_t cmd_revert (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -185,7 +185,7 @@ static int cmd_revert (int argc,char **argv, void *dat >+ pos=docmd (pos, buf); >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ > >Property changes on: files/patch-src_file.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__ascii.c >=================================================================== >--- files/patch-src_file__ascii.c (nonexistent) >+++ files/patch-src_file__ascii.c (working copy) >@@ -0,0 +1,63 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_ascii.c.orig 2003-03-14 00:37:39 UTC >++++ src/file_ascii.c >+@@ -34,7 +34,7 @@ >+ >+ static int ascii_margin = -1; >+ >+-static int import_ascii (int argc, char **argv, void *data) >++static uint64_t import_ascii (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -46,7 +46,7 @@ static int import_ascii (int argc, char **argv, void * >+ file = fopen (filename, "r"); >+ if (file == NULL) { >+ cli_outfunf ("ascii import, unable to open \"%s\"", filename); >+- return (int) (node); >++ return PTR_TO_UINT64 (node); >+ } >+ >+ init_import (&ist, node); >+@@ -73,7 +73,7 @@ static int import_ascii (int argc, char **argv, void * >+ cli_outfunf ("ascii import, imported \"%s\"", filename); >+ >+ >+- return (int) (node); >++ return PTR_TO_UINT64 (node); >+ } >+ >+ static void ascii_export_node (FILE * file, int level, int flags, char *data) >+@@ -95,7 +95,7 @@ static void ascii_export_node (FILE * file, int level, >+ } >+ } >+ >+-static int export_ascii (int argc, char **argv, void *data) >++static uint64_t export_ascii (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -110,7 +110,7 @@ static int export_ascii (int argc, char **argv, void * >+ file = fopen (filename, "w"); >+ if (!file) { >+ cli_outfunf ("ascii export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ startlevel = nodes_left (node); >+ >+@@ -130,7 +130,7 @@ static int export_ascii (int argc, char **argv, void * >+ >+ cli_outfunf ("ascii export, wrote output to \"%s\"", filename); >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ > >Property changes on: files/patch-src_file__ascii.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__help.c >=================================================================== >--- files/patch-src_file__help.c (nonexistent) >+++ files/patch-src_file__help.c (working copy) >@@ -0,0 +1,49 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_help.c.orig 2003-03-14 00:37:23 UTC >++++ src/file_help.c >+@@ -42,7 +42,7 @@ static char *helpquote[]={ >+ >+ /* *INDENT-ON* */ >+ >+-static int export_help (int argc, char **argv, void *data) >++static uint64_t export_help (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -55,7 +55,7 @@ static int export_help (int argc, char **argv, void *d >+ if (!file) { >+ cli_outfunf ("help export, unable to open \"%s\"", filename); >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ startlevel = nodes_left (node); >+ >+@@ -86,10 +86,10 @@ static int export_help (int argc, char **argv, void *d >+ fclose (file); >+ >+ cli_outfunf ("help export, wrote data to \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+-static int import_help (int argc, char **argv, void *data) >++static uint64_t import_help (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ import_state_t ist; >+@@ -100,7 +100,7 @@ static int import_help (int argc, char **argv, void *d >+ if (node_getflag (node, F_temp)) >+ node = node_remove (node); >+ >+- return (int) (node); >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* > >Property changes on: files/patch-src_file__help.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__hnb.c >=================================================================== >--- files/patch-src_file__hnb.c (nonexistent) >+++ files/patch-src_file__hnb.c (working copy) >@@ -0,0 +1,67 @@ >+1. Replaced int with uint64_t. >+2. Replaced pointer to int type cast with a macro to help >+ convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_hnb.c.orig 2003-03-14 00:37:13 UTC >++++ src/file_hnb.c >+@@ -105,7 +105,7 @@ static void hnb_export_nodes (FILE * file, Node *node, >+ } >+ } >+ >+-static int export_hnb (int argc, char **argv, void *data) >++static uint64_t export_hnb (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc>=2?argv[1]:""; >+@@ -118,7 +118,7 @@ static int export_hnb (int argc, char **argv, void *da >+ >+ if (!file) { >+ cli_outfunf ("hnb export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ fprintf (file, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><?pos=\"%s\"?>\n\ >+@@ -143,11 +143,11 @@ static int export_hnb (int argc, char **argv, void *da >+ >+ cli_outfunf ("hnb export, wrote data to \"%s\"", filename); >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ >+-static int import_hnb (int argc, char **argv, void *data) >++static uint64_t import_hnb (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -170,7 +170,7 @@ static int import_hnb (int argc, char **argv, void *da >+ file = fopen (filename, "r"); >+ if (!file) { >+ cli_outfunf ("hnb import, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ s = xml_tok_init (file); >+ init_import (&ist, node); >+@@ -180,7 +180,7 @@ static int import_hnb (int argc, char **argv, void *da >+ cli_outfunf ("hnb import error, parsing og '%s' line:%i, %s", filename, >+ s->line_no, rdata); >+ fclose (file); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ if (in_tree) { >+ if (type == t_tag && !strcmp (rdata, "node")) { >+@@ -263,7 +263,7 @@ static int import_hnb (int argc, char **argv, void *da >+ >+ xml_tok_cleanup (s); >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* > >Property changes on: files/patch-src_file__hnb.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__html.c >=================================================================== >--- files/patch-src_file__html.c (nonexistent) >+++ files/patch-src_file__html.c (working copy) >@@ -0,0 +1,63 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_html.c.orig 2003-03-14 00:36:52 UTC >++++ src/file_html.c >+@@ -52,7 +52,7 @@ static char *htmlquote[]={ >+ /* *INDENT-ON* */ >+ >+ >+-static int export_html (int argc, char **argv, void *data) >++static uint64_t export_html (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -67,7 +67,7 @@ static int export_html (int argc, char **argv, void *d >+ file = fopen (filename, "w"); >+ if (!file) { >+ cli_outfunf ("html export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ startlevel = nodes_left (node); >+@@ -130,7 +130,7 @@ static int export_html (int argc, char **argv, void *d >+ fclose (file); >+ >+ cli_outfunf ("html export, saved output in \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ static void htmlcss_export_nodes (FILE * file, Node *node, int level) >+@@ -162,7 +162,7 @@ static void htmlcss_export_nodes (FILE * file, Node *n >+ } >+ >+ >+-static int export_htmlcss (int argc, char **argv, void *data) >++static uint64_t export_htmlcss (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -174,7 +174,7 @@ static int export_htmlcss (int argc, char **argv, void >+ file = fopen (filename, "w"); >+ if (!file) { >+ cli_outfunf ("html export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ fprintf (file, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ >+@@ -224,7 +224,7 @@ div.level2 {\n\ >+ fclose (file); >+ >+ cli_outfunf ("html css export, saved output in \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* > >Property changes on: files/patch-src_file__html.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__opml.c >=================================================================== >--- files/patch-src_file__opml.c (nonexistent) >+++ files/patch-src_file__opml.c (working copy) >@@ -0,0 +1,67 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_opml.c.orig 2003-03-14 00:36:39 UTC >++++ src/file_opml.c >+@@ -90,7 +90,7 @@ static void opml_export_nodes (FILE * file, Node *node >+ } >+ } >+ >+-static int export_opml (int argc, char **argv, void *data) >++static uint64_t export_opml (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc>=2?argv[1]:""; >+@@ -103,7 +103,7 @@ static int export_opml (int argc, char **argv, void *d >+ >+ if (!file) { >+ cli_outfunf ("opml export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ fprintf (file, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><?pos=\"%s\"?>\n\ >+@@ -133,10 +133,10 @@ static int export_opml (int argc, char **argv, void *d >+ >+ cli_outfunf ("opml export, wrote data to \"%s\"", filename); >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+-static int import_opml (int argc, char **argv, void *data) >++static uint64_t import_opml (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -154,7 +154,7 @@ static int import_opml (int argc, char **argv, void *d >+ file = fopen (filename, "r"); >+ if (!file) { >+ cli_outfunf ("opml import, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ s = xml_tok_init (file); >+ init_import (&ist, node); >+@@ -164,7 +164,7 @@ static int import_opml (int argc, char **argv, void *d >+ cli_outfunf ("opml import error, parsing og '%s', line:%i %s", filename, >+ s->line_no, rdata); >+ fclose (file); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ if (in_body) { >+ if (type == t_tag && !strcmp (rdata, "outline")) { >+@@ -208,7 +208,7 @@ static int import_opml (int argc, char **argv, void *d >+ >+ cli_outfunf ("opml import - imported \"%s\" %i lines", filename, s->line_no); >+ xml_tok_cleanup (s); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ > >Property changes on: files/patch-src_file__opml.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__ps.c >=================================================================== >--- files/patch-src_file__ps.c (nonexistent) >+++ files/patch-src_file__ps.c (working copy) >@@ -0,0 +1,36 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_ps.c.orig 2003-03-14 00:36:23 UTC >++++ src/file_ps.c >+@@ -60,7 +60,7 @@ static void ps_export_node (FILE * file, int level, in >+ free(quoted); >+ } >+ >+-static int export_ps (int argc, char **argv, void *data) >++static uint64_t export_ps (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -75,7 +75,7 @@ static int export_ps (int argc, char **argv, void *dat >+ file = fopen (filename, "w"); >+ if (!file) { >+ cli_outfunf ("postscript export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ startlevel = nodes_left (node); >+ >+@@ -225,7 +225,7 @@ close\n\ >+ cli_outfunf ("postscript export, saved output to \"%s\"", filename); >+ if (file != stdout) >+ fclose (file); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* > >Property changes on: files/patch-src_file__ps.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_file__xml.c >=================================================================== >--- files/patch-src_file__xml.c (nonexistent) >+++ files/patch-src_file__xml.c (working copy) >@@ -0,0 +1,72 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/file_xml.c.orig 2003-03-14 00:36:08 UTC >++++ src/file_xml.c >+@@ -147,7 +147,7 @@ static void xml_export_nodes (FILE * file, Node *node, >+ } >+ } >+ >+-static int export_xml (int argc, char **argv, void *data) >++static uint64_t export_xml (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -159,7 +159,7 @@ static int export_xml (int argc, char **argv, void *da >+ file = fopen (filename, "w"); >+ if (!file) { >+ cli_outfunf ("xml export, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ xml_export_nodes (file, node, 0); >+@@ -170,7 +170,7 @@ static int export_xml (int argc, char **argv, void *da >+ cli_outfunf ("xml export, wrote data to \"%s\"", filename); >+ >+ >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* joins up tags with data if there is data as the first child >+@@ -202,7 +202,7 @@ static Node *xml_cuddle_nodes (Node *node) >+ } >+ >+ >+-static int import_xml (int argc, char **argv, void *data) >++static uint64_t import_xml (int argc, char **argv, void *data) >+ { >+ Node *node = (Node *) data; >+ char *filename = argc==2?argv[1]:""; >+@@ -221,7 +221,7 @@ static int import_xml (int argc, char **argv, void *da >+ file = fopen (filename, "r"); >+ if (!file) { >+ cli_outfunf ("xml import, unable to open \"%s\"", filename); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ s = xml_tok_init (file); >+ init_import (&ist, node); >+@@ -231,7 +231,7 @@ static int import_xml (int argc, char **argv, void *da >+ cli_outfunf ("xml import error, parsing og '%s', line:%i %s", filename, >+ s->line_no,rdata); >+ fclose (file); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ switch (type) { >+@@ -328,7 +328,7 @@ static int import_xml (int argc, char **argv, void *da >+ >+ cli_outfunf ("xml import - imported \"%s\" %i lines", filename, s->line_no); >+ xml_tok_cleanup (s); >+- return (int) node; >++ return PTR_TO_UINT64(node); >+ } >+ >+ /* > >Property changes on: files/patch-src_file__xml.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_libcli_cli.c >=================================================================== >--- files/patch-src_libcli_cli.c (nonexistent) >+++ files/patch-src_libcli_cli.c (working copy) >@@ -0,0 +1,102 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/libcli/cli.c.orig 2003-03-14 02:32:38 UTC >++++ src/libcli/cli.c >+@@ -113,7 +113,7 @@ static int item_matches (const char *itemname); >+ >+ typedef struct ItemT { >+ char *name; /* what the user types */ >+- int (*func) (int argc,char **argv, void *data); /* function that is the command */ >++ uint64_t (*func) (int argc,char **argv, void *data); /* function that is the command */ >+ int *integer; /* pointer to integer (set to NULL if string) */ >+ char *string; /* pointer to string (set to NULL if integer) */ >+ char *usage; /* helptext for this command */ >+@@ -130,7 +130,7 @@ static ItemT *items = NULL; >+ void >+ cli_add_item (char *name, >+ int *integer, char *string, >+- int (*func) (int argc,char **argv, void *data), char *usage) >++ uint64_t (*func) (int argc,char **argv, void *data), char *usage) >+ { >+ ItemT *titem = items; >+ >+@@ -191,8 +191,8 @@ void cli_add_help(char *name, char *helptext){ >+ } >+ >+ >+-static int help (int argc,char **argv, void *data); >+-static int vars (int argc,char **argv, void *data); >++static uint64_t help (int argc,char **argv, void *data); >++static uint64_t vars (int argc,char **argv, void *data); >+ >+ static int inited = 0; >+ >+@@ -224,13 +224,13 @@ static void init_cli (void) >+ >+ int cli_calllevel=0; >+ >+-int cli_docmd (char *commandline, void *data) >++uint64_t cli_docmd (char *commandline, void *data) >+ { >+ int largc=0; >+ char **largv; >+ >+ ItemT *titem = items; >+- int ret=(int)data; >++ uint64_t ret=(uint64_t)data; >+ cli_calllevel++; >+ >+ if (cli_precmd) >+@@ -382,7 +382,7 @@ char *cli_complete (const char *commandline) >+ >+ /* internal commands */ >+ >+-static int help (int argc,char **argv, void *data) >++static uint64_t help (int argc,char **argv, void *data) >+ { >+ if (argc == 1) { /* show all help */ >+ ItemT *titem = items; >+@@ -410,17 +410,17 @@ static int help (int argc,char **argv, void *data) >+ cli_outfun (""); >+ cli_outfun(titem->help); >+ } >+- return(int)data; >++ return(uint64_t)data; >+ } >+ } >+ titem = titem->next; >+ } >+ cli_outfunf ("unknown command '%s'", argv[1]); >+ } >+- return(int)data; >++ return(uint64_t)data; >+ } >+ >+-static int vars (int argc, char **argv, void *data) >++static uint64_t vars (int argc, char **argv, void *data) >+ { >+ ItemT *titem = items; >+ >+@@ -446,7 +446,7 @@ static int vars (int argc, char **argv, void *data) >+ >+ cli_outfunf ("----------------"); >+ cli_outfunf ("to change a variable: \"variablename newvalue\""); >+- return(int)data; >++ return(uint64_t)data; >+ } >+ >+ char *cli_getstring(char *variable){ >+@@ -467,7 +467,7 @@ char *cli_getstring(char *variable){ >+ >+ #include <stdio.h> >+ >+-int cli_load_file(char *filename){ >++uint64_t cli_load_file(char *filename){ >+ char buf[255]; >+ FILE *file; >+ > >Property changes on: files/patch-src_libcli_cli.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_libcli_cli.h >=================================================================== >--- files/patch-src_libcli_cli.h (nonexistent) >+++ files/patch-src_libcli_cli.h (working copy) >@@ -0,0 +1,42 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/libcli/cli.h.orig 2003-03-12 12:20:05 UTC >++++ src/libcli/cli.h >+@@ -29,7 +29,10 @@ >+ #define LIBCLI_H >+ >+ #include <stdarg.h> >++#include <stdint.h> >+ >++#define PTR_TO_UINT64(x) (uint64_t)(uintptr_t)(x) >++ >+ void argv_sanity(void); >+ >+ void cli_split(char *orig, char *head, char **tail); >+@@ -41,7 +44,7 @@ void cli_cleanup(void); >+ void >+ cli_add_item (char *name, >+ int *integer, char *string, >+- int (*func) (int argc,char **argv, void *data), char *usage); >++ uint64_t (*func) (int argc,char **argv, void *data), char *usage); >+ >+ #define cli_add_int(name,integer,usage)\ >+ cli_add_item (name, integer, NULL, NULL, usage) >+@@ -52,10 +55,10 @@ cli_add_item (char *name, >+ #define cli_add_command(name,func,usage) \ >+ cli_add_item(name, NULL, NULL, func, usage) >+ >+-int cli_load_file(char *filename); >++uint64_t cli_load_file(char *filename); >+ >+ char *cli_complete (const char *commandline); /* returns a completed commandline */ >+-int cli_docmd (char *commandline, void *data); /* run commandline */ >++uint64_t cli_docmd (char *commandline, void *data); /* run commandline */ >+ >+ >+ extern void (*cli_outfun) (char *); /* the outputting function > >Property changes on: files/patch-src_libcli_cli.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_libcli_cli__tokenize.c >=================================================================== >--- files/patch-src_libcli_cli__tokenize.c (nonexistent) >+++ files/patch-src_libcli_cli__tokenize.c (working copy) >@@ -0,0 +1,22 @@ >+Replaced char * with unsigned char * since this is how the function >+is used, also prevents compiler from spweing out warnings. >+ >+--- src/libcli/cli_tokenize.c.orig 2003-03-14 03:23:22 UTC >++++ src/libcli/cli_tokenize.c >+@@ -68,14 +68,14 @@ typedef struct { >+ >+ #ifdef TESTit >+ #define cli_getstring dummy_get_variable >+-static char * dummy_get_variable(char *name){ >++static char * dummy_get_variable(unsigned char *name){ >+ static char *dummy="<variable expansion not implemented yet>"; >+ return dummy; >+ } >+ #endif >+ >+ #ifndef TESTit >+-char *cli_getstring(char *variable); >++char *cli_getstring(unsigned char *variable); >+ #endif >+ >+ static rule_entry state_table[s_end][max_rules]; > >Property changes on: files/patch-src_libcli_cli__tokenize.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_node.c >=================================================================== >--- files/patch-src_node.c (nonexistent) >+++ files/patch-src_node.c (working copy) >@@ -0,0 +1,77 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/node.c.orig 2003-03-09 17:33:35 UTC >++++ src/node.c >+@@ -138,48 +138,48 @@ void node_unset (Node *node, char *name) >+ #include <stdio.h> >+ >+ >+-int cmd_att_set (int argc, char **argv, void *data) >++uint64_t cmd_att_set (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+ if(argc!=3){ >+ cli_outfunf("usage: %s <attribute> <value>",argv[0]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ node_set (pos, argv[1], argv[2]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-int cmd_att_get (int argc, char **argv, void *data) >++uint64_t cmd_att_get (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ char *cdata; >+ >+ if(argc!=2){ >+ cli_outfunf("usage: %s <attribute>",argv[0]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ cdata = node_get (pos, argv[1]); >+ >+ if (cdata) >+ cli_outfun (cdata); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-int cmd_att_clear (int argc, char **argv, void *data) >++uint64_t cmd_att_clear (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ if(argc!=2){ >+ cli_outfunf("usage: %s <attribute>",argv[0]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ node_unset (pos, argv[1]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-int cmd_att_list (int argc,char **argv, void *data) >++uint64_t cmd_att_list (int argc,char **argv, void *data) >+ { >+ Node_AttItem *att; >+ Node *pos = (Node *) data; >+@@ -189,7 +189,7 @@ int cmd_att_list (int argc,char **argv, void *data) >+ cli_outfunf ("%s: [%s]", att->name, att->data); >+ att = att->next; >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_node.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_query.c >=================================================================== >--- files/patch-src_query.c (nonexistent) >+++ files/patch-src_query.c (working copy) >@@ -0,0 +1,27 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/query.c.orig 2003-03-14 02:29:13 UTC >++++ src/query.c >+@@ -27,7 +27,7 @@ >+ >+ static char query[100]; >+ >+-static int getquery_cmd (int argc, char **argv, void *data) >++static uint64_t getquery_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -36,7 +36,7 @@ static int getquery_cmd (int argc, char **argv, void * >+ ui_getstr (argv[1], &query[0]); >+ else >+ ui_getstr ("enter string", &query[0]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_query.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_search.c >=================================================================== >--- files/patch-src_search.c (nonexistent) >+++ files/patch-src_search.c (working copy) >@@ -0,0 +1,52 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/search.c.orig 2003-03-14 02:19:21 UTC >++++ src/search.c >+@@ -28,7 +28,7 @@ >+ >+ /************** search ************************/ >+ >+-static int search(int argc,char **argv,void *data){ >++static uint64_t search(int argc,char **argv,void *data){ >+ Node *pos=(Node *)data; >+ >+ if(argc==2){ >+@@ -37,7 +37,7 @@ static int search(int argc,char **argv,void *data){ >+ if (pos == NULL) { >+ docmdf (pos, "status 'reached bottom of tree and \\'%s\\' not found'", >+ argv[1]); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ } >+ } else if(argc>2){ >+@@ -46,20 +46,20 @@ static int search(int argc,char **argv,void *data){ >+ if (pos == NULL) { >+ docmdf (pos, "status 'reached top of tree and \\'%s\\' not found'", >+ argv[2]); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ } else if(!strcmp(argv[1],"-f")){ >+ pos=node_recursive_match( argv[2],pos); >+ if (pos == NULL) { >+ docmdf (pos, "status 'reached bottom of tree and \\'%s\\' not found'", >+ argv[2]); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ cli_outfunf("usage: %s [-b|-f] <string>",argv[0]); >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_search.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_spell.c >=================================================================== >--- files/patch-src_spell.c (nonexistent) >+++ files/patch-src_spell.c (working copy) >@@ -0,0 +1,27 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/spell.c.orig 2003-03-09 17:29:01 UTC >++++ src/spell.c >+@@ -68,7 +68,7 @@ static void spell_node (Node *node) >+ ui_init (); >+ } >+ >+-static int spell_cmd (int argc, char **argv, void *data) >++static uint64_t spell_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -85,7 +85,7 @@ static int spell_cmd (int argc, char **argv, void *dat >+ } else { >+ spell_node (pos); >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_spell.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_statcmds.c >=================================================================== >--- files/patch-src_statcmds.c (nonexistent) >+++ files/patch-src_statcmds.c (working copy) >@@ -0,0 +1,63 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/statcmds.c.orig 2003-03-09 17:28:26 UTC >++++ src/statcmds.c >+@@ -25,7 +25,7 @@ >+ >+ #ifndef WIN32 >+ >+-static int mem_cmd (int argc, char **argv, void *data) >++static uint64_t mem_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -35,7 +35,7 @@ static int mem_cmd (int argc, char **argv, void *data) >+ >+ file = fopen ("/proc/self/stat", "r"); >+ if (!file) >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ >+ fscanf (file, >+ "%*i %*s %*s %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %*i %i", >+@@ -53,7 +53,7 @@ static int mem_cmd (int argc, char **argv, void *data) >+ >+ file = fopen ("/proc/meminfo", "r"); >+ if (!file) >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ >+ fscanf (file, "%*s %*s %*s %*s %*s %*s %*s %*i %*i %i %i %i", >+ &free, &buffers, &cached); >+@@ -64,7 +64,7 @@ static int mem_cmd (int argc, char **argv, void *data) >+ (float) ((free + buffers + cached) / 1024.0 / 1024.0)); >+ } >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ #endif >+ /* >+@@ -97,7 +97,7 @@ static int count_words (unsigned char *str) >+ return words; >+ } >+ >+-static int stats_cmd (int argc, char **argv, void *data) >++static uint64_t stats_cmd (int argc, char **argv, void *data) >+ { >+ int words = 0, leaves = 0, nodes = 0; >+ Node *pos = (Node *) data; >+@@ -114,7 +114,7 @@ static int stats_cmd (int argc, char **argv, void *dat >+ >+ cli_outfunf ("nodes:%i, leaves:%i words:%i", nodes, leaves, words); >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_statcmds.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_state.c >=================================================================== >--- files/patch-src_state.c (nonexistent) >+++ files/patch-src_state.c (working copy) >@@ -0,0 +1,40 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/state.c.orig 2003-03-09 17:28:07 UTC >++++ src/state.c >+@@ -29,7 +29,7 @@ >+ >+ static Node *savedtree = NULL; >+ >+-static int save_state_cmd (int argc, char **argv, void *data) >++static uint64_t save_state_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ Node *i; >+@@ -58,10 +58,10 @@ static int save_state_cmd (int argc, char **argv, void >+ savedtree = node_recurse (savedtree); >+ } >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int restore_state_cmd (int argc, char **argv, void *data) >++static uint64_t restore_state_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -74,7 +74,7 @@ static int restore_state_cmd (int argc, char **argv, v >+ tree_free (savedtree); >+ savedtree = NULL; >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_state.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_tree__misc.c >=================================================================== >--- files/patch-src_tree__misc.c (nonexistent) >+++ files/patch-src_tree__misc.c (working copy) >@@ -0,0 +1,162 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/tree_misc.c.orig 2003-03-14 00:31:02 UTC >++++ src/tree_misc.c >+@@ -27,12 +27,12 @@ >+ #include "ui_cli.h" >+ #include "evilloop.h" >+ >+-static int cmd_movenode (int argc, char **argv, void *data) >++static uint64_t cmd_movenode (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ if(argc<2){ >+ cli_outfunf("usage: %s <left|right|up|down>",argv[0]); >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ if (!strcmp (argv[1], "left")) { >+ if (node_left (pos)) { >+@@ -64,7 +64,7 @@ static int cmd_movenode (int argc, char **argv, void * >+ node_swap (pos, node_down (pos)); >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -75,12 +75,12 @@ void init_movenode () >+ cli_add_command ("movenode", cmd_movenode, "<up|left|right|down>"); >+ } >+ >+-static int cmd_go(int argc, char **argv, void *data){ >++static uint64_t cmd_go(int argc, char **argv, void *data){ >+ Node *pos=(Node *)data; >+ >+ if(argc!=2){ >+ cli_outfunf("usage: %s <up|down|left|right|recurse|backrecurse|root|top|bottom>"); >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ if(!strcmp(argv[1],"up")){ >+@@ -110,7 +110,7 @@ static int cmd_go(int argc, char **argv, void *data){ >+ } >+ >+ >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -126,7 +126,7 @@ void init_go () >+ #include "ctype.h" >+ #include "ui_binding.h" >+ >+-static int cmd_outdent (int argc, char **argv, void *data) >++static uint64_t cmd_outdent (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -135,7 +135,7 @@ static int cmd_outdent (int argc, char **argv, void *d >+ inputbuf[strlen (inputbuf) + 1] = 0; >+ inputbuf[strlen (inputbuf)] = lastbinding->key; >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ if (node_left (pos)) { >+@@ -166,12 +166,12 @@ static int cmd_outdent (int argc, char **argv, void *d >+ target_node->right = NULL; >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* FIXME: no real need for a temporary node */ >+ >+-static int cmd_indent (int argc, char **argv, void *data) >++static uint64_t cmd_indent (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -180,7 +180,7 @@ static int cmd_indent (int argc, char **argv, void *da >+ inputbuf[strlen (inputbuf) + 1] = 0; >+ inputbuf[strlen (inputbuf)] = lastbinding->key; >+ } >+- return (int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ if (node_up (pos)) { >+@@ -205,7 +205,7 @@ static int cmd_indent (int argc, char **argv, void *da >+ } >+ node_remove (node_down (pos)); >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -221,7 +221,7 @@ void init_outdent_indent () >+ "moves the active item and the following siblings one level to the right"); >+ } >+ >+-static int remove_cmd (int argc, char **argv, void *data) >++static uint64_t remove_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -242,7 +242,7 @@ static int remove_cmd (int argc, char **argv, void *da >+ docmd (pos, "save_state"); >+ pos = node_remove (pos); >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -256,7 +256,7 @@ void init_remove () >+ } >+ >+ >+-static int commandline_cmd (int argc, char **argv, void *data) >++static uint64_t commandline_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -271,7 +271,7 @@ static int commandline_cmd (int argc, char **argv, voi >+ if (commandline[0]) >+ pos = docmd (pos, commandline); >+ } while (commandline[0] && strcmp(commandline,"q") && strcmp(commandline,"quit")); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -284,7 +284,7 @@ void init_commandline () >+ "Invokes the interactive commandline in curses mode."); >+ } >+ >+-static int insert_below_cmd (int argc, char **argv, void *data) >++static uint64_t insert_below_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -299,7 +299,7 @@ static int insert_below_cmd (int argc, char **argv, vo >+ } >+ } >+ inputbuf[0] = 0; >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_tree__misc.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_tree__sort.c >=================================================================== >--- files/patch-src_tree__sort.c (nonexistent) >+++ files/patch-src_tree__sort.c (working copy) >@@ -0,0 +1,27 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/tree_sort.c.orig 2003-03-14 00:12:44 UTC >++++ src/tree_sort.c >+@@ -141,7 +141,7 @@ static int cmp_descending(Node *a,Node *b){ >+ return cmp_todo(b,a); >+ } >+ >+-static int sort_cmd (int argc, char **argv, void *data) >++static uint64_t sort_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ int (*cmp) (Node *a, Node *b)=cmp_todo; >+@@ -155,7 +155,7 @@ static int sort_cmd (int argc, char **argv, void *data >+ node_mergesort (node_top (pos), nodes_down (node_top (pos)) + 1, cmp); >+ if (node_left (pos)) >+ node_left (pos)->right = node_top (pos); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_tree__sort.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_tree__todo.c >=================================================================== >--- files/patch-src_tree__todo.c (nonexistent) >+++ files/patch-src_tree__todo.c (working copy) >@@ -0,0 +1,46 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/tree_todo.c.orig 2003-03-09 17:23:18 UTC >++++ src/tree_todo.c >+@@ -260,7 +260,7 @@ int calc_percentage_size (Node *node, int *retsize) >+ >+ #include "cli.h" >+ >+-static int toggle_todo_cmd (int argc, char **argv, void *data) >++static uint64_t toggle_todo_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -271,15 +271,15 @@ static int toggle_todo_cmd (int argc, char **argv, voi >+ node_unset(pos,"type"); >+ } >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int toggle_done_cmd (int argc, char **argv, void *data) >++static uint64_t toggle_done_cmd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+ if (strcmp(fixnullstring(node_get(pos,"type")),"todo")) { /* bail out if not todo info set */ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ if (!strcmp(fixnullstring(node_get(pos,"done")),"yes")) { /* bail out if not todo info set */ >+@@ -288,7 +288,7 @@ static int toggle_done_cmd (int argc, char **argv, voi >+ node_set(pos,"done","yes"); >+ } >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_tree__todo.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__binding.c >=================================================================== >--- files/patch-src_ui__binding.c (nonexistent) >+++ files/patch-src_ui__binding.c (working copy) >@@ -0,0 +1,66 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_binding.c.orig 2003-03-13 20:53:14 UTC >++++ src/ui_binding.c >+@@ -250,14 +250,14 @@ static int string2keycode (char *str) >+ >+ int ui_current_scope = 0; >+ >+-static int ui_context_cmd (int argc, char **argv, void *data) >++static uint64_t ui_context_cmd (int argc, char **argv, void *data) >+ { >+ if(argc<2){ >+ cli_outfunf("usage: %s <contextname>",argv[0]); >+- return(int)data; >++ return PTR_TO_UINT64(data); >+ } >+ ui_current_scope = string2scope (argv[1]); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ static void makebinding (int scope_no, int key, int action, char *action_name, >+@@ -272,7 +272,7 @@ static void makebinding (int scope_no, int key, int ac >+ ui_binding_count[scope_no]++; >+ } >+ >+-static int ui_bind_cmd (int argc, char **argv, void *data) >++static uint64_t ui_bind_cmd (int argc, char **argv, void *data) >+ { >+ /* char context[40];*/ >+ char *key; >+@@ -280,7 +280,7 @@ static int ui_bind_cmd (int argc, char **argv, void *d >+ >+ if(argc<3){ >+ cli_outfunf("error in bindings %s %s %s %s\n",argv[0],argv[1],argv[2],argv[3]); >+- return (int)data; >++ return PTR_TO_UINT64(data); >+ } >+ key=argv[1]; >+ action=argv[2]; >+@@ -293,7 +293,7 @@ static int ui_bind_cmd (int argc, char **argv, void *d >+ ui_action_command, "command", action); >+ } >+ >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ >+@@ -395,9 +395,9 @@ char *tidy_keyname (const char *keyname) >+ !init_ui_binding(); >+ */ >+ >+-static int dummy_cmd (int argc, char **argv, void *data) >++static uint64_t dummy_cmd (int argc, char **argv, void *data) >+ { >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ void init_ui_binding () > >Property changes on: files/patch-src_ui__binding.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__cli.c >=================================================================== >--- files/patch-src_ui__cli.c (nonexistent) >+++ files/patch-src_ui__cli.c (working copy) >@@ -0,0 +1,148 @@ >+1. The <stdlib.h> header uses the word bufsize as a parameter name in >+ a function prototype. The "file.h" header #defines bufsize to 4096, >+ which leads to a parser error. >+2. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+3. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+4. Replaced (32bit) int references with proper Node * references. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_cli.c.orig 2003-03-14 04:55:14 UTC >++++ src/ui_cli.c >+@@ -22,14 +22,15 @@ >+ #include <config.h> >+ #endif >+ >++#include <stdio.h> >++#include <stdlib.h> >++#include <string.h> >++ >+ #include "tree.h" >+ #include "file.h" >+ #include "path.h" >+ #include "prefs.h" >+ #include "cli.h" >+-#include <stdio.h> >+-#include <stdlib.h> >+-#include <string.h> >+ #include "ui_cli.h" >+ >+ >+@@ -49,7 +50,7 @@ static char *path_strip (char *path) >+ return path; >+ } >+ >+-static int add (int argc,char **argv, void *data) >++static uint64_t add (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ Node *tnode; >+@@ -65,10 +66,10 @@ static int add (int argc,char **argv, void *data) >+ >+ tnode = node_insert_down (node_bottom (pos)); >+ node_set (tnode, TEXT, argv[1]); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int addc (int argc,char **argv, void *data) >++static uint64_t addc (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ Node *tnode; >+@@ -81,7 +82,7 @@ static int addc (int argc,char **argv, void *data) >+ tnode = node_exact_match (argv[1], pos); >+ if (!tnode) { >+ cli_outfun ("specified parent not found"); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ if (node_right (tnode)) { >+@@ -95,30 +96,30 @@ static int addc (int argc,char **argv, void *data) >+ else >+ node_set (tnode, TEXT, argv[2]); >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int pwd (int argc,char **argv, void *data) >++static uint64_t pwd (int argc,char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+ cli_outfun (path_strip (node2path (pos))); >+ cli_outfun ("\n"); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+-static int cd (int argc, char **argv, void *data) >++static uint64_t cd (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ Node *tnode = pos; >+ >+ if(argc==1){ >+- return (int)node_root(pos); >++ return PTR_TO_UINT64(node_root(pos)); >+ } >+ >+ if (!strcmp (argv[1], "..")){ >+ if (node_left (tnode) != 0) >+- return (int) (node_left (tnode)); >++ return PTR_TO_UINT64((node_left (tnode))); >+ } >+ >+ >+@@ -128,11 +129,11 @@ static int cd (int argc, char **argv, void *data) >+ } >+ if (!tnode) { >+ cli_outfun ("no such node\n"); >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+- return (int) tnode; >++ return PTR_TO_UINT64(tnode); >+ >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ #include <ctype.h> >+@@ -151,7 +152,7 @@ static void pre_command (char *commandline) >+ } >+ } >+ >+-static int ls (int argc, char **argv, void *data) >++static uint64_t ls (int argc, char **argv, void *data) >+ { >+ Node *pos = (Node *) data; >+ >+@@ -188,7 +189,7 @@ static int ls (int argc, char **argv, void *data) >+ tnode = node_down (tnode); >+ } >+ } >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* >+@@ -216,11 +217,12 @@ void init_ui_cli (void) >+ >+ Node *docmd (Node *pos, const char *commandline) >+ { >+- int ret; >++ Node * ret; >+ char *cmdline = strdup (commandline); >+ >+- ret = cli_docmd (cmdline, pos); >++ ret = (Node *)cli_docmd (cmdline, pos); >+ free (cmdline); >++ >+ return (Node *) ret; >+ } >+ > >Property changes on: files/patch-src_ui__cli.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__draw.c >=================================================================== >--- files/patch-src_ui__draw.c (nonexistent) >+++ files/patch-src_ui__draw.c (working copy) >@@ -0,0 +1,36 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_draw.c.orig 2003-03-10 00:44:29 UTC >++++ src/ui_draw.c >+@@ -525,7 +525,7 @@ static struct { >+ >+ /* FIXME: make backup?,.. and make sure data is present,.., make possiblity to write back? */ >+ >+-int display_format_cmd (int argc, char **argv, void *data) >++uint64_t display_format_cmd (int argc, char **argv, void *data) >+ { >+ char *p = argv[1]; >+ int width; >+@@ -533,7 +533,7 @@ int display_format_cmd (int argc, char **argv, void *d >+ int col_no = 0; >+ >+ if(argc<2){ >+- return (int)data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ do { >+@@ -618,7 +618,7 @@ int display_format_cmd (int argc, char **argv, void *d >+ >+ col_def[col_no].type = col_terminate; >+ >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ > >Property changes on: files/patch-src_ui__draw.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__edit.c >=================================================================== >--- files/patch-src_ui__edit.c (nonexistent) >+++ files/patch-src_ui__edit.c (working copy) >@@ -0,0 +1,36 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_edit.c.orig 2003-03-09 23:28:30 UTC >++++ src/ui_edit.c >+@@ -28,7 +28,7 @@ >+ #include "evilloop.h" >+ #include <stdlib.h> >+ >+-static int ui_edit_cmd (int argc, char **argv, void *data) >++static uint64_t ui_edit_cmd (int argc, char **argv, void *data) >+ { >+ Tbinding *c; >+ int stop = 0; >+@@ -61,7 +61,7 @@ static int ui_edit_cmd (int argc, char **argv, void *d >+ } >+ } >+ ui_current_scope = tempscope; >+- return (int) pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ node_backup = node_duplicate (pos); >+@@ -208,7 +208,7 @@ static int ui_edit_cmd (int argc, char **argv, void *d >+ } >+ node_free (node_backup); >+ ui_current_scope = tempscope; >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ int ui_getstr_loc (char *input, int x, int y, int maxlen) > >Property changes on: files/patch-src_ui__edit.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__menu.c >=================================================================== >--- files/patch-src_ui__menu.c (nonexistent) >+++ files/patch-src_ui__menu.c (working copy) >@@ -0,0 +1,31 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_menu.c.orig 2003-03-14 03:54:52 UTC >++++ src/ui_menu.c >+@@ -109,10 +109,10 @@ static Node *menu_do(Node *pos){ >+ return pos; >+ } >+ >+-static int cmd_menu(int argc,char **argv,void *data){ >++static uint64_t cmd_menu(int argc,char **argv,void *data){ >+ Node *pos=(Node *)data; >+ if(argc==1){ /* draw menu */ >+- return (int)menu_do(pos); >++ return PTR_TO_UINT64(menu_do(pos)); >+ } else if(argc==4){ >+ char *submenu=argv[1]; >+ char *label=argv[2]; >+@@ -142,7 +142,7 @@ static int cmd_menu(int argc,char **argv,void *data){ >+ if(menu[col][row].width>menu[col][0].width) >+ menu[col][0].width=menu[col][row].width; >+ } >+- return(int)pos; >++ return PTR_TO_UINT64(pos); >+ } >+ >+ /* > >Property changes on: files/patch-src_ui__menu.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__overlay.c >=================================================================== >--- files/patch-src_ui__overlay.c (nonexistent) >+++ files/patch-src_ui__overlay.c (working copy) >@@ -0,0 +1,41 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_overlay.c.orig 2003-03-14 00:35:14 UTC >++++ src/ui_overlay.c >+@@ -44,11 +44,11 @@ >+ >+ static char *ui_helptext[MAX_SCOPES] = { 0 }; >+ >+-static int ui_helptext_cmd (int argc, char **argv, void *data) >++static uint64_t ui_helptext_cmd (int argc, char **argv, void *data) >+ { >+ if(argc>1) >+ ui_helptext[ui_current_scope] = strdup (argv[1]); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ #define MAX_STATUS_LINES 100 >+@@ -129,7 +129,7 @@ void set_status (char *message) >+ } >+ >+ >+-static int ui_status_cmd (int argc, char **argv, void *data) >++static uint64_t ui_status_cmd (int argc, char **argv, void *data) >+ { >+ if(argc==2 && (!strcmp(argv[1],"-c") || !strcmp(argv[1],"--clear"))){ >+ status_ttl=0; >+@@ -138,7 +138,7 @@ static int ui_status_cmd (int argc, char **argv, void >+ if(!ui_inited) >+ cli_outfun(argv[1]); >+ } >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ > >Property changes on: files/patch-src_ui__overlay.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_ui__style.c >=================================================================== >--- files/patch-src_ui__style.c (nonexistent) >+++ files/patch-src_ui__style.c (working copy) >@@ -0,0 +1,45 @@ >+1. Replaced int with uint64_t to avoid truncating pointer to (32bit) >+ int by using a wider type. >+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to >+ help convert the pointer to uint64_t. >+ >+This prevents the segfault on startup in amd64 systems. >+ >+--- src/ui_style.c.orig 2003-03-09 18:25:19 UTC >++++ src/ui_style.c >+@@ -116,7 +116,7 @@ void ui_style_restore_color () >+ } >+ } >+ >+-static int ui_style_cmd (int argc, char **argv, void *data) >++static uint64_t ui_style_cmd (int argc, char **argv, void *data) >+ { >+ char *item; >+ char *colors; >+@@ -124,7 +124,7 @@ static int ui_style_cmd (int argc, char **argv, void * >+ >+ if(argc!=4){ >+ cli_outfunf("usage: %i <item> <fg/bg> <atts>"); >+- return (int)data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ item=argv[1]; >+@@ -137,7 +137,7 @@ static int ui_style_cmd (int argc, char **argv, void * >+ >+ if (style_no == -1) { >+ printf ("unknown style 'style [%s] %s %s'\n", item, colors, atts); >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ color2 = strchr (colors, '/'); >+ color2[0] = '\0'; >+@@ -166,7 +166,7 @@ static int ui_style_cmd (int argc, char **argv, void * >+ bkgdset (' ' + COLOR_PAIR (ui_style_background)); >+ } >+ } >+- return (int) data; >++ return PTR_TO_UINT64(data); >+ } >+ >+ /* > >Property changes on: files/patch-src_ui__style.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240770
:
207740
|
207806
|
207834