1 /******************************************************************************
2  *                                                                            *
3  * File:   gettrans.c         Version  1.00            Date: 1997-07-27       *
4  *                                                                            *
5  * Copyright (c) 1997 by kosta@kostis.net (Kosta Kostis)                      *
6  *                                                                            *
7  ******************************************************************************
8  *                                                                            *
9  * History:                                                                   *
10  *     1997-07-27: KK V1.00                                                   *
11  *        - initial coding                                                    *
12  *                                                                            *
13  *****************************************************************************/
14 
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <string.h>
18 
19 #include "os-stuff.h"
20 
21 #include "tab.h"
22 
23 #include "gettrans.h"
24 
25 /******************************************************************************
26 
27 	Function:
28 		figure out TRANS directory
29 
30 	Parameters:
31 		none
32 
33 	Returns:
34 		pointer to TRANS directory
35 
36  *****************************************************************************/
37 
GetTrans(void)38 char	*GetTrans (void)
39 {
40 	static	char	TRANS	[PATHNAME_MAX + 1] ;
41 	char	*Help ;
42 
43 	#ifdef	DIR_TRANS
44 		strcpy (TRANS, DIR_TRANS) ;
45 	#else
46 		sprintf (TRANS, "..%c", CHR_DIR) ;
47 	#endif
48 
49 	Help = getenv (ENV_TRANS) ;
50 	if (Help != (char *) NULL)
51 		strcpy (TRANS, Help) ;
52 
53 	return (TRANS) ;
54 }
55 
56