Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 393
    • Issues 393
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !409

Futher improve colors

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Quinten Cabo requested to merge color-improvements into develop May 27, 2025
  • Overview 4
  • Commits 6
  • Changes 7
  • Add -color option to specify a color spec alongside SAC_COLORS.
    • The -color option takes precedence over the SAC_COLORS env var.
  • Remove the global struct and global variables from color.h
    • The color count variables where moved to getter functions that return a constant based on sizeof.
    • The struct definition is moved to types.h and now has a typedef to color.
  • Improve -help colors formatting and readability.
    • Bring formatting inline with other help pages
    • Calculate the default value of the color spec

The table of color struct is still in color.c, but now we access it through global.colors. This is done by assigning global.colors (which is initialized as NULL) to COLORS in COLORinit. The same is done for global.named_colors and NAMED_COLORS.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: color-improvements