File: net-locale.h

package info (click to toggle)
hostname 2.13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 188 kB
  • ctags: 41
  • sloc: ansic: 461; makefile: 114
file content (53 lines) | stat: -rw-r--r-- 1,418 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * net-locale.h		Headerfile for the NLS functions
 *
 * NET-TOOLS	A collection of programs that form the base set of the
 *		NET-3 Networking Distribution for the LINUX operating
 *		system.
 *
 * Version:	net-locale.h 0.50 (1996-01-25)
 *
 * Author:	Bernd Eckenfels <net-tools@lina.inka.de>
 *		Copyright 1995-1996 Bernd Eckebnfels, Germany
 *
 * Modifications:
 *960125 {0.50}	Bernd Eckenfels:	included Header, reformated
 *
 */
#ifndef NET_LOCALE_H
#define NET_LOCALE_H

#if NLS
#  include <locale.h>
#  include <nl_types.h>

#  ifndef EXTERN
#    define EXTERN
#  else
#    undef EXTERN
#    define EXTERN extern
#  endif

   EXTERN nl_catd catfd;

   char *strsave (char *);
   char *str_in_buff (char *, int, char *);

#  define NLS_CATINIT catinit ();
#  define NLS_CATCLOSE(catfd) catclose (catfd);
#  define NLS_CATGETS(catfd, arg1, arg2, fmt) \
	catgets ((catfd), (arg1), (arg2), (fmt))
#  define NLS_CATSAVE(catfd, arg1, arg2, fmt) \
	strsave (catgets ((catfd), (arg1), (arg2), (fmt)))
#  define NLS_CATBUFF(catfd, arg1, arg2, fmt, buf, len) \
	str_in_buff (buf, len, catgets ((catfd), (arg1), (arg2), (fmt)))
#  include "hostname-nls.h"
#else
#  define NLS_CATINIT
#  define NLS_CATCLOSE(catfd)
#  define NLS_CATGETS(catfd, arg1, arg2, fmt) fmt
#  define NLS_CATSAVE(catfd, arg1, arg2, fmt) fmt
#  define NLS_CATBUFF(catfd, arg1, arg2, fmt, buf, len) strcpy (buf, fmt)
#endif

#endif /* NET_LOCALE_H */