source: trunk/emx/src/emxdoc/lb.h@ 2446

Last change on this file since 2446 was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1/* lb.h -- Line breaking
2 Copyright (c) 1993-1995 Eberhard Mattes
3
4This file is part of emxdoc.
5
6emxdoc is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11emxdoc is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with emxdoc; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22#define LB_NOMEM 1
23#define LB_INVAL 2
24#define LB_INTERN 3
25
26#define LBN_WORD 1
27#define LBN_PRE 2
28#define LBN_POST 3
29#define LBN_GLUE 4
30#define LBN_NEWLINE 5
31#define LBN_END 6
32
33#define LB_INFINITY 10000
34#define LB_SQRT_INFINITY 100
35
36#define LB_HYPHEN '*'
37
38struct lb;
39struct lbh;
40
41struct lb_node
42{
43 int type;
44 int value;
45 const char *word;
46 const void *info;
47};
48
49int lb_init (struct lb **pp, int lmargin, int rmargin);
50int lb_exit (struct lb **p);
51int lb_first_lmargin (struct lb *p, int margin);
52int lb_first_rmargin (struct lb *p, int margin);
53int lb_penalty (struct lb *p, int penalty);
54int lb_word (struct lb *p, int width, const char *word, const void *info);
55int lb_discr (struct lb *p, int width_word, const char *word,
56 int width_pre, const char *pre, int width_post, const char *post,
57 const void *info);
58int lb_hyphen (struct lb *p, int width, const void *info);
59int lb_glue (struct lb *p, int width, const void *info);
60int lb_format (struct lb *p);
61int lb_next (struct lb *p, struct lb_node *dst);
62
63int lb_use_hyphenation (struct lb *p, const struct lbh *h);
64
65int lbh_init (struct lbh **pp);
66int lbh_word (struct lbh *p, const char *s);
67int lbh_exit (struct lbh **pp);
Note: See TracBrowser for help on using the repository browser.