diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index cd17d31d71..647f4f158f 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -74,7 +74,7 @@ static const WCHAR spaceW[] = {' ','\0'}; * * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). */ -WCHAR * WCMD_strrev (WCHAR *buff) { +static WCHAR * WCMD_strrev (WCHAR *buff) { int r, i; WCHAR b; @@ -95,7 +95,7 @@ WCHAR * WCMD_strrev (WCHAR *buff) { * Result is returned in a static string overwritten with each call. * FIXME: There must be a better algorithm! */ -WCHAR * WCMD_filesize64 (ULONGLONG n) { +static WCHAR * WCMD_filesize64 (ULONGLONG n) { ULONGLONG q; unsigned int r, i; @@ -121,7 +121,7 @@ WCHAR * WCMD_filesize64 (ULONGLONG n) { * * Sort based on the /O options supplied on the command line */ -int WCMD_dir_sort (const void *a, const void *b) +static int WCMD_dir_sort (const void *a, const void *b) { WIN32_FIND_DATA *filea = (WIN32_FIND_DATA *)a; WIN32_FIND_DATA *fileb = (WIN32_FIND_DATA *)b; @@ -200,7 +200,7 @@ int WCMD_dir_sort (const void *a, const void *b) * * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). */ -void WCMD_getfileowner(WCHAR *filename, WCHAR *owner, int ownerlen) { +static void WCMD_getfileowner(WCHAR *filename, WCHAR *owner, int ownerlen) { ULONG sizeNeeded = 0; DWORD rc; diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index 13964486e3..a31b011347 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -70,7 +70,6 @@ void WCMD_more (WCHAR *); void WCMD_move (void); void WCMD_output (const WCHAR *format, ...); void WCMD_output_asis (const WCHAR *message); -void WCMD_parse (WCHAR *s, WCHAR *q, WCHAR *p1, WCHAR *p2); void WCMD_pause (void); void WCMD_popd (void); void WCMD_print_error (void); @@ -88,7 +87,6 @@ void WCMD_setshow_path (WCHAR *command); void WCMD_setshow_prompt (void); void WCMD_setshow_time (void); void WCMD_shift (WCHAR *command); -void WCMD_show_prompt (void); void WCMD_title (WCHAR *); void WCMD_type (WCHAR *); void WCMD_verify (WCHAR *command); @@ -98,7 +96,6 @@ int WCMD_volume (int mode, WCHAR *command); WCHAR *WCMD_fgets (WCHAR *s, int n, HANDLE stream); WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where); WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string); -void WCMD_opt_s_strip_quotes(WCHAR *cmd); void WCMD_HandleTildaModifiers(WCHAR **start, WCHAR *forVariable, WCHAR *forValue, BOOL justFors); void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 06c97d4167..4c513fb30b 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -309,7 +309,7 @@ void WCMD_print_error (void) { * */ -void WCMD_show_prompt (void) { +static void WCMD_show_prompt (void) { int status; WCHAR out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH]; @@ -442,7 +442,7 @@ WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) { * * Remove first and last quote WCHARacters, preserving all other text */ -void WCMD_opt_s_strip_quotes(WCHAR *cmd) { +static void WCMD_opt_s_strip_quotes(WCHAR *cmd) { WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL; while((*dest=*src) != '\0') { if (*src=='\"') @@ -761,7 +761,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forVar, WCHAR *forVal) { * read in and not again, except for 'for' variable substitution. * eg. As evidence, "echo %1 && shift && echo %1" or "echo %%path%%" */ -void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forValue) { +static void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forValue) { /* For commands in a context (batch program): */ /* Expand environment variables in a batch file %{0-9} first */ @@ -846,7 +846,7 @@ void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forVa * second in p2. Any subsequent non-qualifier strings are lost. * Parameters in quotes are handled. */ -void WCMD_parse (WCHAR *s, WCHAR *q, WCHAR *p1, WCHAR *p2) +static void WCMD_parse (WCHAR *s, WCHAR *q, WCHAR *p1, WCHAR *p2) { int p = 0; @@ -1612,7 +1612,7 @@ static void WCMD_DumpCommands(CMD_LIST *commands) { * * Adds a command to the current command list */ -void WCMD_addCommand(WCHAR *command, int *commandLen, +static void WCMD_addCommand(WCHAR *command, int *commandLen, WCHAR *redirs, int *redirLen, WCHAR **copyTo, int **copyToLen, CMD_DELIMITERS prevDelim, int curDepth,