From c6cd7adb7374240463e2e199b33688da1f3e9784 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 7 Sep 2006 07:42:22 +0000 Subject: [PATCH] *** empty log message *** --- src/database.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/input-gui.c | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/database.h b/src/database.h index f112563..39fc06c 100644 --- a/src/database.h +++ b/src/database.h @@ -27,12 +27,57 @@ #define M17NDIR "/usr/local/share/m17n" #endif +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +#ifndef PATH_SEPARATOR +#define PATH_SEPARATOR '/' +#endif + +enum MDatabaseStatus + { + /* The database was defined automatically (from mdb.dir file(s)).*/ + MDB_STATUS_AUTO, + /* The database was defined explicitely (by mdatabase_define ()). */ + MDB_STATUS_EXPLICIT, + /* The databse is currently disabled. (usually because it is + deleted from mdb.dir file(s)). */ + MDB_STATUS_DISABLED + }; + +typedef struct +{ + /* Name of the file containing the database. */ + char *filename; + /* Length of FILENAME. */ + int len; + /* Absolute path of filename. */ + char *absolute_filename; + /* The current status of the database. */ + enum MDatabaseStatus status; + /* When the database was loaded last. 0 if it has never been + loaded. */ + time_t time; + char *lock_file, *uniq_file; +} MDatabaseInfo; + extern MPlist *mdatabase__dir_list; +extern void mdatabase__update (void); + extern MPlist *mdatabase__load_for_keys (MDatabase *mdb, MPlist *keys); extern int mdatabase__check (MDatabase *mdb); extern char *mdatabase__find_file (char *filename); +extern char *mdatabase__file (MDatabase *mdb); + +extern int mdatabase__lock (MDatabase *mdb); + +extern int mdatabase__save (MDatabase *mdb, MPlist *data); + +extern int mdatabase__unlock (MDatabase *mdb); + #endif /* not _M17N_DATABASE_H_ */ diff --git a/src/input-gui.c b/src/input-gui.c index eac22ce..8ea078b 100644 --- a/src/input-gui.c +++ b/src/input-gui.c @@ -688,7 +688,7 @@ MSymbol Mxim; and/or "S-" (Shift) in this order. For instance, if the keysym name is "a" and the event has Shift, - Meta, and Hyper modifiers, the resulting name is "H-M-A". + Meta, and Hyper modifiers, the resulting name is "M-H-A". At last, a symbol who has the name is returned. */ @@ -716,7 +716,7 @@ MSymbol Mxim; (Control), "S-" (Shift) ¤¬¤³¤Î½çÈÖ¤ÇÉÕ¤¯¡£ ¤¿¤È¤¨¤Ð¡¢keysym ̾¤¬ "a" ¤Ç¥¤¥Ù¥ó¥È¤¬ Shift, Meta, and Hyper - ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤ò»ý¤Æ¤Ð¡¢ÆÀ¤é¤ì¤ë̾Á°¤Ï "H-M-A" ¤Ç¤¢¤ë¡£ + ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤ò»ý¤Æ¤Ð¡¢ÆÀ¤é¤ì¤ë̾Á°¤Ï "M-H-A" ¤Ç¤¢¤ë¡£ ºÇ¸å¤Ë¤½¤Î̾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë¤òÊÖ¤¹¡£*/ -- 1.7.10.4