From: Matthew Fernandez Date: Sat, 25 Sep 2021 01:58:05 +0000 (-0700) Subject: lefty: remove C++ guards X-Git-Tag: 2.49.2~36^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10a1799f11efdc769c3e9e5729b8dfa53ecb7e7e;p=graphviz lefty: remove C++ guards This program is entirely C, so does not need these explicit linkage specs. --- diff --git a/cmd/lefty/aix_mods/common.h b/cmd/lefty/aix_mods/common.h index 8fe211196..250e82f6a 100644 --- a/cmd/lefty/aix_mods/common.h +++ b/cmd/lefty/aix_mods/common.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Bell Laboratories */ #ifndef _COMMON_H @@ -76,7 +72,3 @@ extern "C" { #undef NORETURN #endif /* _COMMON_H */ - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/code.h b/cmd/lefty/code.h index c6d91c74c..f09861edb 100644 --- a/cmd/lefty/code.h +++ b/cmd/lefty/code.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #define C_NULL -1 @@ -94,8 +90,3 @@ int Cnew (int); int Cinteger (long); int Creal (double); int Cstring (char *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/common.h b/cmd/lefty/common.h index 3bcfdb4d3..53c86fc09 100644 --- a/cmd/lefty/common.h +++ b/cmd/lefty/common.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #ifndef _COMMON_H @@ -106,7 +102,3 @@ NORETURN void panic2 (char *, int, char *, char *, ...); #undef NORETURN #endif /* _COMMON_H */ - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/cs2l/cs2l.h b/cmd/lefty/cs2l/cs2l.h index 5d8a6ad6e..804f6c90e 100644 --- a/cmd/lefty/cs2l/cs2l.h +++ b/cmd/lefty/cs2l/cs2l.h @@ -10,12 +10,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - int C2Lopen(char *, char *, FILE **, FILE **); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/display.h b/cmd/lefty/display.h index 4c8e461d1..56527a3dd 100644 --- a/cmd/lefty/display.h +++ b/cmd/lefty/display.h @@ -10,16 +10,8 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ void Dinit (void); void Dterm (void); void Dtrace (Tobj, int); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/dot2l/dot2l.h b/cmd/lefty/dot2l/dot2l.h index 4a90db555..37645bc2c 100644 --- a/cmd/lefty/dot2l/dot2l.h +++ b/cmd/lefty/dot2l/dot2l.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #define SMALLBUF 128 int yyparse(void); @@ -62,8 +58,3 @@ void D2Lbeginedge (int, Tobj, char *); void D2Lmidedge (int, Tobj, char *); void D2Lendedge (void); void D2Lsetattr (char *, char *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/dot2l/triefa.h b/cmd/lefty/dot2l/triefa.h index 871c14e14..5c5b77522 100644 --- a/cmd/lefty/dot2l/triefa.h +++ b/cmd/lefty/dot2l/triefa.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* File - TrieFA.h The data types for the generated trie-baseed finite automata. */ @@ -33,8 +29,3 @@ typedef struct TrieTrans TrieTrans; extern TrieState TrieStateTbl[]; extern TrieTrans TrieTransTbl[]; - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/exec.h b/cmd/lefty/exec.h index 4a8a2abfe..cea66141e 100644 --- a/cmd/lefty/exec.h +++ b/cmd/lefty/exec.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ typedef struct Tonm_t lvar_t; @@ -27,8 +23,3 @@ void Einit (void); void Eterm (void); Tobj Eunit (Tobj); Tobj Efunction (Tobj, char *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/g.h b/cmd/lefty/g.h index 2aa1ca74a..f61ac67cf 100644 --- a/cmd/lefty/g.h +++ b/cmd/lefty/g.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #ifdef FEATURE_X11 @@ -546,8 +542,3 @@ void Gerr (char *, int, int, ...); #define G_ERRCANNOTCREATEBITMAP 20 #define G_ERRNOBITMAP 21 #define G_ERRCANNOTREADBITMAP 22 - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/gfxview.h b/cmd/lefty/gfxview.h index 4ea844710..245bbd53b 100644 --- a/cmd/lefty/gfxview.h +++ b/cmd/lefty/gfxview.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ void GFXinit (void); @@ -51,8 +47,3 @@ int GFXclearpick (int, lvar_t *); int GFXsetpick (int, lvar_t *); int GFXdisplaymenu (int, lvar_t *); int GFXcolormap (int, lvar_t *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/internal.h b/cmd/lefty/internal.h index c20b63b19..bab850e70 100644 --- a/cmd/lefty/internal.h +++ b/cmd/lefty/internal.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ typedef struct Ifunc_t { @@ -28,8 +24,3 @@ int Igetfunc (char *); extern Ifunc_t Ifuncs[]; extern int Ifuncn; - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/leftyio.h b/cmd/lefty/leftyio.h index a4c3a25ce..7fd42d665 100644 --- a/cmd/lefty/leftyio.h +++ b/cmd/lefty/leftyio.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #define IO_FILE 0 @@ -68,8 +64,3 @@ int IOclose (int, char *); int IOreadline (int, char *, int); int IOread (int, char *, int); int IOwriteline (int, char *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/lex.h b/cmd/lefty/lex.h index e8605d448..cbeeea6be 100644 --- a/cmd/lefty/lex.h +++ b/cmd/lefty/lex.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #define L_SEMI 0 @@ -69,8 +65,3 @@ void Lsetsrc (int, char *, FILE *, int, int); void Lgetsrc (int *, char **, FILE **, int *, int *); void Lprintpos (void); void Lgtok (void); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/mem.h b/cmd/lefty/mem.h index 680e08843..d19c6538f 100644 --- a/cmd/lefty/mem.h +++ b/cmd/lefty/mem.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #ifdef FEATURE_MINTSIZE @@ -59,8 +55,3 @@ void Mresetmark (long, void *); void Mmkcurr (void *); void Mdogc (int); void Mreport (void); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/parse.h b/cmd/lefty/parse.h index 87990db7f..14f923bf4 100644 --- a/cmd/lefty/parse.h +++ b/cmd/lefty/parse.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ typedef struct Psrc_t { @@ -29,7 +25,3 @@ void Pterm (void); Tobj Punit (Psrc_t *); Tobj Pfcall (Tobj, Tobj); Tobj Pfunction (char *, int); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/str.h b/cmd/lefty/str.h index d01026926..a9f4dc137 100644 --- a/cmd/lefty/str.h +++ b/cmd/lefty/str.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ void Sinit (void); @@ -24,7 +20,3 @@ char *Sabstract (Tobj, Tobj); char *Stfull (Tobj); char *Ssfull (Tobj, Tobj); char *Scfull (Tobj, int, int); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/tbl.h b/cmd/lefty/tbl.h index d383a7dd5..777c2bcc4 100644 --- a/cmd/lefty/tbl.h +++ b/cmd/lefty/tbl.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #pragma once @@ -132,7 +128,3 @@ void Tdelo (Tobj, Tobj); Tobj Tcopy (Tobj); void Tgetfirst (Tobj, Tkvindex_t *); void Tgetnext (Tkvindex_t *); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/txtview.h b/cmd/lefty/txtview.h index 3da1d97f4..441a3a338 100644 --- a/cmd/lefty/txtview.h +++ b/cmd/lefty/txtview.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ void TXTinit (Grect_t); @@ -23,7 +19,3 @@ int TXTask (int argc, lvar_t *argv); void TXTprocess (int, char *); void TXTupdate (void); void TXTtoggle (int, void *); - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/ws/mswin32/gcommon.h b/cmd/lefty/ws/mswin32/gcommon.h index 8e34f74c0..b45d31498 100644 --- a/cmd/lefty/ws/mswin32/gcommon.h +++ b/cmd/lefty/ws/mswin32/gcommon.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ extern HANDLE hinstance, hprevinstance; @@ -169,8 +165,3 @@ void Gawdeletechild (Gwidget_t *, Gwidget_t *); void Gadjustwrect (Gwidget_t *, PIXsize_t *); void Gadjustclip (Gwidget_t *); Gpoint_t ppixtodraw (Gwidget_t *, PIXpoint_t); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/mswin32/resource.h b/cmd/lefty/ws/mswin32/resource.h index fc75e60c9..a310975df 100644 --- a/cmd/lefty/ws/mswin32/resource.h +++ b/cmd/lefty/ws/mswin32/resource.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by lefty.rc @@ -32,7 +28,3 @@ extern "C" { #define _APS_NEXT_SYMED_VALUE 101 #endif #endif - -#ifdef __cplusplus -} -#endif diff --git a/cmd/lefty/ws/none/gcommon.h b/cmd/lefty/ws/none/gcommon.h index 52bb4d413..70cc6859d 100644 --- a/cmd/lefty/ws/none/gcommon.h +++ b/cmd/lefty/ws/none/gcommon.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ typedef struct { @@ -124,8 +120,3 @@ int GVgetwidgetattr (Gwidget_t *, int, Gwattr_t *); int GVdestroywidget (Gwidget_t *); void Gawdefcoordscb (int, Gawdata_t *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/x11/gcommon.h b/cmd/lefty/ws/x11/gcommon.h index 75cd6d62d..3d3760e87 100644 --- a/cmd/lefty/ws/x11/gcommon.h +++ b/cmd/lefty/ws/x11/gcommon.h @@ -10,10 +10,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - /* Lefteris Koutsofios - AT&T Labs Research */ #if XlibSpecificationRelease < 5 @@ -206,8 +202,3 @@ extern XtTranslations Gqwdeltable; extern XtTranslations Gwmdeltable; extern Atom Gqwdelatom, Gwmdelatom; - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/x11/libfilereq/SF.h b/cmd/lefty/ws/x11/libfilereq/SF.h index 5c1d1457e..61926eb0c 100644 --- a/cmd/lefty/ws/x11/libfilereq/SF.h +++ b/cmd/lefty/ws/x11/libfilereq/SF.h @@ -8,16 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - int XsraSelFile ( Widget, char *, char *, char *, char *, char *, char *, int (*) (char *, char **, struct stat *), char *, int ); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/x11/libfilereq/SFDecls.h b/cmd/lefty/ws/x11/libfilereq/SFDecls.h index 44c259508..b158b5d14 100644 --- a/cmd/lefty/ws/x11/libfilereq/SFDecls.h +++ b/cmd/lefty/ws/x11/libfilereq/SFDecls.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* SFDecls.h */ /* We don't rely on compiler doing the right thing @@ -39,8 +35,3 @@ void SFsetText (char *path); /* Dir.c */ int SFcompareEntries (const void *vp, const void *vq); int SFgetDir (SFDir *dir); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/x11/libfilereq/SFinternal.h b/cmd/lefty/ws/x11/libfilereq/SFinternal.h index ecce65a87..94f01b4ea 100644 --- a/cmd/lefty/ws/x11/libfilereq/SFinternal.h +++ b/cmd/lefty/ws/x11/libfilereq/SFinternal.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan * @@ -148,8 +144,3 @@ char SFstatChar (struct stat *); extern XtIntervalId SFdirModTimerId; extern int (*SFfunc) (char *, char **, struct stat *); - -#ifdef __cplusplus -} -#endif - diff --git a/cmd/lefty/ws/x11/libfilereq/xstat.h b/cmd/lefty/ws/x11/libfilereq/xstat.h index 57172f95e..cadfdde21 100644 --- a/cmd/lefty/ws/x11/libfilereq/xstat.h +++ b/cmd/lefty/ws/x11/libfilereq/xstat.h @@ -8,10 +8,6 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - #include #if !defined(S_ISDIR) && defined(S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) @@ -34,8 +30,3 @@ extern "C" { #endif #define S_ISXXX(m) ((m) & (S_IXUSR | S_IXGRP | S_IXOTH)) - -#ifdef __cplusplus -} -#endif -