=================================================================== RCS file: /cvs/texi2mdoc/extern.h,v retrieving revision 1.15 retrieving revision 1.19 diff -u -p -r1.15 -r1.19 --- texi2mdoc/extern.h 2015/02/25 14:37:17 1.15 +++ texi2mdoc/extern.h 2015/02/28 08:41:59 1.19 @@ -1,4 +1,4 @@ -/* $Id: extern.h,v 1.15 2015/02/25 14:37:17 kristaps Exp $ */ +/* $Id: extern.h,v 1.19 2015/02/28 08:41:59 kristaps Exp $ */ /* * Copyright (c) 2015 Kristaps Dzonsons * @@ -17,6 +17,21 @@ #ifndef EXTERN_H #define EXTERN_H +#if !defined(__BEGIN_DECLS) +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS +# endif +#endif +#if !defined(__END_DECLS) +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS +# endif +#endif + /* * This defines each one of the Texinfo commands that we understand. * Obviously this only refers to native commands; overriden names are a @@ -301,6 +316,8 @@ struct texifile { char *map; /* allocated file buffer */ size_t mapsz; /* size of map */ size_t mapmaxsz; /* full size of map */ + size_t insplice; /* how many bytes left in splice */ + size_t depth; /* pasted macro recursive depth */ }; struct texi; @@ -400,7 +417,7 @@ void advanceto(struct texi *, size_t *, size_t); char **argparse(struct texi *, size_t *, size_t *, size_t); int parsearg(struct texi *, size_t *, size_t); -void parsebracket(struct texi *, size_t *); +void parsebracket(struct texi *, size_t *, int); void parsestdin(struct texi *); void parsefile(struct texi *, const char *, int); int parselinearg(struct texi *, size_t *); @@ -410,8 +427,7 @@ void parseto(struct texi *, size_t *, const char *); void texiabort(struct texi *, const char *) __attribute__((noreturn)); enum texicmd - texicmd(struct texi *, size_t, - size_t *, struct teximacro **); + texicmd(struct texi *, size_t, size_t *, struct teximacro **); void texierr(struct texi *, const char *, ...) __attribute__((format(printf, 2, 3))) __attribute__((noreturn));