relocate mixed_to_glyphinfo to windows.c
This commit is contained in:
+1
-1
@@ -3142,7 +3142,6 @@ extern int hide_privileges(boolean);
|
|||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
extern int glyphrep(const char *);
|
extern int glyphrep(const char *);
|
||||||
extern char *mixed_to_utf8(char *buf, size_t bufsz, const char *str, int *);
|
extern char *mixed_to_utf8(char *buf, size_t bufsz, const char *str, int *);
|
||||||
extern const char *mixed_to_glyphinfo(const char *str, glyph_info *gip);
|
|
||||||
extern int match_glyph(char *);
|
extern int match_glyph(char *);
|
||||||
extern void dump_all_glyphids(FILE *fp);
|
extern void dump_all_glyphids(FILE *fp);
|
||||||
extern void fill_glyphid_cache(void);
|
extern void fill_glyphid_cache(void);
|
||||||
@@ -3417,6 +3416,7 @@ extern char *decode_mixed(char *, const char *);
|
|||||||
extern void genl_putmixed(winid, int, const char *);
|
extern void genl_putmixed(winid, int, const char *);
|
||||||
extern void genl_display_file(const char *, boolean);
|
extern void genl_display_file(const char *, boolean);
|
||||||
extern boolean menuitem_invert_test(int, unsigned, boolean);
|
extern boolean menuitem_invert_test(int, unsigned, boolean);
|
||||||
|
extern const char *mixed_to_glyphinfo(const char *str, glyph_info *gip);
|
||||||
|
|
||||||
/* ### windows.c ### */
|
/* ### windows.c ### */
|
||||||
|
|
||||||
|
|||||||
@@ -542,33 +542,6 @@ mixed_to_utf8(char *buf, size_t bufsz, const char *str, int *retflags)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* helper routine if a window port wants to extract the unicode
|
|
||||||
* representation from a glyph representation in the string;
|
|
||||||
* the returned string is the remainder of the string after
|
|
||||||
* extracting the \GNNNNNNNN information.
|
|
||||||
*/
|
|
||||||
const char *
|
|
||||||
mixed_to_glyphinfo(const char *str, glyph_info *gip)
|
|
||||||
{
|
|
||||||
int dcount, ggv;
|
|
||||||
|
|
||||||
if (!str || !gip)
|
|
||||||
return " ";
|
|
||||||
|
|
||||||
*gip = nul_glyphinfo;
|
|
||||||
if (*str == '\\' && *(str + 1) == 'G') {
|
|
||||||
if ((dcount = decode_glyph(str + 2, &ggv))) {
|
|
||||||
map_glyphinfo(0, 0, ggv, 0, gip);
|
|
||||||
/* 'str' is ready for the next loop iteration and
|
|
||||||
'*str' should not be copied at the end of this
|
|
||||||
iteration */
|
|
||||||
str += (dcount + 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_all_glyphids(FILE *fp)
|
dump_all_glyphids(FILE *fp)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1563,4 +1563,31 @@ menuitem_invert_test(
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* helper routine if a window port wants to extract the unicode
|
||||||
|
* representation from a glyph representation in the string;
|
||||||
|
* the returned string is the remainder of the string after
|
||||||
|
* extracting the \GNNNNNNNN information.
|
||||||
|
*/
|
||||||
|
const char *
|
||||||
|
mixed_to_glyphinfo(const char *str, glyph_info *gip)
|
||||||
|
{
|
||||||
|
int dcount, ggv;
|
||||||
|
|
||||||
|
if (!str || !gip)
|
||||||
|
return " ";
|
||||||
|
|
||||||
|
*gip = nul_glyphinfo;
|
||||||
|
if (*str == '\\' && *(str + 1) == 'G') {
|
||||||
|
if ((dcount = decode_glyph(str + 2, &ggv))) {
|
||||||
|
map_glyphinfo(0, 0, ggv, 0, gip);
|
||||||
|
/* 'str' is ready for the next loop iteration and
|
||||||
|
'*str' should not be copied at the end of this
|
||||||
|
iteration */
|
||||||
|
str += (dcount + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
/*windows.c*/
|
/*windows.c*/
|
||||||
|
|||||||
Reference in New Issue
Block a user