[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/main.c between version 1.57 and 1.59

version 1.57, 2009/11/02 08:29:25 version 1.59, 2010/01/29 14:39:38
Line 14 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #ifdef HAVE_CONFIG_H
   #include "config.h"
   #endif
   
 #include <sys/stat.h>  #include <sys/stat.h>
   
 #include <assert.h>  #include <assert.h>
Line 38 
Line 42 
 # endif  # endif
 #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */  #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
   
 #ifdef __linux__  
 extern  int               getsubopt(char **, char * const *, char **);  
 extern  size_t            strlcat(char *, const char *, size_t);  
 #endif  
   
 typedef void            (*out_mdoc)(void *, const struct mdoc *);  typedef void            (*out_mdoc)(void *, const struct mdoc *);
 typedef void            (*out_man)(void *, const struct man *);  typedef void            (*out_man)(void *, const struct man *);
 typedef void            (*out_free)(void *);  typedef void            (*out_free)(void *);
Line 62  enum outt {
Line 61  enum outt {
         OUTT_ASCII = 0,          OUTT_ASCII = 0,
         OUTT_TREE,          OUTT_TREE,
         OUTT_HTML,          OUTT_HTML,
           OUTT_XHTML,
         OUTT_LINT          OUTT_LINT
 };  };
   
Line 429  fdesc(struct buf *blk, struct buf *ln, struct curparse
Line 429  fdesc(struct buf *blk, struct buf *ln, struct curparse
   
         if ( ! (curp->outman && curp->outmdoc)) {          if ( ! (curp->outman && curp->outmdoc)) {
                 switch (curp->outtype) {                  switch (curp->outtype) {
                   case (OUTT_XHTML):
                           curp->outdata = xhtml_alloc(curp->outopts);
                           curp->outman = html_man;
                           curp->outmdoc = html_mdoc;
                           curp->outfree = html_free;
                           break;
                 case (OUTT_HTML):                  case (OUTT_HTML):
                         curp->outdata = html_alloc(curp->outopts);                          curp->outdata = html_alloc(curp->outopts);
                         curp->outman = html_man;                          curp->outman = html_man;
Line 551  toptions(enum outt *tflags, char *arg)
Line 557  toptions(enum outt *tflags, char *arg)
                 *tflags = OUTT_TREE;                  *tflags = OUTT_TREE;
         else if (0 == strcmp(arg, "html"))          else if (0 == strcmp(arg, "html"))
                 *tflags = OUTT_HTML;                  *tflags = OUTT_HTML;
           else if (0 == strcmp(arg, "xhtml"))
                   *tflags = OUTT_XHTML;
         else {          else {
                 fprintf(stderr, "%s: Bad argument\n", arg);                  fprintf(stderr, "%s: Bad argument\n", arg);
                 return(0);                  return(0);

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.59

CVSweb