|> I have a indentation problem with cweave,
|> The following input :
|> [ some C code ]
|> gives me the following output with cweave :
|> [ output with some items concatenated horizontally that shouldn't be ]
|>
|> Do you know any way to fix this problem?
|> (Fixes in cweave source would be very appreciated.)
Probably the problem is in your code, not in CWEAVE, but I think it is in
the part you suppressed by an ellipis (...), because without that, I cannot
reproduce your problem. (Note that from the code you gave CWEAVE cannot
deduce that |VAR_PTR| is a typedef symbol, but it will do so if the typedef
of |VAR_PTR| comes before your piece of code; in any case failure in this
respect would not produce the kind of output you showed.)
If there is anything in the omitted code that does not look
like a statement, then CWEAVE cannot parse the compound statement that is
the body of your function, and will simply concatenate the parts it did
recognise. Note that these individual parts may contain newlines, so the
whole thing does not result in a single line.
To locate the error you may first look for things like missing semicolons,
and try to compile the code; compilers are fairly good at spotting syntax
errors that humans overlook. If you are using tricky macros however, the
code may look wrong to CWEAVE but still compile, since CWEAVE interprets any
macro invocation as an expression, even if it expands to something else,
like a statement. To get diagnostic output from CWEAVE, place a `@1' control
code in your source code before the section causing trouble, and CWEAVE will
report the types of the pieces it could not combine as an `Irreducible scrap
sequence'; with some puzzling you may be able to find out which of these
types is wrong and what caused the problem. This may be a bit hard the first
time, so you may wish to try the other methods first, but in the end the
messages from CWEAVE usually can be understood. Success!
Marc van Leeuwen
CWI, Amsterdam
Hello !
I have a indentation problem with cweave,
sorry if this have been already posted...
The following input :
---- 8< ---- 8< ---- 8< ---- begin cut here ----
@ Ajout d'une relation au syst\`eme.
@<Fonctions@>=
void
add_ctr(int n, VAR_PTR * vars, int (*ctr) (VAR_PTR *, int))
{
int i;
in_queue(c);
.............................
fixpoint();
}
---- 8< ---- 8< ---- 8< ---- end cut here ----
gives me the following oiutput with cweave :
---- 8< ---- 8< ---- 8< ---- begin cut here ----
40. Ajout d'une relation au systeme.
<Fonctions 4> +=
void add_ctr(int n, VAR_PTR * vars, int (*ctr) (VAR_PTR *, int)) { int i;
in_queue(c);
.............................
fixpoint(); }
---- 8< ---- 8< ---- 8< ---- cut here ----
Do you know any way to fix this problem?
(Fixes in cweave source would be very appreciated.)
Thanks,
Bruno.
--
########## Bruno GILLETA gil...@lim.univ-mrs.fr ##########
########## Laboratoire d'Informatique de Marseille ##########