Clean up item_add and remove -fno-strict-aliasing from CFLAGS. Note that
the "aux" value in libdialog is really an opaque pointer, but libdialog stores it as a long for historical reasons. Approved by: cperciva (mentor)
This commit is contained in:
parent
33ae3dfefd
commit
98317ae752
@ -14,7 +14,7 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c \
|
||||
system.c tcpip.c termcap.c ttys.c ufs.c usb.c user.c \
|
||||
variable.c ${_wizard} keymap.h countries.h
|
||||
|
||||
CFLAGS+= -DUSE_GZIP=1 -fno-strict-aliasing
|
||||
CFLAGS+= -DUSE_GZIP=1
|
||||
.if ${MACHINE} == "pc98"
|
||||
CFLAGS+= -DPC98
|
||||
.endif
|
||||
|
@ -650,8 +650,8 @@ index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scr
|
||||
SAFE_STRCPY(buf, kp->desc);
|
||||
if (strlen(buf) > (_MAX_DESC - maxname))
|
||||
buf[_MAX_DESC - maxname] = '\0';
|
||||
nitems = item_add(nitems, kp->name, (char *)buf, pkg_checked,
|
||||
pkg_fire, pkg_selected, kp, (int *)(&lists),
|
||||
nitems = item_add(nitems, kp->name, buf, pkg_checked,
|
||||
pkg_fire, pkg_selected, kp, &lists,
|
||||
&curr, &max);
|
||||
++n;
|
||||
kp = kp->next;
|
||||
|
@ -238,7 +238,7 @@ item_add(dialogMenuItem *list, char *prompt, char *title,
|
||||
int (*checked)(dialogMenuItem *self),
|
||||
int (*fire)(dialogMenuItem *self),
|
||||
void (*selected)(dialogMenuItem *self, int is_selected),
|
||||
void *data, int *aux, int *curr, int *max)
|
||||
void *data, void *aux, int *curr, int *max)
|
||||
{
|
||||
dialogMenuItem *d;
|
||||
|
||||
|
@ -755,7 +755,7 @@ extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title,
|
||||
int (*checked)(dialogMenuItem *self),
|
||||
int (*fire)(dialogMenuItem *self),
|
||||
void (*selected)(dialogMenuItem *self, int is_selected),
|
||||
void *data, int *aux, int *curr, int *max);
|
||||
void *data, void *aux, int *curr, int *max);
|
||||
extern void items_free(dialogMenuItem *list, int *curr, int *max);
|
||||
extern int Mkdir(char *);
|
||||
extern int Mkdir_command(char *key, void *data);
|
||||
|
Loading…
Reference in New Issue
Block a user