Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
72 check-ins using file pikchr.h or pikchr.h.in version b4dc51cafd
2024-09-02
| ||
21:03 | Add last set of special attributes Special in the sense that they apply or they don't, so we just look for them during the build and generate the rules if present, then switch on the same logic but a bit earlier. Develop branch is neck-and-neck for generated size, at 101% of trunk. (Leaf check-in: 1981b47009 user: atman tags: develop) | |
00:35 | Add PIKCHR_EXTRA_UNIQUE_ID The last commit convinced me that, although nothing awful comes of the presence of duplicate ids on a Web page, it's bad hygiene, and there are places such as Fossil forums where a diagram can indeed appear twice in identical form. Therefore I've added a static int counter to `char *pikchr`, and when the mFlag PIKCHR_EXTRA_UNIQUE_ID is set, this hashes the bytes of the counter, after which it is unconditionally incremented. I don't know if this is a complete solution. A goal with the hash suffixes is that they don't change unless the diagrams change, and I can stretch this to circumstances like a diagram moving around on the page, but this also means that a long-running process which generates many pages, and uses this flag, will get different hashes depending on the order in which the pages are rendered. It's unclear what a better solution would look like, so this will do for now. (check-in: 6e19da1db4 user: atman tags: develop) | |
2024-09-01
| ||
23:38 | Hash "darkmode" for PIKCHR_DARK_MODE Validation revealed something retrospectively obvious: inclusion of a Pikchr diagram with its dark mode counterpart in a single HTML file, given the hashing method, results in identical IDs for both. This failure mode is now prevented by hashing the string "darkmode" when the associated flag is set. (check-in: acb7972c54 user: atman tags: develop) | |
21:12 | Fix remaining transparency cases One was a missed case of checking if a line is closed (if not it needs transparency). The other was detecting that condition after attributes so that the rule can be added to the CSS. (check-in: 838c77862e user: atman tags: develop) | |
01:22 | CSS style properties for dominant-baseline and fill: transparent Still need to track down a few bugs with how the latter is handled. Will be easy enough with a fresh start on the day. (check-in: 6fc8ea75d4 user: atman tags: develop) | |
2024-08-31
| ||
20:50 | Leave class list open. So we can add presentation classes after. (check-in: 7a421060eb user: atman tags: develop) | |
20:37 | Annotate text classes on *p (check-in: 1c999d23c9 user: atman tags: develop) | |
18:48 | Add attribute flags There are some presentation attributes which only take a limited set of values. These we can set as flags on `*p` and add to the CSS only when they are used, then emit a corresponding class for the attribute. (check-in: 22fc0b74c4 user: atman tags: develop) | |
17:58 | Handle multiple user sets of color compatibly This has some weird consequences for the actual use of `textcolor` that I don't care for, but it should preserve identical visual output. (check-in: 48f7817325 user: atman tags: develop) | |
17:19 | Add compare-branches script This is a script which expects two builds of pikchr named pikchr-trunk and pikchr-develop. It will run the former and then the latter on the diagrams in the tests directory, light and dark mode, emitting an html file which allows side-by-side comparison. Toggling these diagrams shows the svg code, instead of the Pikchr code which is identical by construction. (check-in: 584d71c235 user: atman tags: develop) | |
17:16 | Sort out discrepancy in color / textcolor I spotted a difference in diagram output, caused by a user variable named "color" not being reflected in the value of textcolor. While I think it's better for textcolor to behave like color and fill, I'm aiming to have all current changes be visually identical to trunk branch diagrams. So now when we see color set, we check if textcolor is also set, and if not, we set it to the same value. (check-in: 2543ecfe15 user: atman tags: develop) | |
2024-08-28
| ||
23:25 | Fix string allocation for title and diagram Instantly triggered when I added the diagrams I've done to the test corpus. Good reminder that fuzzers, as impressive as they are, are not very intelligent on their own. (check-in: 20d69265e8 user: atman tags: develop) | |
22:35 | Fuzzfix: memory leak, unterminated string (check-in: 0ab9b4410c user: atman tags: develop) | |
21:31 | Allow textcolor in parens Consistent with the other values in that production rule. (check-in: df1945915b user: atman tags: develop) | |
2024-08-27
| ||
23:44 | Only hash parameter tokens which exist (check-in: f948f5c7db user: atman tags: develop) | |
22:07 | Hash macro arguments inside parse_macro_args That appears to be the place to do it. Fuzzer compatible. (check-in: f866f92123 user: atman tags: develop) | |
21:58 | Passes short(ish) fuzz run On the order of a few minutes, but this commit gets out of the instant counterexample phase of the operation. (check-in: 4ed3d00f97 user: atman tags: develop) | |
21:45 | Fix: fuzzbugs (check-in: ce049bff98 user: atman tags: develop) | |
21:12 | Whitespace (check-in: e2d9b746e9 user: atman tags: develop) | |
16:04 | Adds missing spaces to output I'm about to overhaul rendering yet again, but I'm making a mental note here to write a shell script which will take everything in the examples folder and use xmllint to check for issues. (check-in: 6aabde3ddc user: atman tags: develop) | |
15:52 | Merge from id-suffix branch (check-in: 88a8178f6d user: atman tags: develop) | |
2024-08-26
| ||
20:00 | Fix missing = in stroke-dasharray (check-in: 21ac1ef357 user: atman tags: develop) | |
17:16 | Style / spacing (check-in: 1178c7e39c user: atman tags: develop) | |
17:14 | Use mProp flag to check if class is already set This leaves the ability to prepend more classes if it makes sense to do properties that way, and also matches the style for other attributes. (check-in: 4d3465a3c8 user: atman tags: develop) | |
15:29 | Restrict class token matching rule T_ID may start with `_`, `$`, `@`, which is undesirable in CSS. A lead underscore is legal, but often reserved for internal classes, which I'm planning to do here. (check-in: ad2ccf48c4 user: atman tags: develop) | |
2024-08-03
| ||
03:34 | Merge id-suffix branch with develop (check-in: 2ae1f3f064 user: atman tags: develop) | |
2024-08-02
| ||
05:08 | Make 'class' an ordinary attribute This commit changes the grammar such that the two XML class rules which were irregular in form, now serve as ordinary attributes. I've abandoned the plan to retain an exception for groups/lists. After some thought, it adds little clarity and at the expense of the existing simplicity and regularity of form. (check-in: b87cf613e2 user: atman tags: develop) | |
04:37 | Merge trunk branch (check-in: 28cdeedccf user: atman tags: develop) | |
04:33 | Hash XML classes individually (check-in: 07b0b6d8a9 user: atman tags: develop) | |
2024-04-20
| ||
15:53 | Clarify newlines and backslashes in grammar of strings (check-in: 3eed4e5591 user: atman tags: develop) | |
01:32 | Merge branch id-suffix to develop (check-in: 5ff64325ae user: atman tags: develop) | |
01:06 | Merge no-inherit branch into develop branch (check-in: 00535a2278 user: atman tags: develop) | |
01:02 | Create new branch named "develop" (check-in: 7b43eeca47 user: atman tags: develop) | |
2024-04-15
| ||
21:30 | Merge text-color branch into postfix-classes (Leaf check-in: 30fd4c7124 user: atman tags: postfix-classes) | |
2024-04-14
| ||
16:05 | Fix double-close quote in diamond (Leaf check-in: c691357b47 user: atman tags: no-inheritance) | |
05:49 | Add classes to diamond (check-in: 2f55bce4e7 user: atman tags: no-inheritance) | |
01:08 | Found the actually-missing quote mark ¯\_(ツ)_/¯ (check-in: f9ce1b0300 user: atman tags: no-inheritance) | |
00:58 | Include trailing space This was apparently getting transformed into an " in later processing. (check-in: 3e307ec1e3 user: atman tags: no-inheritance) | |
2024-04-13
| ||
23:27 | Labels are classes rather than IDs They now come after the object class and before any user classes. Also changes a few small string appends to include the length of the string, this being ever-so-slightly more efficient. (check-in: a4b51b7da5 user: atman tags: no-inheritance) | |
22:58 | Count each class as a token (check-in: dd93f32490 user: atman tags: no-inheritance) | |
22:43 | Skip whitespace, proper position of token error in class strings This corrects chunking of classes to no longer make zero-length tokens out of runs of whitepace, and advances the index variable in the tokenizer by one, to give the correct location of an error. (check-in: 22fec8025a user: atman tags: no-inheritance) | |
22:35 | Remove inheritance of group classes This was added in the mistaken conjecture that it would be useful. In point of fact, CSS selectors and JavaScript both make it very easy to modify all children of a group based on the group name, so that was just inefficient and noisy. (check-in: 35fe5ba90b user: atman tags: no-inheritance) | |
22:29 | Create new branch named "no-inheritance" (check-in: 77eded2eca user: atman tags: no-inheritance) | |
02:29 | Missed a free (check-in: 8b2b541279 user: atman tags: postfix-classes) | |
2024-04-12
| ||
21:20 | Replace line (check-in: ffec719690 user: atman tags: postfix-classes) | |
21:14 | Use fill="transparent" instead of fill="none" fill=none can't be overridden by CSS, and fill=transparent is otherwise identical, albeit longer. (check-in: 1b4350fa24 user: atman tags: postfix-classes) | |
20:48 | Pluralize magic token variable name (check-in: 522410da60 user: atman tags: postfix-classes) | |
20:21 | ID field for anything with a label This is more consistent behavior: if there's a label, that element gets an id attribute with the label. This commit also removes the `sublist="true"` attribute, which I'm fairly sure I added for debugging purposes when figuring out grouping. It isn't a valid attribute, in any case. (check-in: 122b814b1a user: atman tags: postfix-classes) | |
19:10 | Remove debug printf (check-in: b7359b34be user: atman tags: postfix-classes) | |
19:05 | Improve a comment (check-in: cc005e9e4f user: atman tags: postfix-classes) | |
18:51 | Non-recursive class list copies Also split "prepend a class" and "append a class list" into separate functions. I was using a magic "clone" number to do two things which had no relation to each other. We're also appending parent classes now, rather than prepending them, so that would have been even more unclear. (check-in: f3f4e8c836 user: atman tags: postfix-classes) | |
15:53 | Clean up code to match trunk Also found a bug or two left over from the add-CSS adventure. (check-in: a6b73f5632 user: atman tags: postfix-classes) | |
02:02 | Add XML_CLASSES This commit adds the syntax class 'one_class two_classes' etc. to the parser, and processes the resulting list token into multiple PXMLClass structs. For consistency with the rest of Pikchr, only alphanumerics and underscores are allowed in the token. For consistency with idiomatic XML and CSS, any underscores are converted to hyphens. The single-class form matches the ID rule exactly, since the lexer would need information it doesn't have to do otherwise. The list form allows class names to take leading numbers and underscores; class names are very permissive in their allowed forms, and this will pose no problem of correctness in the output. (check-in: b5f60d3784 user: atman tags: postfix-classes) | |
01:06 | Adds class keyword to parser This has left in the XML_CLASS token. Next step is to add a string-delimited XML_CLASSES token, and split those up into an arbitrary number of PXMLClass elements. (check-in: eb1f9ffb1b user: atman tags: postfix-classes) | |
2024-04-11
| ||
21:32 | Merge from trunk (check-in: b55c0cef48 user: atman tags: postfix-classes) | |
21:23 | "demote" styles This changes every use of the style attribute to instead use the attribute directly. The output of all test files is unchanged relative to pikchr trunk. The effect of this change is to demote the attributes, so that they can be changed via an outer CSS style sheet without needing to override with !important. The purpose of that demotion is to make it easier to work with the added class attributes, which are intended entirely for this sort of CSS-based manipulation, or its equivalent in JavaScript. user: atman tags: postfix-classes EDITED pikchr.c EDITED pikchr.y (check-in: 269cc423ec user: atman tags: postfix-classes) | |
20:59 | Better match to existing code style (check-in: 8e4a6fd39b user: atman tags: postfix-classes) | |
2022-09-14
| ||
13:22 | Adds (back) pickhr object names to class (check-in: c3d1a761cf user: atman tags: postfix-classes) | |
13:08 | Turning point This abandons the unusable work on using CSS instead of inline styles. (check-in: 25087dce5e user: atman tags: postfix-classes) | |
13:02 | Non-starter To my dismay and chagrin, CSS style blocks all participate in a single global state. Dynamic scope with inheritance is a bold choice, that's all I've got to say about that. Not the end of the world, time to back up and change the class syntax, call it a branch. (Leaf check-in: 629eca94ba user: atman tags: class-tags) | |
2022-09-07
| ||
11:40 | Writes CSS color variables Next up: returning the PVar for color lookups, so we can compare with the value and use the var. (check-in: b0c66c7199 user: atman tags: class-tags) | |
2022-09-06
| ||
12:16 | Removes lowercasing of colorname char in comparison We guaranteed this lowercasedness at compile time. (check-in: 18166c632d user: atman tags: class-tags) | |
12:06 | Lowercases all CSS colors Unlike HTML colors, all-lowercase is normative for CSS color. Since I'm planning to emit the name when possible, rather than the RGB value, I'd rather print the normal form of the color names, among other reasons for cooperation with case-sensitive tools; they may be incorrect, but they're easy to find in the wild. This also allows for modest simplification of the comparison routine. (check-in: 15dcf740e5 user: atman tags: class-tags) | |
11:52 | Only make styles when we have to (check-in: 34ac12a3f5 user: atman tags: class-tags) | |
2022-09-05
| ||
14:30 | Writes fewer default values This doesn't change the SVG at 100% scaling, but the use of a strokewidth variable means that the stroke becomes thinner and thicker as scale is varied. I think this is more-correct behavior but it does bear noting. (check-in: 42842d98c0 user: atman tags: class-tags) | |
12:21 | Inherit dominant-baseline: central The variable probably doesn't convey a useful intention here. (check-in: 034de96f01 user: atman tags: class-tags) | |
2022-09-01
| ||
12:55 | Add default SVG values We'll add the necessary variables in the SVG block, any user CSS will follow. (check-in: bf3c3b2f91 user: atman tags: class-tags) | |
10:55 | Sees color and builtins User variables are their own thing here, getting the builtins as variables is the first step. (check-in: 3a099d5328 user: atman tags: class-tags) | |
10:31 | Mark referenced builtins as seen (check-in: 5ba3ff92d3 user: atman tags: class-tags) | |
10:09 | Makes builtin variables and colors PVar (check-in: 4940fcf197 user: atman tags: class-tags) | |
2022-08-29
| ||
03:20 | Add library targets (check-in: 9f124f5076 user: atman tags: class-tags) | |
01:59 | Add inline CSS block Which does change the header, but since I don't see a .so target, and I patched the call to the TCl interface to take the extra pointer, this is maybe ok. (check-in: 420ef69a7a user: atman tags: class-tags) | |