tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Importing the apropos GSoC code and switching to mandoc(1) by default



In article <20120206205330.GA10780%britannica.bec.de@localhost>,
Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
> 
>+.if MKMAKEMANDB == "no"
>+SUBDIR+= apropos whatis
>+.endif

This needs ${}

>+              arg = malloc(command_len );

whitespace

>+              if (n && n->type == MDOC_TEXT) {

>+                      size_t len = strlen(sn->string);
>+                      char *buf = emalloc(len + 4);
>+                      memcpy(buf, sn->string, len);
>+                      buf[len] = '(';
>+                      buf[len + 1] = n->string[0];
>+                      buf[len + 2] = ')';
>+                      buf[len + 3] = 0;

easprintf(&buf, "%s(%c)", sn->string, n->string[0]);

>+                      mdoc_parse_section(n->sec, buf, rec);
>+                      free(buf);


christos



Home | Main Index | Thread Index | Old Index