19 |
* along with WinPT; if not, write to the Free Software Foundation, |
* along with WinPT; if not, write to the Free Software Foundation, |
20 |
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
*/ |
*/ |
|
/* x-todo-status: OK */ |
|
22 |
|
|
23 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
24 |
#include <config.h> |
#include <config.h> |
36 |
#include "wptTypes.h" |
#include "wptTypes.h" |
37 |
#include "wptNLS.h" |
#include "wptNLS.h" |
38 |
|
|
|
|
|
39 |
/* Missing W32 functions. */ |
/* Missing W32 functions. */ |
40 |
static char * |
static char * |
41 |
stpcpy( char *a,const char *b ) |
w32_stpcpy (char *a,const char *b) |
42 |
{ |
{ |
43 |
while( *b ) |
while (*b) |
44 |
*a++ = *b++; |
*a++ = *b++; |
45 |
*a = 0; |
*a = 0; |
46 |
return (char*)a; |
return (char*)a; |
47 |
} |
} |
48 |
|
|
49 |
|
|
50 |
/* The magic number of the GNU message catalog format. */ |
/* The magic number of the GNU message catalog format. */ |
51 |
#define MAGIC 0x950412de |
#define MAGIC 0x950412de |
52 |
#define MAGIC_SWAPPED 0xde120495 |
#define MAGIC_SWAPPED 0xde120495 |
238 |
|
|
239 |
dir = strdup( nls_dir ); |
dir = strdup( nls_dir ); |
240 |
if( dir && (buf= (char *)malloc(strlen(dir)+strlen(filename)+1+3+1)) ) { |
if( dir && (buf= (char *)malloc(strlen(dir)+strlen(filename)+1+3+1)) ) { |
241 |
strcpy(stpcpy(stpcpy(stpcpy( buf, dir),"/"), filename),".mo"); |
strcpy(w32_stpcpy(w32_stpcpy(w32_stpcpy( buf, dir),"/"), filename),".mo"); |
242 |
domain = load_domain( buf ); |
domain = load_domain( buf ); |
243 |
free(buf); |
free(buf); |
244 |
} |
} |