diff options
| author | Jason Rumney | 2004-09-01 21:20:10 +0000 |
|---|---|---|
| committer | Jason Rumney | 2004-09-01 21:20:10 +0000 |
| commit | 4f47337f1fed3490cdc555ea39df9396d082a685 (patch) | |
| tree | 5b5922018146ce94e79a7f8b1b8bc009f3f1e781 /src | |
| parent | b71f2b97d343dd5ec39b64b66de86051ee47eb3e (diff) | |
| download | emacs-4f47337f1fed3490cdc555ea39df9396d082a685.tar.gz emacs-4f47337f1fed3490cdc555ea39df9396d082a685.zip | |
(x_to_w32_font): Update to use new coding struct.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index ed0ab2e89f6..3599078b3a3 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5398,19 +5398,17 @@ x_to_w32_font (lpxstr, lplogfont) | |||
| 5398 | 5398 | ||
| 5399 | if (fields > 0 && name[0] != '*') | 5399 | if (fields > 0 && name[0] != '*') |
| 5400 | { | 5400 | { |
| 5401 | Lisp_Object string = build_string (name); | ||
| 5401 | setup_coding_system | 5402 | setup_coding_system |
| 5402 | (Fcheck_coding_system (Vlocale_coding_system), &coding); | 5403 | (Fcheck_coding_system (Vlocale_coding_system), &coding); |
| 5403 | coding.src_multibyte = 1; | 5404 | coding.mode |= (CODING_MODE_SAFE_ENCODING | CODING_MODE_LAST_BLOCK); |
| 5404 | coding.dst_multibyte = 1; | ||
| 5405 | coding.dst_bytes = strlen (name) * 2; | ||
| 5406 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); | ||
| 5407 | /* Disable composition/charset annotation. */ | 5405 | /* Disable composition/charset annotation. */ |
| 5408 | coding.common_flags &= ~CODING_ANNOTATION_MASK; | 5406 | coding.common_flags &= ~CODING_ANNOTATION_MASK; |
| 5409 | if (coding.type == coding_type_iso2022) | 5407 | coding.dst_bytes = SCHARS (string) * 2; |
| 5410 | coding.flags |= CODING_FLAG_ISO_SAFE; | 5408 | |
| 5411 | coding.mode |= CODING_MODE_LAST_BLOCK; | 5409 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); |
| 5412 | encode_coding_object (&coding, build_string (name), 0, 0, | 5410 | encode_coding_object (&coding, string, 0, 0, |
| 5413 | strlen (name), coding.dst_bytes, Qnil); | 5411 | SCHARS (string), SBYTES (string), Qnil); |
| 5414 | if (coding.produced >= LF_FACESIZE) | 5412 | if (coding.produced >= LF_FACESIZE) |
| 5415 | coding.produced = LF_FACESIZE - 1; | 5413 | coding.produced = LF_FACESIZE - 1; |
| 5416 | 5414 | ||