rt util.h - acli/trn GitHub Wiki

rt-util.c and rt-util.h are an existing module serving an unknown function.

Exported types

Exported constants

Global variables

Exported functions and macros

compress_from

  • char* compress_from(char* from, int size)
  • from: An RFC-822 style name–address
  • size: Desired maximum width in character cell units

Calls either compress_name() or compress_address() depending on whether the name–address field has a name or is a bare address.

compress_from uses a static buffer of size _LBUFLEN characters.

compress_name

  • char* compress_name(char* name, int max)
  • from: A name
  • max: Desired maximum width in character cell units

If the specified from name is too wide, use some acrobatics to trim it down so that it fits in max character cells. Pad the result to exactly max character cells wide.