Commit Graph

48 Commits

Author SHA1 Message Date
roy 7027866a09 Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
2009-07-13 19:05:39 +00:00
tron 80ab5902d9 Fix build problem on big endian ports where ntohl() doesn't convert the
argument to "uint32_t" automatically.
2009-04-16 13:52:52 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem 95ecf43b59 fix sign-compare issues 2009-04-12 10:25:35 +00:00
joerg 997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
christos 032602ef32 - long -> size_t
- don't allocate memory before the negative check is done CID 4722
2009-02-18 20:04:43 +00:00
ginsbach ab35d36c9e Change for standards compliance:
- Store an empty string in the catalog when the message text is empty an
  a <blank> (space or tab) field separator is present.

Standards:  The Open Group Base Specifications Issue 6
            IEEE Std 1003.1, 2004 Edition
2008-11-04 03:14:46 +00:00
wiz dc9d42b1fd Spelling and whitespace and punctuation nits. 2008-10-19 17:57:19 +00:00
ginsbach 06ec28991b More or less a complete rewrite. The man page now better matches reality. 2008-10-17 21:11:27 +00:00
ginsbach b4822afab9 WARNS=3 2008-10-17 20:42:47 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ginsbach a3a3ad0162 Changes for standards compliance:
- Accept "-" for msgfile (STDIN) and catfile (STDOUT)

- Merge msgfile into formatted catfile.  The catfile is created if
  it does not exist (current behavior).  If the catfile exists,
  its messages are included in the new catfile.  Collisions between
  set and message numbers cause the msgfile message text to replace
  the existing message text.

  (The $delset directive now makes more sense.)

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition

- Replace corrupt()/nomem() with errx().  The replaced routines
  called local error() -> warning() which prints an input file line
  number.  This probably makes no sense for these conditions (it
  is not a syntax error in msgfile).  Line numbers are completely
  nonsense when dealing with reading a formatted catfile.

- Modify warning() to only print line number when reading from a
  message file.  Also print the current file being processed.

- Don't issue a warning when processing a line with only a message
  number and no trailing space.  This is valid and will delete any
  existing message with that number from the current set.

- Reset lineno for each msgfile processed.
2007-11-21 13:40:09 +00:00
ginsbach 18072a963c More code clean up (KNF): de-__P and ANSI'ify function declarations 2007-10-11 03:42:38 +00:00
ginsbach 09b20b9b68 - add const qualifiers where necessary
- remove unnecessary argument from error(); first argument was always NULL
[changes mostly from FreeBSD]
2007-10-10 02:34:18 +00:00
ginsbach 8b26595b3a Changes for standards compliance:
- "If no $set directive is specified in a message text source file,
   all messages shall be located in an implementation-defined default
   message set NL_SETD."
- The n argument to $delset indicates the set number which should be
  in the range 1 to NL_SETMAX.

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition
2007-10-06 02:55:56 +00:00
dsl 3db763ccc3 MCDelSet() contains an infinite loop!
I suspect it has never, ever, ever been asked to delete anything that exists.
Also neither it, nor MCDelMsg() below free() the set and msg structures.
Found by Coverty SID:54
2006-03-30 20:32:10 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
gmcgarry 2b0514ca6b Xref nls(7). Addresses PR#14576. 2003-05-02 08:35:42 +00:00
grant 2ceb845887 The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
2003-02-14 15:59:16 +00:00
gmcgarry a28de83dfc Improve Xrefs. Give credit to the real author. 2003-02-05 05:10:58 +00:00
bjh21 38bcf69e6b ... and in NetBSD-current, <netinet/in.h> needs <sys/types.h>. 2002-04-24 22:44:40 +00:00
bjh21 440dad2fb9 On NetBSD, <arpa/inet.h> needs <netinet/in.h>. POSIX-2001 says it shouldn't,
but cope anyway.
2002-04-24 22:34:07 +00:00
bjh21 df42dd4c9f Include <arpa/inet.h> to get htonl(). This is necessary on Solaris, and
POSIX says that's the right header for it.
2002-04-24 17:49:52 +00:00
fair 8bd0f72b87 Text expanding the NLS abbreviation added per PR 14576. 2002-02-03 09:31:36 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
yamt eb8d48e92a enable checking limit of setid and msgid. 2001-09-23 16:32:35 +00:00
yamt 7a04f9f720 fix possible 1-byte overflow. 2001-09-20 15:56:06 +00:00
tv dba5d44670 Add hooks to allow toolchain bits to be reachover-built at the top level. 2001-08-14 10:18:26 +00:00
wiz 1375e0081d Minor fixes. 2001-06-05 11:40:04 +00:00
wiz d73836484b Add RCS Id, and one whitespace fix. 2001-04-09 12:31:34 +00:00
cgd a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
cgd 1fa77b6d55 Use:
.Sh SEE ALSO
rather than:
	.Sh "SEE ALSO"
The former is the correct form, and it makes a (barely persceptible)
difference in formatting for some output devices (e.g. 'ps').
1999-12-29 06:54:00 +00:00
fair 37d4a35950 A gencat(1) manual page, which satisfies PR 4749 1999-12-21 09:25:43 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
itohy c567b3c6b8 The range of the argument of ctype(3) functions is not that of "char",
but "unsigned char" plus EOF.
The original code may cause troubles processing 8-bit code files.
1998-10-09 17:00:56 +00:00
mjacob 968bd8ab13 Clean up some quote handling 1998-04-28 15:28:49 +00:00
lukem fb9ee7e315 WARNSify 1997-10-19 02:12:40 +00:00
jtc 3bc5599f8b Fix tipo inherited from old version of TNF copyright template. 1997-10-08 22:19:18 +00:00
veego daad32f0db RCS id police. 1997-02-09 14:33:50 +00:00
veego 57344c4022 Add missing ;
Fix pr #3201.
1997-02-09 14:31:41 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
jtc 8abc97cf05 New message catalog compiler implementation that generates a more
efficient machine independent external format.  The new format is
like what is used on svr4 systems, except it uses fixed sized
fields and a constant byte order.
1996-05-13 23:22:02 +00:00
jtc cac62b2d65 Be pedantic, main() returns int in C. 1996-03-21 17:56:15 +00:00
cgd a584a9e8b9 needs stdlib.h and string.h 1994-12-24 16:44:03 +00:00
jtc c9b8e6ee73 gencat, used to create message catalogs 1994-05-29 22:34:42 +00:00