Respect locale settings from the environment.
This commit is contained in:
parent
bb5faea34f
commit
4ff2396545
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132198
@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
|
||||
#define STATUS_MATCH 0
|
||||
#define STATUS_NOMATCH 1
|
||||
@ -132,6 +133,8 @@ main(int argc, char **argv)
|
||||
regex_t reg;
|
||||
regmatch_t regmatch;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
if (strcmp(getprogname(), "pgrep") == 0) {
|
||||
action = grepact;
|
||||
pgrep = 1;
|
||||
|
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -368,6 +369,8 @@ main(int argc, char **argv)
|
||||
regoff_t rlen;
|
||||
FILE *p;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
scanopts(argc, argv);
|
||||
defaults();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user