Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 1995 12:17:43 +0200 (MET DST)
From:      Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de>
To:        bugs@freebsd.org
Subject:   add setlocale() to more(1)
Message-ID:  <199507171017.MAA29201@ghpc6.ihf.rwth-aachen.de>

next in thread | raw e-mail | index | archive | help
Moin,

I have added a call to setlocale() to more(1) to make it aware of
different character encodings. The patch is attached below.

tg

*** /usr/src/usr.bin/more/main.c.orig	Fri May 27 14:30:45 1994
--- /usr/src/usr.bin/more/main.c	Sun Jul 16 10:48:53 1995
***************
*** 51,56 ****
--- 51,57 ----
  #include <sys/file.h>
  #include <stdio.h>
  #include <less.h>
+ #include <locale.h>
  
  int	ispipe;
  int	new_file;
***************
*** 295,300 ****
--- 296,303 ----
  		exit(0);
  	}
  
+         setlocale(LC_CTYPE, "");
+         
  	raw_mode(1);
  	get_term();
  	open_getchr();




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507171017.MAA29201>