version 1.158, 2010/07/03 16:02:12 |
version 1.161, 2010/07/16 22:33:30 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> |
|
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
#include "chars.h" |
#include "chars.h" |
#include "out.h" |
#include "out.h" |
#include "regs.h" |
|
#include "term.h" |
#include "term.h" |
#include "main.h" |
#include "main.h" |
|
|
Line 365 spec(struct termp *p, const char *word, size_t len) |
|
Line 365 spec(struct termp *p, const char *word, size_t len) |
|
const char *rhs; |
const char *rhs; |
size_t sz; |
size_t sz; |
|
|
rhs = chars_a2ascii(p->symtab, word, len, &sz); |
rhs = chars_spec2str(p->symtab, word, len, &sz); |
if (rhs) |
if (rhs) |
encode(p, rhs, sz); |
encode(p, rhs, sz); |
} |
} |
Line 377 res(struct termp *p, const char *word, size_t len) |
|
Line 377 res(struct termp *p, const char *word, size_t len) |
|
const char *rhs; |
const char *rhs; |
size_t sz; |
size_t sz; |
|
|
rhs = chars_a2res(p->symtab, word, len, &sz); |
rhs = chars_res2str(p->symtab, word, len, &sz); |
if (NULL == rhs) { |
|
rhs = roff_getstrn(word, len); |
|
if (rhs) |
|
sz = strlen(rhs); |
|
} |
|
if (rhs) |
if (rhs) |
encode(p, rhs, sz); |
encode(p, rhs, sz); |
} |
} |