Skip to content

Commit

Permalink
avoid () decls for C23; from Sam James
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@72980 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Nov 26, 2024
1 parent c85bfbd commit ab784ee
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
11 changes: 11 additions & 0 deletions texk/xdvik/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2024-11-26 Sam James <[email protected]>

* dvi-draw.c (lseek,pow): remove () declarations, incompatible
with C23.
* gui/menu.c,
* gui/sfDraw.c,
* gui/sfDraw.h,
* gui/sfSelFile.c: avoid () decls.
https://tug.org/pipermail/tex-live/2024-November/050931.html
https://tug.org/pipermail/tex-live/2024-November/050930.html

2023-02-02 Florian Weimer <[email protected]>

* m4/xdvi-func-setsid-in-fork.m4.c99-4: avoid implicit
Expand Down
3 changes: 0 additions & 3 deletions texk/xdvik/dvi-draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ bmUnitT bit_masks[] = {
#ifdef VMS
#define off_t int
#endif
extern off_t lseek();

#ifndef SEEK_SET /* if <unistd.h> is not provided (or for <X11R5) */
#define SEEK_SET 0
Expand Down Expand Up @@ -4693,8 +4692,6 @@ anchor_search(const char *str)

#if GREY

extern double pow();

static void
mask_shifts(Pixel mask, int *pshift1, int *pshift2)
{
Expand Down
4 changes: 2 additions & 2 deletions texk/xdvik/gui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static struct button_info *m_button_info = NULL; /* toplevel node of pulldown me


static void
set_menu_info(void *val, XtActionProc proc, Boolean (*cmp)(), struct button_info *item)
set_menu_info(void *val, XtActionProc proc, Boolean (*cmp)(void *, const char *), struct button_info *item)
{
size_t i;
ASSERT(item != NULL, "item in set_menu_info musn't be NULL!");
Expand Down Expand Up @@ -96,7 +96,7 @@ set_menu_info(void *val, XtActionProc proc, Boolean (*cmp)(), struct button_info

/* set a menu according to val and the compare function cmp */
void
set_menu(void *val, XtActionProc proc, Boolean (*cmp)())
set_menu(void *val, XtActionProc proc, Boolean (*cmp)(void *, const char *))
{
/* removed following since cast from function pointer to void pointer is not supported by ANSI C */
/* TRACE_GUI((stderr, "set_menu_info: %d, %p, %p", *(int *)val, (void *)proc, (void *)cmp)); */
Expand Down
2 changes: 1 addition & 1 deletion texk/xdvik/gui/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ extern void create_menu_buttons(Widget parent,
#endif
);

extern void set_menu(void *val, XtActionProc proc, Boolean (*cmp)());
extern void set_menu(void *val, XtActionProc proc, Boolean (*cmp)(void *, const char *));

#endif /* MENU_H_ */
1 change: 0 additions & 1 deletion texk/xdvik/gui/sfDraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ SFstatAndCheck(SFDir *dir, SFEntry *entry)
struct stat statBuf;
char save;
int last;
extern int SFchdir();

/*
* must be restored before returning
Expand Down
2 changes: 1 addition & 1 deletion texk/xdvik/gui/sfDraw.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void SFhAreaSelectedCallback(Widget w, int n, int pnew);
void SFpathSliderMovedCallback(Widget w, XtPointer client_data, float *new);
void SFpathAreaSelectedCallback(Widget w, XtPointer client_data, int pnew);
Boolean SFworkProc(void);
extern int (*SFfunc)();
extern int (*SFfunc)(char *entryReal, char **entryShown, struct stat *statBuf);

extern Widget selFileField, selFileForm, selFileHScroll, selFileHScrolls[], selFileLists[], selFileVScrolls[];
extern Display *SFdisplay;
Expand Down
2 changes: 1 addition & 1 deletion texk/xdvik/gui/sfSelFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ XtAppContext SFapp;
int SFpathScrollWidth, SFvScrollHeight, SFhScrollWidth;
char SFtextBuffer[MAXPATHLEN];
XtIntervalId SFdirModTimerId;
int (*SFfunc) ();
int (*SFfunc) (char *entryReal, char **entryShown, struct stat *statBuf);

static int SFstatus = SEL_FILE_NULL;

Expand Down
1 change: 0 additions & 1 deletion texk/xdvik/squeeze/squeeze.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ main(int argc, char *argv[])
int c;
char *b;
char seeking;
extern void exit();

if (argc > 3 || (in = (argc < 2 ? stdin : fopen(argv[1], "r"))) == NULL ||
(out = (argc < 3 ? stdout : fopen(argv[2], "w"))) == NULL) {
Expand Down

0 comments on commit ab784ee

Please sign in to comment.