Your message dated Tue, 2 Sep 2025 17:28:56 +0200
with message-id 
<x5xbwdowxrbrpcsilyd7y25rskc5cujtqyqzwk3qqhsk6ww...@tarta.nabijaczleweli.xyz>
and subject line Close: Bug#1112127: cproto: fails to forward -D arguments to 
the preprocessor
has caused the Debian Bug report #1112127,
regarding cproto: doesn't understand real/valid C code (tgif 1:4.2.5-2 exec.c), 
in -a mode only?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1112127: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112127
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cproto
Version: 4.7x-1
Severity: normal

Dear Maintainer,

If you dget src:tgif 1:4.2.5-2 and run
  cproto -{P,F,C}"int f(a, b)" exec.c
you'll get a dump of the prototypes.

If you run
  cproto -a -{P,F,C}"int f(a, b)" exec.c
you'll instead get a lot of output,
/some/ prototypes changed,
but that output ends with
  exec.c:10428: syntax error at token ''
with the transformation edge at
-- >8 --
int PipeReachedEOF(FILE *fp)
{
   if (feof(fp)) return TRUE;

   /* this works because of non-blocking I/O */
   while (getc(fp) != EOF) ;
#ifdef EAGAIN
   if (errno == EINPROGRESS || errno == EAGAIN) {
#else /* ~EAGAIN */
   if (errno == EINPROGRESS) {
#endif /* EAGAIN */
      /* do nothing */
      return FALSE;
   }
   /* a real EOF */
   return TRUE;
}

int WaitForEvent(fp, fp_is_pipe, fp_is_named_pipe, pn_quit,
      what_to_do_with_x_events, pf_abort_callback, p_void)
   FILE *fp;
   int fp_is_pipe, fp_is_named_pipe, *pn_quit, what_to_do_with_x_events;
   AbortCallbackFunc *pf_abort_callback;
   void *p_void;
   /*
    * returns TRUE if there's character waiting in fp
    *
    * This routine is not really general purpose because characters can
    *       swallowed in the PipeReachedEOF() routine.
    * So if for any reason the content of the pipe is required, don't
    *       use this function!
    * fp_is_pipe is TRUE if fp is opened with popen().  This is not the
    *       same as a named pipe.
    * fp_is_named_pipe is TRUE if fp is a named pipe (S_IFIFO).
    */
{
   int rc=FALSE;

   *pn_quit = FALSE;
-- >8 --

exec.c starts by having 10427 lines,
so the error occurs one-past-the-end of that?

The compiler understands the code before and after the transformation
(so long as K&R declarations are allowed, of course).

Best,

-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-35-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cproto depends on:
ii  gcc    4:12.2.0-3
ii  libc6  2.36-9+deb12u10

cproto recommends no packages.

cproto suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 4.7y-1

On Tue, Sep 02, 2025 at 05:40:18AM -0400, Thomas Dickey wrote:
> The updated manpage also clarifies the known limitations of cproto's
> built-in support for preprocessor directives which prevent its being
> used for general-purpose transformation of source code.
> 
> This bug can be either closed (wontfix) or changed to a wishlist item.
I've reviewed the 4.7y-1 manual, and I think if I had it while doing the
tgif conversion I would not have felt the need to have opened the bugs,
which is equivalent to being fixed. Thus, closing; thanks.

> In either case, it's unlikely that someone's going to write a full-fledged
> C preprocessor which can be used in this application.
Nor do I think this would be a good use of anyone's time, frankly.

Best,

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to