/[winpt]/trunk/Src/wptNLS.c
ViewVC logotype

Diff of /trunk/Src/wptNLS.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by werner, Thu Oct 27 15:25:13 2005 UTC revision 69 by twoaday, Sat Nov 5 12:28:12 2005 UTC
# Line 19  Line 19 
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>
# Line 37  Line 36 
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
# Line 239  set_gettext_file( const char *filename, Line 238  set_gettext_file( const char *filename,
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              }              }
# Line 271  get_string( struct loaded_domain *domain Line 270  get_string( struct loaded_domain *domain
270      return (const char*)p;      return (const char*)p;
271  } /* get_string */  } /* get_string */
272    
273    
274  const char *  const char *
275  gettext( const char *msgid )  gettext( const char *msgid )
276  {  {

Legend:
Removed from v.36  
changed lines
  Added in v.69

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26