=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/mandoc/term.c 2010/05/14 19:52:43 1.31 --- src/usr.bin/mandoc/term.c 2010/05/15 21:09:53 1.32 *************** *** 1,4 **** ! /* $Id: term.c,v 1.31 2010/05/14 19:52:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: term.c,v 1.32 2010/05/15 21:09:53 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 30,36 **** #include "mdoc.h" #include "main.h" ! static struct termp *term_alloc(enum termenc); static void term_free(struct termp *); static void spec(struct termp *, const char *, size_t); static void res(struct termp *, const char *, size_t); --- 30,36 ---- #include "mdoc.h" #include "main.h" ! static struct termp *term_alloc(enum termenc, size_t); static void term_free(struct termp *); static void spec(struct termp *, const char *, size_t); static void res(struct termp *, const char *, size_t); *************** *** 41,50 **** void * ! ascii_alloc(void) { ! return(term_alloc(TERMENC_ASCII)); } --- 41,50 ---- void * ! ascii_alloc(size_t width) { ! return(term_alloc(TERMENC_ASCII, width)); } *************** *** 70,76 **** static struct termp * ! term_alloc(enum termenc enc) { struct termp *p; --- 70,76 ---- static struct termp * ! term_alloc(enum termenc enc, size_t width) { struct termp *p; *************** *** 81,86 **** --- 81,90 ---- } p->tabwidth = 5; p->enc = enc; + /* Enforce some lower boundary. */ + if (width < 60) + width = 60; + p->defrmargin = width - 2; return(p); }