Lines Matching refs:man

333 	int		 format; /* current file in mdoc or man format */
918 roff_man_free1(struct roff_man *man)
921 if (man->first != NULL)
922 roff_node_delete(man, man->first);
923 free(man->meta.msec);
924 free(man->meta.vol);
925 free(man->meta.os);
926 free(man->meta.arch);
927 free(man->meta.title);
928 free(man->meta.name);
929 free(man->meta.date);
933 roff_man_alloc1(struct roff_man *man)
936 memset(&man->meta, 0, sizeof(man->meta));
937 man->first = mandoc_calloc(1, sizeof(*man->first));
938 man->first->type = ROFFT_ROOT;
939 man->last = man->first;
940 man->last_es = NULL;
941 man->flags = 0;
942 man->macroset = MACROSET_NONE;
943 man->lastsec = man->lastnamed = SEC_NONE;
944 man->next = ROFF_NEXT_CHILD;
948 roff_man_reset(struct roff_man *man)
951 roff_man_free1(man);
952 roff_man_alloc1(man);
956 roff_man_free(struct roff_man *man)
959 roff_man_free1(man);
960 free(man);
967 struct roff_man *man;
969 man = mandoc_calloc(1, sizeof(*man));
970 man->parse = parse;
971 man->roff = roff;
972 man->defos = defos;
973 man->quick = quick;
974 roff_man_alloc1(man);
975 return man;
981 roff_node_alloc(struct roff_man *man, int line, int pos,
991 n->sec = man->lastsec;
993 if (man->flags & MDOC_SYNOPSIS)
997 if (man->flags & MDOC_NEWLINE)
999 man->flags &= ~MDOC_NEWLINE;
1005 roff_node_append(struct roff_man *man, struct roff_node *n)
1008 switch (man->next) {
1010 if (man->last->next != NULL) {
1011 n->next = man->last->next;
1012 man->last->next->prev = n;
1014 man->last->parent->last = n;
1015 man->last->next = n;
1016 n->prev = man->last;
1017 n->parent = man->last->parent;
1020 man->last->child = n;
1021 n->parent = man->last;
1027 man->last = n;
1055 roff_word_alloc(struct roff_man *man, int line, int pos, const char *word)
1059 n = roff_node_alloc(man, line, pos, ROFFT_TEXT, TOKEN_NONE);
1060 n->string = roff_strdup(man->roff, word);
1061 roff_node_append(man, n);
1062 if (man->macroset == MACROSET_MDOC)
1066 man->next = ROFF_NEXT_SIBLING;
1070 roff_word_append(struct roff_man *man, const char *word)
1075 n = man->last;
1076 addstr = roff_strdup(man->roff, word);
1081 man->next = ROFF_NEXT_SIBLING;
1085 roff_elem_alloc(struct roff_man *man, int line, int pos, int tok)
1089 n = roff_node_alloc(man, line, pos, ROFFT_ELEM, tok);
1090 roff_node_append(man, n);
1091 man->next = ROFF_NEXT_CHILD;
1095 roff_block_alloc(struct roff_man *man, int line, int pos, int tok)
1099 n = roff_node_alloc(man, line, pos, ROFFT_BLOCK, tok);
1100 roff_node_append(man, n);
1101 man->next = ROFF_NEXT_CHILD;
1106 roff_head_alloc(struct roff_man *man, int line, int pos, int tok)
1110 n = roff_node_alloc(man, line, pos, ROFFT_HEAD, tok);
1111 roff_node_append(man, n);
1112 man->next = ROFF_NEXT_CHILD;
1117 roff_body_alloc(struct roff_man *man, int line, int pos, int tok)
1121 n = roff_node_alloc(man, line, pos, ROFFT_BODY, tok);
1122 roff_node_append(man, n);
1123 man->next = ROFF_NEXT_CHILD;
1128 roff_addeqn(struct roff_man *man, const struct eqn *eqn)
1132 n = roff_node_alloc(man, eqn->ln, eqn->pos, ROFFT_EQN, TOKEN_NONE);
1134 if (eqn->ln > man->last->line)
1136 roff_node_append(man, n);
1137 man->next = ROFF_NEXT_SIBLING;
1141 roff_addtbl(struct roff_man *man, const struct tbl_span *tbl)
1145 if (man->macroset == MACROSET_MAN)
1146 man_breakscope(man, TOKEN_NONE);
1147 n = roff_node_alloc(man, tbl->line, 0, ROFFT_TBL, TOKEN_NONE);
1149 roff_node_append(man, n);
1150 if (man->macroset == MACROSET_MDOC)
1154 man->next = ROFF_NEXT_SIBLING;
1158 roff_node_unlink(struct roff_man *man, struct roff_node *n)
1179 if (man == NULL)
1181 if (man->last == n) {
1183 man->last = n->parent;
1184 man->next = ROFF_NEXT_CHILD;
1186 man->last = n->prev;
1187 man->next = ROFF_NEXT_SIBLING;
1190 if (man->first == n)
1191 man->first = NULL;
1207 roff_node_delete(struct roff_man *man, struct roff_node *n)
1211 roff_node_delete(man, n->child);
1212 roff_node_unlink(man, n);
2726 * with DocBook stupidly fiddling with man(7) internals.