From bfb411d19f3ab743f15db18e0fe086dc15e9a4e8 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sat, 12 Oct 2024 08:17:21 +0100 Subject: [PATCH] path.c: nextName() constify and add prototype --- utils/path.c | 4 ++-- utils/utils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/path.c b/utils/path.c index 10eecd84..01527de4 100644 --- a/utils/path.c +++ b/utils/path.c @@ -358,10 +358,10 @@ noexpand: char * nextName(ppath, file, dest, size) - char **ppath; /* Pointer to a pointer to the next + const char **ppath; /* Pointer to a pointer to the next * entry in the path. */ - char *file; /* Pointer to a file name. */ + const char *file; /* Pointer to a file name. */ char *dest; /* Place to build result name. */ int size; /* Size of result area. */ diff --git a/utils/utils.h b/utils/utils.h index 7d07e293..87f1b063 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -47,7 +47,7 @@ extern int LookupFull(const char *, const char * const *); extern int LookupStruct(const char *str, const LookupTable *table_start, int size); extern int LookupStructFull(const char *str, const char * const *table, int size); extern int PaExpand(const char **, char **, int); -extern char *nextName(); +extern char *nextName(const char **ppath, const char *file, char *dest, int size); extern FILE *PaOpen(char *, char *, char *, char *, char *, char **); extern FILE *PaLockOpen(char *, char *, char *, char *, char *, char **, bool *, int *); extern char *StrDup(char **, const char *);