Number: 72
Title: Empty record fields disappear
Submitter: Joe McMahon
Date: Wed Jan 16 17:26:22 2002
Subsys: Dot
Version: 1.7.15
System: *-*-
Severity: major
Problem:
It appears that the parsing of port strings has gotten a little wonky in 1.7.15. This dot input generates a graph without spaces for the "from" ports; in 1.5 this was not a problem.

This is programmatically generated dot code, but even simplified, it still doesn't leave empty cells for the even-numbered ports - I'm expecting alternating value/empty cell with pointer pairs. I tried adding spaces, but the parser is apparently just dumping them.

I believe the problem is somewhere in the port-string parsing, but I'm not a good-enough C programmer to spot the problem immediately. If I manage to come up with a patch, I will let you know. If you patch this one earlier, please let me know.
Input:

digraph "test" {
        "gvds_array0" [
                label =
"{<port1>Nil}|{<port2>}|{<port3>Nada}|{<port4>}|{<port5>Zip}|{<port6>}"
                shape = "record"
        ]
        "gvds_array1" [
                label = "[]"
                shape = "plaintext"
        ]
        "gvds_array2" [
                label = "[]"
                shape = "plaintext"
        ]
        "gvds_array3" [
                label = "[]"
                shape = "plaintext"
        ]
        {
                "gvds_array0"
        }
        {
                "gvds_array1"
                "gvds_array2"
                "gvds_array3"
        }
        "gvds_array0":"port2" -> "gvds_array1" [
        ]
        "gvds_array0":"port4" -> "gvds_array2" [
        ]
        "gvds_array0":"port6" -> "gvds_array3" [
        ]
}
Comments:
[erg] Empty field labels are changed into " " in parse_reclbl, but in storeline, both CodeGen->textsize and estimate_textsize assign this text 0 width. Thus, the field disappears. Previously, actualwidth would always give this some non-zero width. Clearly, some special case code somewhere needs to be added to do handle this, as well as whatever is expected using hard spaces.
Owner: ellson
Status: Fixed (17 Jan 2002)