Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libmenu



Module Name:    src
Committed By:   nia
Date:           Tue Nov  3 18:47:02 UTC 2026

Modified Files:
        src/lib/libmenu: item.c menu.c menu.h menu_item_new.3
            menu_item_userptr.3 menu_mark.3 menu_pattern.3 menu_userptr.3
            userptr.c

Log Message:
menu(3x): Constification and voidification of pointer arguments.

libmenu has several functions that take a non-const char * argument
and then (effectively) strdup(3) it. I've changed it so that these
functions take a const char * argument. Modern GCC objects to string
literals being passed to these functions otherwise.

In other cases, a userptr allows some data to be associated with a
data structure, but its type is char *. I've changed it to void *.

Both of these changes are consistent with similar changes in ncurses,
although are inconsistent with SVR4 libmenu versions. libmenu has
unfortunately never been standardized.

"that is fine" - blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libmenu/item.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libmenu/menu.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libmenu/menu.h
cvs rdiff -u -r1.9 -r1.10 src/lib/libmenu/menu_item_new.3 \
    src/lib/libmenu/menu_pattern.3 src/lib/libmenu/menu_userptr.3 \
    src/lib/libmenu/userptr.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libmenu/menu_item_userptr.3
cvs rdiff -u -r1.10 -r1.11 src/lib/libmenu/menu_mark.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index