Next: , Previous: BitKeeper, Up: Interoperability


6.4 Maximum Line Length

By default, CSSC enforces no line length limits. The cssc tools will correctly process input files containing lines of arbitrary length, subject to the limits of available memory. The system command diff may impose its own limit however; this is discussed below (see Limitations of diff).

If you are working with a binary file (that is, the ‘-b’ option to admin was used when the history file was created), the encoding mechanism used by cssc (and those sccs implementations that support binary files) ensures that data is encoded before being stored in the body of the history file, and so the “binary” file can contain any sequence of bytes at all - the “line length” is no longer important.

Most other implementations of sccs do however have an upper limit on the maximum length of line that can be handled in a text file (that is, those versions of sccs which have such a limit do not apply this limit for binary files). To set such a limit in cssc, use the --enable-max-line-length=N option to “configure”. This sets the limit to the specified value.

This setting can be overridden with the environment variable CSSC_MAX_LINE_LENGTH; for a description of how to use this environment variable, see Environment Variables. To determine the current setting of the line length limit, run admin -V and read the output.

If (and only if) you have configured CSSC with such a maximum line length limitation, the lengths of input lines are checked as they are being read. When cssc is adding a new delta to an existing file, if it finds an input line which is longer than N characters, it will fail with an explanatory message (the alternative would be that an SCCS file would be generated that could not be read by other implementations of sccs having a lower line length limit).

When cssc is creating a new SCCS file in response to the admin -i command, one of two things will happen when an over-length line is found. If binary file support is enabled, the sccs file will automatically be created as an encoded file. Otherwise, admin will fail with an explanatory message.

When the cssc tools are reading a history file, the lines in the sccs file are not subject to the limits described above; that is, cssc imposes these limits on lines it puts into the sccs file, but not on lines it reads from the sccs file. This means that the cssc get utility will cope with arbitrarily long lines in the sccs file, even if cssc has been configured in sauch a way that delta would not put such long lines into the history file.