Subject: 3 more SpiderWEB problems

From: Geoffrey D. Alexander <[email-masked]>
Date: Tue, 24 Apr 90 11:24:40 -0400

I have run into three more Spidery WEB problems:

8.  Page number may be off by one in table of contents.  Illustrated by the
    following example.  Not that module 2 starts on page 2 -- table of contents
    entry for module 2 gives page 1.

===============================================================================
@*= A Page Number Test.

Include a large amount of vertical space.
\vskip 6in

@*2 A level 2 module.

Include a large amount of vertical space.
\vskip 6in

@*= Index.
===============================================================================

9.  Enums not formatted correctly by ceeweave.  Illustrated by the following
    example.  I think enums should be formatted similar to structures.  Also,
    left arrows are not appropriate; I think a colon might be better.  Finally,
    enumerated values (false and true) should be underscored in index.

===============================================================================
@*= Test of enum.

@c
enum {
  false=0,
  true=1
} boolean;

@*= Index.
===============================================================================

10. Typedefs not formated correctly by ceeweave.  Illustrated by the following
    example.  The new types (boolean, lstring_head, lstring, and string) should
    be formatted as types (ie. in bold).  I tried using @f to redefine them.
    See second example.  This caused there to be no line break between typedefs
    and a small white space between the new type and ;.

===============================================================================
@*= Test of typedef.

@c
typedef enum {
  @!false=0,
  @!true=1
} boolean;
typedef struct {
  int buf_len;
  int cur_len;
} lstring_head;
typedef lstring_head *lstring;
typedef char *string;

@*= Index.
===============================================================================

===============================================================================
@*= Test of typedef.

@f boolean char
@f lstring_head char
@f lstring char
@f string char

@c
typedef enum {
  @!false=0,
  @!true=1
} boolean;
typedef struct {
  int buf_len;
  int cur_len;
} lstring_head;
typedef lstring_head *lstring;
typedef char *string;

@*= Index.
===============================================================================

The last line of the BUGS file is

  ==> Bundled 29 Nov 89; all bugs into patches/008

I think that problem 8 requires a change to webkernel.tex and that problems 9
and 10 reguire changes to the C definition source.  I plan to look at problem
8 later this week.  I'll take a look at problems 9 and 10 when I get around to
creating a Spidery WEB for ANSI C.

If you have any suggestions or fixes, please let me know.

Thanks,
Geoff Alexander

---

From: Norman Ramsey <nr>
Date: Tue, 24 Apr 90 17:04:56 EDT

> 8.  Page number may be off by one in table of contents.

This is a problem with the underlying TeX macros (marks, and so on).
I'll be delighted if you can find a fix.

> 9.  Enums not formatted correctly by ceeweave.

enums are not K&R (old-style C).  An ANSI C spider definition is badly
needed, but I don't have funding to produce one.

> 10. Typedefs not formated correctly by ceeweave.  

Only if you believe ``correctly'' == ``what Silvio does.''
The problem is that the logical structure of typedefs follows the
structure of the C program, whereas the formatting is done on the
structure of the WEB source.  There are nasty problems of scoping, and
even doing a botched job requires a two-pass algorithm.

> I tried using @f to redefine them.

This should be fixable by fiddling the c.spider definition; let me
know how you make out.

> I'll take a look at problems 9 and 10 when I get around to

Sorry to be so unhelpful, but I have been putting my time into new,
better-designed tools, instead of continually patching web.

Norman