37 Commits

Author SHA1 Message Date
gingerBill
842cfee0f3 Change Odin's LICENSE to zlib from BSD 3-clause
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
Jeroen van Rijn
7a9ea3ee6d Further overhaul of package line comments. 2025-10-09 23:05:29 +02:00
Laytan Laats
288312a812 core: improve package doc comments for the documentation generator 2024-09-03 19:59:04 +02:00
gingerBill
eb799393d5 Fix -vet-tabs issues 2024-08-24 13:56:41 +01:00
gingerBill
8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752 Add more uses of #no_capture 2024-07-14 11:56:04 +01:00
Feoramund
ba354e0524 Add documentation for write_decorated_table 2024-06-26 12:53:34 -04:00
Feoramund
f13d30ad23 Add write_decorated_table API 2024-06-26 12:50:43 -04:00
Feoramund
8b05ec1765 Add string caching example documentation 2024-06-24 15:11:43 -04:00
Feoramund
fbd609fa37 Add complete example showcasing Unicode support 2024-06-24 15:04:45 -04:00
Feoramund
f325a08e57 Make core:text/table examples more complete
They should be completely copy-and-paste friendly now, without the
assumption of someone using `using table`.
2024-06-24 15:04:45 -04:00
Feoramund
7a43404ea1 Add Width_Proc documentation 2024-06-24 15:04:45 -04:00
Feoramund
7da96c484d Remove table.dirty 2024-06-24 14:28:05 -04:00
Feoramund
e397bdf11d Let WIDTH_PROC be specified as proc argument to write_*_table 2024-06-24 13:38:59 -04:00
Feoramund
67b4cb0038 Crunch the ranges 2024-06-24 13:18:54 -04:00
Feoramund
bf44a94065 Update core:text/table documentation 2024-06-20 18:22:03 -04:00
Feoramund
82d92dc46c Use log.error instead of eprintf 2024-06-20 17:53:45 -04:00
Feoramund
b81458073e Add new API to core:text/table
- `header/row_of_values`, same `header/row`, more verbose name
- `aligned_header/row_of_values`, set alignment for an entire row
- `header/row_of_aligned_values`, set alignment per value
2024-06-20 17:53:45 -04:00
Feoramund
585747bbbf Clarify error message 2024-06-20 17:53:34 -04:00
Feoramund
99c955d124 Remove unneeded loc argument 2024-06-20 15:26:00 -04:00
Feoramund
fd28199178 Optimize printing of markdown tables
Check only once if the table has a header row, instead of every row.
2024-06-20 15:01:09 -04:00
Feoramund
dd099d9dd6 Add Unicode support to core:text/table 2024-06-20 15:01:09 -04:00
Feoramund
2241ca8e72 Use tabs to indent HTML tables 2024-06-20 13:06:32 -04:00
Feoramund
b66b960e7e Don't build HTML tables
`build` only recalculates length and width information, and this is not
needed for HTML tables.
2024-06-20 13:06:32 -04:00
Feoramund
4a3684c5e8 Rename write_ascii_table to write_plain_table 2024-06-20 13:06:28 -04:00
Maurizio M. Gavioli
a0cff82320 Fix the format of some doc.odin files of the core library which did not made into the documentation.
`c/frontend/tokenizer`:
   add proper "Example:" header to demo example code,
   removed empty lines.
`container/bit_array`:
   moved comment before package;
   aligned narrative lines to left margin;
   converted case lines into bulleted lines ("- ");
   converted individual examples to single-tab-indented preformatted text.
`dynlib`:
   removed "//+build ignore" line;
   added newline at EOF.
`image/netpmb`:
   converted indented lines of "Reading", "Wrting" and "Some syntax..." into bulleted lists;
   "Formats" indented lines kept as they are as the preformatted text seems relevant to keep the alignments;
   doubly indented lines kept as single-indented to keep them different (as the format does not allow for two-level bulleted lists);
   removed empy lines.
`os/os2`:	WIP, not modified
`sys/info`:
   removed "//+build ignore" line;
   converted tab-indented initial description into regular left-margin comment;
   moved uncommented sample code within the doc comment as an "Example:";
   moved simple- and double-tabbed separate comments with sample Windows and macOS outputs within the doc comment as bulleted headlines with preformatted output listings;
   removed now empty comments and blank lines after the package line.
`text/i18n`:
   removed "//+build ignore" line;
   moved the pacakge line at the end;
   de-indented the tab-indented introductory narrative;
   moved sample code comments into the doc comment as tab-indented code with a proper "Example:" heading;
   removed "```" MD attempts at code formatting.
`text/table`:
   unindented the comment lines of a descriptive kind;
   headlines of major subdivisions are marked as bold;
   kept code samples as tab-indented preformatted text (as there are several of them, the standard "Example:" and "Output:" headings cannot be used) removing the "```" MD attempts at code formatting;
   removed in-between blank lines.
2024-04-14 17:18:08 +02:00
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
gingerBill
9b54b99bf6 Use positional and named arguments within the core library 2023-06-21 01:17:05 +01:00
gingerBill
9b15bda055 Add missing packages to examples/all 2023-06-07 22:48:39 +01:00
oskarnp
8862f9118b Fix typos in doc 2023-03-27 09:31:24 +02:00
oskarnp
e2e98672bd Fix typo 2023-03-26 21:51:57 +02:00
oskarnp
51f295cacc Rename init procs 2023-03-26 21:46:36 +02:00
oskarnp
0c50ac3396 Remove unnecessary #partial switch 2023-03-26 21:45:37 +02:00
oskarnp
2da81a4a26 Remove unnecessary C style loop 2023-03-26 21:44:31 +02:00
oskarnp
b6d4853a33 Fix cell alignment to default to Left using ZII 2023-03-26 21:41:16 +02:00
oskarnp
020b147222 Move helper procs into utility.odin 2023-03-26 21:33:27 +02:00
oskarnp
88ee5d1a6d text/table: Initial implementation 2023-03-26 16:10:27 +02:00