Project

General

Profile

Actions

Feature #1836

open

re-write/improve reqtext.c

Added by Dean Brown 28 days ago. Updated 15 days ago.

Status:
In Review
Priority:
Normal
Category:
General
Target version:
Start date:
12/24/2025
Due date:
% Done:

0%

Estimated time:

Description

There's typos that need fixing -
"?good:Requires import of %s ." Extra space char
"?cityprop:Applies only to %s cities" Missing .
"?cityprop:Does not apply to %s cities" Missing .

I don't like a routine >3000 lines long, not good coding style IMO. I want to make it be like -

 switch (preq->source.kind) {
  case VUT_NONE:
    return FALSE;

  case VUT_COUNTER:
    return req_text_counter();

  case VUT_ADVANCE:
    return req_text_advance();

  case VUT_TECHFLAG:
    return req_text_techflag();

...

extracting a bunch of new routines, one for each req type.


Files

clipboard-202601040104-eid9s.png (113 KB) clipboard-202601040104-eid9s.png Marko Lindqvist, 01/04/2026 01:04 AM
clipboard-202601060115-dxyqy.png (10.9 KB) clipboard-202601060115-dxyqy.png Marko Lindqvist, 01/06/2026 01:15 AM
1836.patch (315 KB) 1836.patch Dean Brown, 01/06/2026 03:45 AM
clipboard-202601040104-eid9s.png
clipboard-202601060115-dxyqy.png

Related issues 1 (1 open0 closed)

Blocks Feature #1787: TiledefConnected requirement typeIn ReviewMarko Lindqvist11/29/2025

Actions
Actions

Also available in: Atom PDF