home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,424 of 243,242   
   bart to Thiago Adams   
   Re: New and improved version of cdecl   
   23 Oct 25 11:36:35   
   
   From: bc@freeuk.com   
      
   On 23/10/2025 02:19, Thiago Adams wrote:   
   > Em 22/10/2025 18:39, Keith Thompson escreveu:   
   >> This is cross-posted to comp.lang.c and comp.lang.c++.   
   >> Consider redirecting followups as appropriate.   
   >>   
   >> cdecl, along with c++decl, is a tool that translates C or C++   
   >> declaration syntax into English, and vice versa.  For example :   
   >>   
   >>      $ cdecl   
   >>      Type `help' or `?' for help   
   >>      cdecl> explain const char *foo[42]   
   >>      declare foo as array 42 of pointer to const char   
   >>      cdecl> declare bar as pointer to function (void) returning int   
   >>      int (*bar)(void )   
   >>   
   >> It's also available via the web site .   
   >   
   > This one does not work:   
   >   
   > void (*f(int i))(void)   
      
   KT said the newer version is only available by building from source   
   code, which must be done under some Linux-compatible system.   
      
   I've had a look: it comprises 32Kloc of configure script, and 68Kloc of   
   C sources, so 100Kloc just to decode declarations! (A bit longer than   
   the 2-page version in K&R2.)   
      
   (There's a further 30Kloc of what looks like C library code. So is this   
   a complete C compiler, or does it still only do declarations?)   
      
   Regarding your example, my old C compiler (which is a fraction the size   
   of this new Cdecl) 'explains' it as:   
      
      'ref proc(int)ref proc()void'   
      
   (Not quite English, more Algol68-ish.)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca