Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

unblock_dlg(1) [debian man page]

UNBLOCK_DLG(1)						      General Commands Manual						    UNBLOCK_DLG(1)

NAME
unblock_dlg - Insert linefeeds into an optional-format Digital Line Graph (DLG) file SYNOPSIS
unblock_dlg [-L] DESCRIPTION
The drawmap program processes USGS optional-format Digital Line Graph (DLG) files (along with other types of files) to produce customized maps. Drawmap is able to read these files in their native format. However, since the files usually don't contain any linefeeds, they are difficult for a human to read. Unblock_dlg filters a DLG file and inserts linefeeds for human readability. It takes input from the stan- dard input and writes to the standard output. The input data must be in uncompressed form, not in gzip-compressed form. Also, unblock_dlg does not work with SDTS DLG files. Unblock_dlg normally takes no options, but, if you use the "-L" option, the program will print out some license information and exit. Some DLG files already have embedded linefeeds. Unblock_dlg makes a feeble attempt to detect these files and abort. If the detection fails, the results are likely to be garbled, so it is wise to check the format of each file first. The drawmap program, with the "-i" option, will attempt to tell you whether a file contains linefeeds or not. The intended use of unblock_dlg is simply to let you conveniently examine the files to see what is in them. However, if you are in the mood for adventure, or if you need to repair a defective file, you can use unblock_dlg to make the file easy to edit, then you can edit the file as desired. Drawmap can still process the files after linefeeds are inserted, but will become confused if any line (including the linefeed) is more than 80 characters long. Drawmap may also become confused if you make any significant changes to the format of the file. You can use this capability to remove selected items from DLG files, when those items cause problems. You may even be able to repair faulty data. However, you need to be familiar with the content and structure of DLG files in order to do this effectively. You also need to remember that drawmap depends on DLG files having a predictable structure, and it won't properly parse files that violate this pre- dictability. Do this sort of thing only if you know what you are doing, or if you have a lot of free time on your hands. It should be noted that you can obtain a similar effect by using the command recommended by the USGS: dd if=inputfilename of=outputfilename ibs=8000 cbs=80 conv=unblock I prefer the unblock_dlg command because it simply replaces the last byte of each record with a linefeed. This lets me easily tell how long the original records were. The effect of unblock_dlg or dd can be undone by typing: dd if=inputfilename of=outputfilename ibs=8000 cbs=80 conv=block You may come across files that have a linefeed in the 81st byte. Drawmap doesn't like these, both because it can't tell (within the space of the first 80-byte record) whether the file contains linefeeds or not, and because the records exceed the maximum record length of 80 bytes. You may be able to repair such files by blocking them with the above dd command. SEE ALSO
unblock_dem(1), drawmap(1) Jul 24, 2001 UNBLOCK_DLG(1)

Check Out this Related Man Page

dlg(1)								PCCTS Manual Pages							    dlg(1)

NAME
dlg - DFA Lexical Analyzer Generator SYNTAX
dlg [options] lexical_spec [output_file] DESCRIPTION
dlg is a tool that produces fast deterministic finite automata for recognizing regular expressions in input. OPTIONS
-CC Generate C++ output. The output_file is not specified in this case. -C[ level] Where level is the compression level used. 0 indications no compression, 1 removes all unused characters from the transition from table, and 2 maps equivalent characters into the same character classes. It is suggested that level -C2 is used, since it will sig- nificantly reduce the size of the dfa produced for lexical analyzer. -m Produces the header file for the lexical mode with a name other than the default name of "mode.h". -i An interactive, or as interactive as possible, parser is produced. A character is only obtained when required to decide which state to go to. Some care must be taken to obtain accept states that do not require look ahead at the next character to determine if that is the stop state. Any regular expression with a Kleene closure at the end is guaranteed to require another character of look ahead. -cl class Specify a class name for DLG to generate. The default is DLGLexer. "class" will be a subclass of DLGLexerBase; only used for -CC. -ci The automaton will treat upper and lower case characters identically. This is accomplished in the automaton; the characters in the lexical buffer are unmodified. -cs Upper and lower case characters are treated as distinct. This is the default. -o dir Directory where output files should go (default="."). This is very nice for keeping the source directory clear of ANTLR and DLG spawn. -Wambiguity Warns if more than one regular expression could match the same character sequence. The warnings give the numbers of the expressions in the dlg lexical specification file. The numbering of the expressions starts at one. Multiple warnings may be print for the same expressions. - Used in place of file names to get input from standard in or send output to standard out. SPECIAL CONSIDERATIONS
Dlg works... we think. There is no implicit guarantee of anything. We reserve no legal rights to the software known as the Purdue Com- piler Construction Tool Set (PCCTS) -- PCCTS is in the public domain. An individual or company may do whatever they wish with source code distributed with PCCTS or the code generated by PCCTS, including the incorporation of PCCTS, or its output, into commercial software. We encourage users to develop software with PCCTS. However, we do ask that credit is given to us for developing PCCTS. By "credit", we mean that if you incorporate our source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like PCCTS and have developed a nice tool with the output, please mention that you developed it using PCCTS. As long as these guidelines are followed, we expect to continue enhancing this system and expect to make other tools available as they are completed. FILES
mode.h , dlgauto.h , dlgdef.h SEE ALSO
antlr(1), pccts(1) BUGS
DLG
April 1994 dlg(1)
Man Page