Alexandre Julliard : makedep: Fix parsing of man page section.
Module: wine Branch: master Commit: bd0ca5103a068a1d1b4a9da8ec72380edbb78bed URL: https://gitlab.winehq.org/wine/wine/-/commit/bd0ca5103a068a1d1b4a9da8ec72380... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 10:47:49 2022 +0100 makedep: Fix parsing of man page section. --- tools/makedep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 04403c5b332..cab573c0488 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1132,9 +1132,9 @@ static void parse_in_file( struct file *source, FILE *file ) { if (strncmp( buffer, ".TH", 3 )) continue; p = skip_spaces( buffer + 3 ); - while (*p && *p != ' ' && *p != '\t') p++; /* program name */ - p = skip_spaces( p ); - if (*p) source->args = xstrdup( p ); /* man section */ + if (!(p = strtok( p, " \t" ))) continue; /* program name */ + if (!(p = strtok( NULL, " \t" ))) continue; /* man section */ + source->args = xstrdup( p ); return; } }
participants (1)
-
Alexandre Julliard