adjust(1)

adjust(1)

*adjust also has a rudimentary understanding of tagged paragraphs (such as this one) when ®lling. If the second line of a paragraph is indented more than the ®rst, and the ®rst line has a word beginning at the same indentation as the second line, the input column position of the tag word or words (prior to the one matching the second line indentation) is preserved.

Tag words are passed through without change of column position, even if they extend beyond the right mar- gin. The rest of the line is ®lled or right justi®ed from the position of the ®rst non-tag word.

When -jis given, adjust uses an intelligent algorithm to insert spaces in output lines where they are most needed, until the lines extend to the right margin. First, all one space word separators are examined. One space is added to each separator, starting with the one having the most letters between it and the preceding and following separators, until the modi®ed line reaches the right margin. If all one space separators are increased to two spaces and more spaces must be inserted, the algorithm is repeated with two space separators, and so on.

Output line indentation is held to one less than the right margin. If a single word is larger than the line size (right margin minus indentation), that word appears on a line by itself, properly indented, and extends beyond the right margin. However, if -ris used, such words are still right justi®ed, if possible.

If the current locale de®nes class names ekinsoku and bkinsoku (see iswctype(3C)), adjust formats the text in accordance with the ekinsoku/bkinsoku character classi®cation and margin settings (see - r, -j, and -moptions).

EXTERNAL INFLUENCES

Environment Variables

LANG provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables contains an invalid setting, adjust will behave as if all internationalization variables are set to "C". See environ(5).

LC_ALL If set to a non-empty string value, overrides the values of all the other internationalization vari- ables.

LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classi®cation of characters as printable, and the characters matched by character class expressions in regular expres- sions.

LC_MESSAGES determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.

NLSPATH determines the location of message catalogs for the processing of LC_MESSAGES .

International Code Set Support

Single- and multi-byte character code sets are supported.

DIAGNOSTICS

adjust complains to standard error and later returns a nonzero value if any input ®le cannot be opened (it skips the ®le). It does the same (but quits immediately) if the argument to -mor -tis out of range, or if the program is improperly invoked.

Input lines longer than BUFSIZ are silently split (before tab expansion) or truncated (afterwards). Lines that are too wide to center begin in column 1 (no leading spaces).

EXAMPLES

This command is useful for ®ltering text while in vi(1). For example,

!}adjust

reformats the rest of the current paragraph (from the current line down), evening the lines.

The vi command:

:map ÃX {!}adjust -jÃVÃM

(where à denotes control characters) sets up a useful ``®nger macro''. Typing ÃX (Ctrl-X) reformats the entire current paragraph.

adjust -m1is a simple way to break text into separate words without white space, except for tagged- paragraph tags.

HP-UX Release 11i: December 2000

− 2 −

Section 111

a