@@ -157,10 +157,8 @@ static void qprintf(const char *, Char *);
157157#endif
158158
159159int
160- glob (pattern , flags , errfunc , pglob )
161- const char * __restrict pattern ;
162- int flags , (* errfunc )(const char * , int );
163- glob_t * __restrict pglob ;
160+ glob (const char * __restrict pattern , int flags ,
161+ int (* errfunc )(const char * , int ), glob_t * __restrict pglob )
164162{
165163 const u_char * patnext ;
166164 int c , limit ;
@@ -215,10 +213,7 @@ glob(pattern, flags, errfunc, pglob)
215213 * characters
216214 */
217215static int
218- globexp1 (pattern , pglob , limit )
219- const Char * pattern ;
220- glob_t * pglob ;
221- int * limit ;
216+ globexp1 (const Char * pattern , glob_t * pglob , int * limit )
222217{
223218 const Char * ptr = pattern ;
224219 int rv ;
@@ -241,10 +236,8 @@ globexp1(pattern, pglob, limit)
241236 * If it fails then it tries to glob the rest of the pattern and returns.
242237 */
243238static int
244- globexp2 (ptr , pattern , pglob , rv , limit )
245- const Char * ptr , * pattern ;
246- glob_t * pglob ;
247- int * rv , * limit ;
239+ globexp2 (const Char * ptr , const Char * pattern , glob_t * pglob , int * rv ,
240+ int * limit )
248241{
249242 int i ;
250243 Char * lm , * ls ;
@@ -348,11 +341,7 @@ globexp2(ptr, pattern, pglob, rv, limit)
348341 * expand tilde from the passwd file.
349342 */
350343static const Char *
351- globtilde (pattern , patbuf , patbuf_len , pglob )
352- const Char * pattern ;
353- Char * patbuf ;
354- size_t patbuf_len ;
355- glob_t * pglob ;
344+ globtilde (const Char * pattern , Char * patbuf , size_t patbuf_len , glob_t * pglob )
356345{
357346 struct passwd * pwd ;
358347 char * h ;
@@ -428,10 +417,7 @@ globtilde(pattern, patbuf, patbuf_len, pglob)
428417 * to find no matches.
429418 */
430419static int
431- glob0 (pattern , pglob , limit )
432- const Char * pattern ;
433- glob_t * pglob ;
434- int * limit ;
420+ glob0 (const Char * pattern , glob_t * pglob , int * limit )
435421{
436422 const Char * qpatnext ;
437423 int c , err , oldpathc ;
@@ -517,17 +503,13 @@ glob0(pattern, pglob, limit)
517503}
518504
519505static int
520- compare (p , q )
521- const void * p , * q ;
506+ compare (const void * p , const void * q )
522507{
523508 return (strcmp (* (char * * )p , * (char * * )q ));
524509}
525510
526511static int
527- glob1 (pattern , pglob , limit )
528- Char * pattern ;
529- glob_t * pglob ;
530- int * limit ;
512+ glob1 (Char * pattern , glob_t * pglob , int * limit )
531513{
532514 Char pathbuf [MAXPATHLEN ];
533515
@@ -544,10 +526,8 @@ glob1(pattern, pglob, limit)
544526 * meta characters.
545527 */
546528static int
547- glob2 (pathbuf , pathend , pathend_last , pattern , pglob , limit )
548- Char * pathbuf , * pathend , * pathend_last , * pattern ;
549- glob_t * pglob ;
550- int * limit ;
529+ glob2 (Char * pathbuf , Char * pathend , Char * pathend_last , Char * pattern ,
530+ glob_t * pglob , int * limit )
551531{
552532 struct stat sb ;
553533 Char * p , * q ;
@@ -604,10 +584,8 @@ glob2(pathbuf, pathend, pathend_last, pattern, pglob, limit)
604584}
605585
606586static int
607- glob3 (pathbuf , pathend , pathend_last , pattern , restpattern , pglob , limit )
608- Char * pathbuf , * pathend , * pathend_last , * pattern , * restpattern ;
609- glob_t * pglob ;
610- int * limit ;
587+ glob3 (Char * pathbuf , Char * pathend , Char * pathend_last , Char * pattern ,
588+ Char * restpattern , glob_t * pglob , int * limit )
611589{
612590 struct dirent * dp ;
613591 DIR * dirp ;
@@ -690,10 +668,7 @@ glob3(pathbuf, pathend, pathend_last, pattern, restpattern, pglob, limit)
690668 * gl_pathv points to (gl_offs + gl_pathc + 1) items.
691669 */
692670static int
693- globextend (path , pglob , limit )
694- const Char * path ;
695- glob_t * pglob ;
696- int * limit ;
671+ globextend (const Char * path , glob_t * pglob , int * limit )
697672{
698673 char * * pathv ;
699674 int i ;
@@ -745,8 +720,7 @@ globextend(path, pglob, limit)
745720 * pattern causes a recursion level.
746721 */
747722static int
748- match (name , pat , patend )
749- Char * name , * pat , * patend ;
723+ match (Char * name , Char * pat , Char * patend )
750724{
751725 int ok , negate_range ;
752726 Char c , k ;
@@ -797,8 +771,7 @@ match(name, pat, patend)
797771
798772/* Free allocated data belonging to a glob_t structure. */
799773void
800- globfree (pglob )
801- glob_t * pglob ;
774+ globfree (glob_t * pglob )
802775{
803776 int i ;
804777 char * * pp ;
@@ -814,9 +787,7 @@ globfree(pglob)
814787}
815788
816789static DIR *
817- g_opendir (str , pglob )
818- Char * str ;
819- glob_t * pglob ;
790+ g_opendir (Char * str , glob_t * pglob )
820791{
821792 char buf [MAXPATHLEN ];
822793
@@ -834,10 +805,7 @@ g_opendir(str, pglob)
834805}
835806
836807static int
837- g_lstat (fn , sb , pglob )
838- Char * fn ;
839- struct stat * sb ;
840- glob_t * pglob ;
808+ g_lstat (Char * fn , struct stat * sb , glob_t * pglob )
841809{
842810 char buf [MAXPATHLEN ];
843811
@@ -851,10 +819,7 @@ g_lstat(fn, sb, pglob)
851819}
852820
853821static int
854- g_stat (fn , sb , pglob )
855- Char * fn ;
856- struct stat * sb ;
857- glob_t * pglob ;
822+ g_stat (Char * fn , struct stat * sb , glob_t * pglob )
858823{
859824 char buf [MAXPATHLEN ];
860825
@@ -868,9 +833,7 @@ g_stat(fn, sb, pglob)
868833}
869834
870835static Char *
871- g_strchr (str , ch )
872- Char * str ;
873- int ch ;
836+ g_strchr (Char * str , int ch )
874837{
875838 do {
876839 if (* str == ch )
@@ -880,10 +843,7 @@ g_strchr(str, ch)
880843}
881844
882845static int
883- g_Ctoc (str , buf , len )
884- const Char * str ;
885- char * buf ;
886- u_int len ;
846+ g_Ctoc (const Char * str , char * buf , u_int len )
887847{
888848
889849 while (len -- ) {
@@ -895,9 +855,7 @@ g_Ctoc(str, buf, len)
895855
896856#ifdef DEBUG
897857static void
898- qprintf (str , s )
899- const char * str ;
900- Char * s ;
858+ qprintf (const char * str , Char * s )
901859{
902860 Char * p ;
903861
0 commit comments