-
Notifications
You must be signed in to change notification settings - Fork 1
rt util.h
Ambrose Li edited this page Aug 6, 2020
·
2 revisions
rt-util.c and rt-util.h are an existing module serving an unknown function.
- 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.
- 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.