bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Multiprocessing and remote processing committed to CVS


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Multiprocessing and remote processing committed to CVS
Date: Sat, 31 May 2003 07:13:13 +0000
User-agent: Mutt/1.4.1i

On Sat, May 31, 2003 at 03:52:14AM +0200, Olivier Baur wrote
> Le samedi, 31 mai 2003, à 00:01 Europe/Paris, Joern Thyssen a écrit :
> 
> >I've managed to compile it (there is a bit C++ specific code that gcc
> >doesn't like).
> 
> C++ specific code?

For example,

      if (sz != NULL) {
          sscanf (sz, "%d", &procunit_id);
         procunit *ppu = FindProcessingUnit (NULL, pu_type_none,
                                             pu_stat_none,
                                             pu_task_none, procunit_id);

          if (ppu == NULL) {
              outputf ( "No processing unit found with specified id (%d).\n"

In C you can't declare variables in the middle of a block, so it has to
be rewritten to

      if (sz != NULL) {
          procunit *ppu;
          sscanf (sz, "%d", &procunit_id);
          ppu = FindProcessingUnit (NULL, pu_type_none, pu_stat_none,
                                    pu_task_none, procunit_id);

          if (ppu == NULL) {
              outputf ( "No processing unit found with specified id (%d).\n"

There are five or so of these in procunits.c

You also have a few of the C++ style one-line comments //. Not all C
compilers accept these.

No worries, we'll get rid of these over time :-)

You should also add a GPL copyright at the top of each new file (both .c
and .h). You'll find an example in any of the old files.

Jørn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]