Develop and Download Open Source Software

Browse CVS Repository

Contents of /enbanfukusyaya/EnbanFukusyaYa/DriveAccess/text.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Mon Nov 1 14:34:11 2010 UTC (13 years, 5 months ago) by bananajinn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +4 -4 lines
File MIME type: text/x-csrc
*** empty log message ***

1 /**
2 * @file text.c
3 * @brief 文字列変換
4 * @author BananaJinn
5 * @version $Id: text.c,v 1.7 2008/06/29 04:07:31 bananajinn Exp $
6 * 円盤複写屋
7 * Copyright (C) 2004-2006 BananaJinn<banana@mxh.mesh.ne.jp>.
8 */
9
10 #if defined(linux) || defined(__MINGW32__)
11 # include <stdio.h>
12 # include <libintl.h>
13 #elif defined(WIN32)
14 # include <windows.h>
15 static char stringBuffer[1024];
16 #elif defined(MACOSX)
17 # import <Cocoa/Cocoa.h>
18 #endif
19
20 #if defined(linux) || defined(__MINGW32__)
21 char *GetText(const char *string)
22 {
23 return gettext(string);
24 }
25 #endif
26
27 #if defined(WIN32) && !defined(__MINGW32__)
28 char *GetText(int string_id)
29 {
30 stringBuffer[0] = '\0';
31 LoadString(NULL, string_id, stringBuffer, sizeof(stringBuffer));
32 return stringBuffer;
33 }
34 #endif
35
36 #if defined(MACOSX)
37 const char *GetText(const char *string)
38 {
39 NSString *nsString = [NSString stringWithCString: string];
40 return [NSLocalizedString(nsString, @"") cString];
41 }
42 #endif
43

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26