From: Urs Janssen Date: Sat, 16 Feb 2013 23:48:51 +0000 (+0100) Subject: add version number to manpage X-Git-Tag: release_0_9_27~1113 X-Git-Url: https://repo.or.cz/w/tinycc.git/commitdiff_plain/0bdbd49eac6ced7fbf6b5d2f5a13d7e9f3df54db add version number to manpage avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English) --- diff --git a/Makefile b/Makefile index 705b585d..4cb13c5a 100644 --- a/Makefile +++ b/Makefile @@ -300,11 +300,11 @@ endif # documentation and man page tcc-doc.html: tcc-doc.texi - -texi2html -monolithic -number $< + -texi2html -monolithic -number-sections $< tcc.1: tcc-doc.texi -$(top_srcdir)/texi2pod.pl $< tcc.pod - -pod2man --section=1 --center=" " --release=" " tcc.pod > $@ + -pod2man --section=1 --center="Tiny C Compiler" --release=`cat $(top_srcdir)/VERSION` tcc.pod > $@ tcc-doc.info: tcc-doc.texi -makeinfo $< diff --git a/arm-gen.c b/arm-gen.c index 69813955..3e86d9e7 100644 --- a/arm-gen.c +++ b/arm-gen.c @@ -24,7 +24,7 @@ #ifdef TARGET_DEFS_ONLY #ifdef TCC_ARM_EABI -#ifndef TCC_ARM_VFP // Avoid useless warning +#ifndef TCC_ARM_VFP /* Avoid useless warning */ #define TCC_ARM_VFP #endif #endif @@ -104,7 +104,7 @@ enum { /* defined if structures are passed as pointers. Otherwise structures are directly pushed on stack. */ -//#define FUNC_STRUCT_PARAM_AS_PTR +/* #define FUNC_STRUCT_PARAM_AS_PTR */ /* pointer size, in bytes */ #define PTR_SIZE 4 diff --git a/c67-gen.c b/c67-gen.c index b423ba6c..abf25dfb 100644 --- a/c67-gen.c +++ b/c67-gen.c @@ -20,7 +20,7 @@ #ifdef TARGET_DEFS_ONLY -//#define ASSEMBLY_LISTING_C67 +/* #define ASSEMBLY_LISTING_C67 */ /* number of available registers */ #define NB_REGS 24 @@ -93,11 +93,11 @@ enum { #define REG_FRET TREG_C67_A4 /* float return register */ /* defined if function parameters must be evaluated in reverse order */ -//#define INVERT_FUNC_PARAMS +/* #define INVERT_FUNC_PARAMS */ /* defined if structures are passed as pointers. Otherwise structures are directly pushed on stack. */ -//#define FUNC_STRUCT_PARAM_AS_PTR +/* #define FUNC_STRUCT_PARAM_AS_PTR */ /* pointer size, in bytes */ #define PTR_SIZE 4 @@ -253,7 +253,7 @@ void gsym(int t) #define C67_B3 107 #define C67_FP 108 #define C67_B2 109 -#define C67_CREG_ZERO -1 // Special code for no condition reg test +#define C67_CREG_ZERO -1 /* Special code for no condition reg test */ int ConvertRegToRegClass(int r) diff --git a/coff.h b/coff.h index 38960b40..ea871a7b 100644 --- a/coff.h +++ b/coff.h @@ -37,8 +37,8 @@ struct filehdr { #define F_BYTE_ORDER (F_LITTLE | F_BIG) #define FILHDR struct filehdr -//#define FILHSZ sizeof(FILHDR) -#define FILHSZ 22 // above rounds to align on 4 bytes which causes problems +/* #define FILHSZ sizeof(FILHDR) */ +#define FILHSZ 22 /* above rounds to align on 4 bytes which causes problems */ #define COFF_C67_MAGIC 0x00c2 @@ -150,7 +150,7 @@ struct scnhdr { /*------------------------------------------------------------------------*/ /* Define constants for names of "special" sections */ /*------------------------------------------------------------------------*/ -//#define _TEXT ".text" +/* #define _TEXT ".text" */ #define _DATA ".data" #define _BSS ".bss" #define _CINIT ".cinit" diff --git a/elf.h b/elf.h index a82d8f74..2983c757 100644 --- a/elf.h +++ b/elf.h @@ -1725,7 +1725,7 @@ typedef Elf32_Addr Elf32_Conflict; #define R_C60_GOTOFF 9 /* 32 bit offset to GOT */ #define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */ -#define R_C60HI16 0x55 // high 16 bit MVKH embedded -#define R_C60LO16 0x54 // low 16 bit MVKL embedded +#define R_C60HI16 0x55 /* high 16 bit MVKH embedded */ +#define R_C60LO16 0x54 /* low 16 bit MVKL embedded */ #endif /* elf.h */ diff --git a/i386-asm.c b/i386-asm.c index 664aadeb..f9c0fa70 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -21,7 +21,7 @@ #include "tcc.h" -// #define NB_ASM_REGS 8 +/* #define NB_ASM_REGS 8 */ #define MAX_OPERANDS 3 #define NB_SAVED_REGS 3 diff --git a/i386-gen.c b/i386-gen.c index c3f03c78..a9e19776 100644 --- a/i386-gen.c +++ b/i386-gen.c @@ -55,7 +55,7 @@ enum { /* defined if structures are passed as pointers. Otherwise structures are directly pushed on stack. */ -//#define FUNC_STRUCT_PARAM_AS_PTR +/* #define FUNC_STRUCT_PARAM_AS_PTR */ /* pointer size, in bytes */ #define PTR_SIZE 4 diff --git a/il-gen.c b/il-gen.c index c9b78068..170f436f 100644 --- a/il-gen.c +++ b/il-gen.c @@ -53,11 +53,11 @@ const int reg_classes[NB_REGS] = { #define REG_FRET REG_ST0 /* float return register */ /* defined if function parameters must be evaluated in reverse order */ -//#define INVERT_FUNC_PARAMS +/* #define INVERT_FUNC_PARAMS */ /* defined if structures are passed as pointers. Otherwise structures are directly pushed on stack. */ -//#define FUNC_STRUCT_PARAM_AS_PTR +/* #define FUNC_STRUCT_PARAM_AS_PTR */ /* pointer size, in bytes */ #define PTR_SIZE 4 diff --git a/lib/bcheck.c b/lib/bcheck.c index 54124b9e..064fb5d4 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -29,11 +29,11 @@ #include #endif -//#define BOUND_DEBUG +/* #define BOUND_DEBUG */ /* define so that bound array is static (faster, but use memory if bound checking not used) */ -//#define BOUND_STATIC +/* #define BOUND_STATIC */ /* use malloc hooks. Currently the code cannot be reliable if no hooks */ #define CONFIG_TCC_MALLOC_HOOKS diff --git a/libtcc.c b/libtcc.c index af0fb7f7..6b8f2376 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1018,7 +1018,7 @@ LIBTCCAPI TCCState *tcc_new(void) s->char_is_unsigned = 1; #endif /* enable this if you want symbols with leading underscore on windows: */ -#if 0 //def TCC_TARGET_PE +#if 0 /* def TCC_TARGET_PE */ s->leading_underscore = 1; #endif #ifdef TCC_TARGET_I386 diff --git a/tcc-doc.texi b/tcc-doc.texi index 42ca8068..f5e6d6d0 100644 --- a/tcc-doc.texi +++ b/tcc-doc.texi @@ -388,13 +388,14 @@ and floating point numbers (@code{long double}, @code{double}, and @section ISOC99 extensions TCC implements many features of the new C standard: ISO C99. Currently -missing items are: complex and imaginary numbers and variable length -arrays. +missing items are: complex and imaginary numbers. Currently implemented ISOC99 features: @itemize +@item variable length arrays. + @item 64 bit @code{long long} types are fully supported. @item The boolean type @code{_Bool} is supported. diff --git a/tcc.h b/tcc.h index 2c2936c9..822e9987 100644 --- a/tcc.h +++ b/tcc.h @@ -98,21 +98,21 @@ #include "libtcc.h" /* parser debug */ -//#define PARSE_DEBUG +/* #define PARSE_DEBUG */ /* preprocessor debug */ -//#define PP_DEBUG +/* #define PP_DEBUG */ /* include file debug */ -//#define INC_DEBUG +/* #define INC_DEBUG */ /* memory leak debug */ -//#define MEM_DEBUG +/* #define MEM_DEBUG */ /* assembler debug */ -//#define ASM_DEBUG +/* #define ASM_DEBUG */ /* target selection */ -//#define TCC_TARGET_I386 /* i386 code generator */ -//#define TCC_TARGET_ARM /* ARMv4 code generator */ -//#define TCC_TARGET_C67 /* TMS320C67xx code generator */ -//#define TCC_TARGET_X86_64 /* x86-64 code generator */ +/* #define TCC_TARGET_I386 *//* i386 code generator */ +/* #define TCC_TARGET_ARM *//* ARMv4 code generator */ +/* #define TCC_TARGET_C67 *//* TMS320C67xx code generator */ +/* #define TCC_TARGET_X86_64 *//* x86-64 code generator */ /* default target is I386 */ #if !defined(TCC_TARGET_I386) && !defined(TCC_TARGET_ARM) && \ @@ -894,7 +894,7 @@ struct TCCState { DEF_ASM(x ## nle) \ DEF_ASM(x ## g) -#endif // defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 +#endif /* defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 */ enum tcc_token { TOK_LAST = TOK_IDENT - 1, @@ -909,10 +909,10 @@ enum tcc_token { #define snprintf _snprintf #define vsnprintf _vsnprintf #ifndef __GNUC__ - #define strtold (long double)strtod - #define strtof (float)strtod - #define strtoll _strtoi64 - #define strtoull _strtoui64 +# define strtold (long double)strtod +# define strtof (float)strtod +# define strtoll _strtoi64 +# define strtoull _strtoui64 #endif #else /* XXX: need to define this to use them in non ISOC99 context */ diff --git a/tccelf.c b/tccelf.c index 500ea189..8af4bb63 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1835,7 +1835,7 @@ static int elf_output_file(TCCState *s1, const char *filename) for(i = 1; i < s1->nb_sections; i++) { s = s1->sections[i]; s->sh_name = put_elf_str(strsec, s->name); -#if 0 //gr +#if 0 /* gr */ printf("section: f=%08x t=%08x i=%08x %s %s\n", s->sh_flags, s->sh_type, diff --git a/tccpe.c b/tccpe.c index 79be6f3a..f7a200ca 100644 --- a/tccpe.c +++ b/tccpe.c @@ -30,7 +30,7 @@ #endif #define PE_MERGE_DATA -// #define PE_PRINT_SECTIONS +/* #define PE_PRINT_SECTIONS */ #ifdef TCC_TARGET_X86_64 # define ADDR3264 ULONGLONG diff --git a/win32/include/inttypes.h b/win32/include/inttypes.h index 1a5b555a..73600919 100644 --- a/win32/include/inttypes.h +++ b/win32/include/inttypes.h @@ -239,7 +239,7 @@ typedef struct { #define SCNiPTR "i" #define SCNoPTR "o" #define SCNxPTR "x" - #define SCNuPTR "u" +#define SCNuPTR "u" #endif #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L diff --git a/win32/include/stdio.h b/win32/include/stdio.h index 627fc92d..da887936 100644 --- a/win32/include/stdio.h +++ b/win32/include/stdio.h @@ -241,8 +241,8 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ /* Make sure macros are not defined. */ #pragma push_macro("vsnprintf") #pragma push_macro("snprintf") - #undef vsnprintf - #undef snprintf +# undef vsnprintf +# undef snprintf extern __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3))) int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); @@ -267,14 +267,14 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ #pragma pop_macro("snprintf") #pragma pop_macro("vsnprintf") /* Check if vsnprintf and snprintf are defaulting to gnu-style. */ - #if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF - #ifndef vsnprint - #define vsnprintf __mingw_vsnprintf - #endif - #ifndef snprintf - #define snprintf __mingw_snprintf - #endif - #endif +# if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF +# ifndef vsnprint +# define vsnprintf __mingw_vsnprintf +# endif +# ifndef snprintf +# define snprintf __mingw_snprintf +# endif +# endif _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList); _CRTIMP int __cdecl _set_printf_count_output(int _Value); _CRTIMP int __cdecl _get_printf_count_output(void); diff --git a/win32/include/sys/stat.h b/win32/include/sys/stat.h index 8f8b0b29..344d4a24 100644 --- a/win32/include/sys/stat.h +++ b/win32/include/sys/stat.h @@ -25,7 +25,7 @@ extern "C" { #include -#ifndef __TINYC__ //gr +#ifndef __TINYC__ /* gr */ #ifdef _USE_32BIT_TIME_T #ifdef _WIN64 #undef _USE_32BIT_TIME_T diff --git a/win32/include/sys/timeb.h b/win32/include/sys/timeb.h index b2281beb..34837738 100644 --- a/win32/include/sys/timeb.h +++ b/win32/include/sys/timeb.h @@ -22,7 +22,7 @@ extern "C" { #define _CRTIMP __declspec(dllimport) #endif -#ifndef __TINYC__ //gr +#ifndef __TINYC__ /* gr */ #ifdef _USE_32BIT_TIME_T #ifdef _WIN64 #undef _USE_32BIT_TIME_T diff --git a/win32/include/sys/types.h b/win32/include/sys/types.h index b5dfbd32..7379b0f1 100644 --- a/win32/include/sys/types.h +++ b/win32/include/sys/types.h @@ -12,7 +12,7 @@ #include <_mingw.h> -#ifndef __TINYC__ //gr +#ifndef __TINYC__ /* gr */ #ifdef _USE_32BIT_TIME_T #ifdef _WIN64 #undef _USE_32BIT_TIME_T diff --git a/win32/include/sys/utime.h b/win32/include/sys/utime.h index f8f30a21..fec8304f 100644 --- a/win32/include/sys/utime.h +++ b/win32/include/sys/utime.h @@ -27,7 +27,7 @@ extern "C" { #define _WCHAR_T_DEFINED #endif -#ifndef __TINYC__ //gr +#ifndef __TINYC__ /* gr */ #ifdef _USE_32BIT_TIME_T #ifdef _WIN64 #undef _USE_32BIT_TIME_T diff --git a/win32/include/winapi/windef.h b/win32/include/winapi/windef.h index b3ff2654..3e388167 100644 --- a/win32/include/winapi/windef.h +++ b/win32/include/winapi/windef.h @@ -110,7 +110,7 @@ extern "C" { typedef DWORD *PDWORD; typedef DWORD *LPDWORD; typedef void *LPVOID; - #ifndef _LPCVOID_DEFINED +# ifndef _LPCVOID_DEFINED #define _LPCVOID_DEFINED typedef CONST void *LPCVOID; #endif diff --git a/win32/include/winapi/winerror.h b/win32/include/winapi/winerror.h index a904cefa..77d85edc 100644 --- a/win32/include/winapi/winerror.h +++ b/win32/include/winapi/winerror.h @@ -1763,7 +1763,7 @@ #ifndef WSA_QOS_RESERVED_PETYPE #define WSA_QOS_RESERVED_PETYPE 11031L #endif -#endif // WSABASEERR +#endif /* WSABASEERR */ #define ERROR_SXS_SECTION_NOT_FOUND 14000L #define ERROR_SXS_CANT_GEN_ACTCTX 14001L @@ -3163,4 +3163,4 @@ __CRT_INLINE HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x : ( #define COMADMIN_E_SAFERINVALID _HRESULT_TYPEDEF_(0x80110822L) #define COMADMIN_E_REGISTRY_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110823L) #define COMADMIN_E_PARTITIONS_DISABLED _HRESULT_TYPEDEF_(0x80110824L) -#endif // _WINERROR_ +#endif /* _WINERROR_ */