View | Details | Raw Unified | Return to bug 241906
Collapse All | Expand All

(-)usr.bin/locale/locale.c (-4 / +7 lines)
Lines 61-67 Link Here
61
const char *lookup_localecat(int);
61
const char *lookup_localecat(int);
62
char	*kwval_lconv(int);
62
char	*kwval_lconv(int);
63
int	kwval_lookup(const char *, char **, int *, int *, int *);
63
int	kwval_lookup(const char *, char **, int *, int *, int *);
64
void	showdetails(const char *);
64
int	showdetails(const char *);
65
void	showkeywordslist(char *substring);
65
void	showkeywordslist(char *substring);
66
void	showlocale(void);
66
void	showlocale(void);
67
void	usage(void);
67
void	usage(void);
Lines 414-420 Link Here
414
			setlocale(LC_ALL, "");
414
			setlocale(LC_ALL, "");
415
		if (argc > 0) {
415
		if (argc > 0) {
416
			while (argc > 0) {
416
			while (argc > 0) {
417
				showdetails(*argv);
417
				if (showdetails(*argv) == 0)
418
					exit(EXIT_FAILURE);
418
				argv++;
419
				argv++;
419
				argc--;
420
				argc--;
420
			}
421
			}
Lines 837-843 Link Here
837
 * Show details about requested keyword according to '-k' and/or '-c'
838
 * Show details about requested keyword according to '-k' and/or '-c'
838
 * command line options specified.
839
 * command line options specified.
839
 */
840
 */
840
void
841
int
841
showdetails(const char *kw)
842
showdetails(const char *kw)
842
{
843
{
843
	int	type, cat, tmpval, alloc;
844
	int	type, cat, tmpval, alloc;
Lines 849-855 Link Here
849
		 * XXX: any actions?
850
		 * XXX: any actions?
850
		 */
851
		 */
851
		fprintf(stderr, "Unknown keyword: `%s'\n", kw);
852
		fprintf(stderr, "Unknown keyword: `%s'\n", kw);
852
		return;
853
		return (0);
853
	}
854
	}
854
855
855
	if (prt_categories) {
856
	if (prt_categories) {
Lines 889-894 Link Here
889
890
890
	if (alloc)
891
	if (alloc)
891
		free(kwval);
892
		free(kwval);
893
894
	return (1);
892
}
895
}
893
896
894
/*
897
/*

Return to bug 241906