From: handa Date: Wed, 13 Jun 2007 08:06:55 +0000 (+0000) Subject: (load_command): Prepend "^" in the regular expression. X-Git-Tag: FLT-base~10 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bf9f4831015bed7d828280d911fb52f8a20ee9f;p=m17n%2Fm17n-lib.git (load_command): Prepend "^" in the regular expression. --- diff --git a/src/font-flt.c b/src/font-flt.c index 9f7b723..4a11c0b 100644 --- a/src/font-flt.c +++ b/src/font-flt.c @@ -633,8 +633,14 @@ load_command (FontLayoutStage *stage, MPlist *plist, cmd->type = FontLayoutCmdTypeRule; if (MPLIST_MTEXT_P (elt)) { - char *str = (char *) MTEXT_DATA (MPLIST_MTEXT (elt)); + MText *mt = MPLIST_MTEXT (elt); + char *str = (char *) MTEXT_DATA (mt); + if (str[0] != '^') + { + mtext_ins_char (mt, 0, '^', 1); + str = (char *) MTEXT_DATA (mt); + } if (regcomp (&cmd->body.rule.src.re.preg, str, REG_EXTENDED)) MERROR (MERROR_FONT, INVALID_CMD_ID); cmd->body.rule.src_type = SRC_REGEX;