libc: stub libintl implementation

This commit is contained in:
K. Lange 2018-12-08 18:45:19 +09:00
parent 004c792e91
commit 9d8962c8f3
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#pragma once
#include <_cheader.h>
_Begin_C_Header
extern char * gettext (const char * msgid);
extern char * dgettext (const char * domainname, const char * msgid);
extern char * dcgettext (const char * domainname, const char * msgid, int category);
_End_C_Header

29
libc/libintl/libintl.c Normal file
View File

@ -0,0 +1,29 @@
/* Stub. */
#include <libintl.h>
char * gettext (const char * msgid) {
return (char*)msgid;
}
char * dgettext (const char * domainname, const char * msgid) {
return (char*)msgid;
}
char * dcgettext (const char * domainname, const char * msgid, int category) {
return (char*)msgid;
}
char * ngettext (const char * msgid, const char * msgid_plural, unsigned long int n) {
if (n != 1) return (char*)msgid_plural;
return (char*)msgid;
}
char * dngettext (const char * domainname, const char * msgid, const char * msgid_plural, unsigned long int n) {
if (n != 1) return (char*)msgid_plural;
return (char*)msgid;
}
char * dcngettext (const char * domainname, const char * msgid, const char * msgid_plural, unsigned long int n, int category) {
if (n != 1) return (char*)msgid_plural;
return (char*)msgid;
}