瀏覽代碼

slstatus: set locale

I want my date & time printed according my locale settings.
This commit enables that

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
master
Kurt Van Dijck 7 年之前
committed by Aaron Marcher
父節點
當前提交
fb1f1dea2e
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 74B048E5C2474F9A
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      slstatus.c

+ 2
- 0
slstatus.c 查看文件

@@ -6,6 +6,7 @@
#include <ifaddrs.h>
#include <limits.h>
#include <linux/wireless.h>
#include <locale.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
@@ -841,6 +842,7 @@ main(int argc, char *argv[])
usage();
}

setlocale(LC_ALL, "");
memset(&act, 0, sizeof(act));
act.sa_handler = terminate;
sigaction(SIGINT, &act, NULL);


Loading…
取消
儲存