view etc/BABYL @ 51195:3cbf29813eea

(struct frame): Rename members height to text_lines, width to text_cols, window_height to total_lines, window_width to total_cols, new_height to new_text_lines, new_width to new_text_cols. All uses changed. (struct frame): New members which consolidate common members of x_output, w32_output, and mac_output structures: left_pos, top_pos, pixel_height, pixel_width, x_pixels_diff, y_pixels_diff, win_gravity, size_hint_flags, border_width, internal_border_width, line_height, fringe_cols, left_fringe_width, right_fringe_width, want_fullscreen. All uses changed. (struct frame): New member column_width contaning the canonical column width, analogue to line_height. All uses changed. (struct frame): Rename members scroll_bar_pixel_width to config_scroll_bar_width, and scroll_bar_cols to config_scroll_bar_cols. All uses changed. (struct frame): New member scroll_bar_actual_width which consolidates and renames the vertical_scroll_bar_extra member of x_output, w32_output, and mac_output structures. All uses changed. (FRAME_PIXEL_HEIGHT): Renamed from PIXEL_HEIGHT and moved from x/w32/macterm.h files. All uses changed. Also change code which referred to f->output_data...->pixel_height. (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved from x/w32/macterm.h files. All uses changed. Also change code which referred to f->output_data...->pixel_width. (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. Also change code which referred to f->height. (FRAME_COLS): Renamed from FRAME_WIDTH. All uses changed. Also change code which referred to f->width. (FRAME_NEW_HEIGHT, FRAME_NEW_WIDTH): Remove macros; change uses to update new_text_lines and new_text_cols members directly. (FRAME_CONFIG_SCROLL_BAR_WIDTH): Renamed from FRAME_SCROLL_BAR_PIXEL_WIDTH. All uses changed. (FRAME_CONFIG_SCROLL_BAR_COLS): Renamed from FRAME_SCROLL_BAR_COLS. All uses changed. (FRAME_LEFT_SCROLL_BAR_COLS, FRAME_RIGHT_SCROLL_BAR_COLS): Renamed from FRAME_LEFT_SCROLL_BAR_WIDTH and FRAME_RIGHT_SCROLL_BAR_WIDTH, resp. All uses changed. (FRAME_SCROLL_BAR_AREA_WIDTH, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH): New macros. (FRAME_TOTAL_COLS): Renamed from FRAME_WINDOW_WIDTH. (SET_FRAME_COLS): Renamed from SET_FRAME_WIDTH. (FRAME_TOTAL_COLS_ARG): Renamed from FRAME_WINDOW_WIDTH_ARG. (WINDOW_VERTICAL_SCROLL_BAR_COLUMN): Remove unused macro. (WINDOW_VERTICAL_SCROLL_BAR_HEIGHT): Remove unused macro. (FRAME_LINE_HEIGHT): Renamed from CANON_Y_UNIT. Unconditionally return line_height member (it now has proper value also for non-window frames). (FRAME_COLUMN_WIDTH): Renamed from CANON_X_UNIT. Unconditionally return new column_width member (rather than the default font width). (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH) (FRAME_RIGHT_FRINGE_WIDTH): Renamed from FRAME_X_... and moved from x/w32/macterm.h files. Unconditionally return corresponding member of frame structure (they now have proper values also for non-window frames). (FRAME_TOTAL_FRINGE_WIDTH): Renamed from FRAME_FRINGE_WIDTH. Calculate return value from left and right widths. (FRAME_INTERNAL_BORDER_WIDTH): Unconditionally return internal_border_width member (has proper value for non-window frame). (FRAME_PIXEL_X_FROM_CANON_X): Renamed from PIXEL_X_FROM_CANON_X. (FRAME_PIXEL_Y_FROM_CANON_Y): Renamed from PIXEL_Y_FROM_CANON_Y. (FRAME_CANON_X_FROM_PIXEL_X): Renamed from CANON_X_FROM_PIXEL_X. (FRAME_CANON_Y_FROM_PIXEL_Y): Renamed from CANON_Y_FROM_PIXEL_Y. (FRAME_LINE_TO_PIXEL_Y): Renamed from CHAR_TO_PIXEL_ROW, consolidated from xterm.h, macterm.h, and w32term.h. (FRAME_COL_TO_PIXEL_X): Renamed from CHAR_TO_PIXEL_COL, consolidated from xterm.h, macterm.h, and w32term.h. (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Renamed from CHAR_TO_PIXEL_WIDTH consolidated from x/mac/w32term.h. (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Renamed from CHAR_TO_PIXEL_HEIGHT consolidated from x/mac/w32term.h. (FRAME_PIXEL_Y_TO_LINE): Renamed from PIXEL_TO_CHAR_ROW consolidated from x/mac/w32term.h. (FRAME_PIXEL_X_TO_COL): Renamed from PIXEL_TO_CHAR_COL consolidated from x/mac/w32term.h. (FRAME_PIXEL_WIDTH_TO_TEXT_COLS): Renamed from PIXEL_TO_CHAR_WIDTH consolidated from x/mac/w32term.h. (FRAME_PIXEL_HEIGHT_TO_TEXT_LINES): Renamed from PIXEL_TO_CHAR_HEIGHT consolidated from x/mac/w32term.h.
author Kim F. Storm <storm@cua.dk>
date Sat, 24 May 2003 21:58:07 +0000
parents e96ffe544684
children 89895e7b4ac6
line wrap: on
line source

Format of Version 5 Babyl Files:

Warning:

    This was written Tuesday, 12 April 1983 (by Eugene Ciccarelli),
based on looking at a particular Babyl file and recalling various
issues.  Therefore it is not guaranteed to be complete, but it is a
start, and I will try to point the reader to various Babyl functions
that will serve to clarify certain format questions.

    Also note that this file will not contain control-characters,
but instead have two-character sequences starting with Uparrow.
Unless otherwise stated, an Uparrow <character> is to be read as
Control-<character>, e.g. ^L is a Control-L.

Versions:

    First, note that each Babyl file contains in its BABYL OPTIONS
section the version for the Babyl file format.  In principle, the
format can be changed in any way as long as we increment the format
version number; then programs can support both old and new formats.

    In practice, version 5 is the only format version used, and the
previous versions have been obsolete for so long that Emacs does not
support them.


Overall Babyl File Structure:

    A Babyl file consists of a BABYL OPTIONS section followed by
0 or more message sections.  The BABYL OPTIONS section starts
with the line "BABYL OPTIONS:".  Message sections start with
Control-Underscore Control-L Newline.  Each section ends
with a Control-Underscore.  (That is also the first character
of the starter for the next section, if any.)  Thus, a three
message Babyl file looks like:

BABYL OPTIONS:
...the stuff within the Babyl Options section...
^_^L
...the stuff within the 1st message section...
^_^L
...the stuff within the 2nd message section...
^_^L
...the stuff within the last message section...
^_

    Babyl is tolerant about some whitespace at the end of the
file -- the file may end with the final ^_ or it may have some
whitespace, e.g. a newline, after it.


The BABYL OPTIONS Section:

    Each Babyl option is specified on one line (thus restricting
string values these options can currently have).  Values are
either numbers or strings.  The format is name, colon, and the
value, with whitespace after the colon ignored, e.g.:

Mail: ~/special-inbox

    Unrecognized options are ignored.

    Here are those options and the kind of values currently expected:

    MAIL		Filename, the input mail file for this
			Babyl file.  You may also use several file names
			separated by commas.
    Version		Number.  This should always be 5.
    Labels		String, list of labels, separated by commas.


Message Sections:

    A message section contains one message and information
associated with it.  The first line is the "status line", which
contains a bit (0 or 1 character) saying whether the message has
been reformed yet, and a list of the labels attached to this
message.  Certain labels, called basic labels, are built into
Babyl in a fundamental way, and are separated in the status line
for convenience of operation.  For example, consider the status
line:

1, answered,, zval, bug,

    The 1 means this message has been reformed.  This message is
labeled "answered", "zval", and "bug".  The first, "answered", is
a basic label, and the other two are user labels.  The basic
labels come before the double-comma in the line.  Each label is
preceded by ", " and followed by ",".  (The last basic label is
in fact followed by ",,".)  If this message had no labels at all,
it would look like:

1,,

    Or, if it had two basic labels, "answered" and "deleted", it
would look like:

1, answered, deleted,, zval, bug,

    The & Label Babyl Message knows which are the basic labels.
Currently they are:  deleted, unseen, recent, and answered.

    After the status line comes the original header if any.
Following that is the EOOH line, which contains exactly the
characters "*** EOOH ***" (which stands for "end of original
header").  Note that the original header, if a network format
header, includes the trailing newline.  And finally, following the
EOOH line is the visible message, header and text.  For example,
here is a complete message section, starting with the message
starter, and ending with the terminator:

^_^L
1,, wordab, eccmacs,
Date: 11 May 1982 21:40-EDT
From: Eugene C. Ciccarelli <ECC at MIT-AI>
Subject: notes
To: ECC at MIT-AI

*** EOOH ***
Date: Tuesday, 11 May 1982  21:40-EDT
From: Eugene C. Ciccarelli <ECC>
To:   ECC
Re:   notes

Remember to pickup check at cashier's office, and deposit it
soon.  Pay rent.
^_

;;; Babyl File BNF:

;;; Overall Babyl file structure:


Babyl-File	::= Babyl-Options-Section  (Message-Section)*


;;; Babyl Options section:


Babyl-Options-Section
		::= "BABYL OPTIONS:" newline (Babyl-Option)* Terminator

Babyl-Option	::= Option-Name ":" Horiz-Whitespace BOptValue newline

BOptValue	::= Number | 1-Line-String



;;; Message section:


Message-Section	::= Message-Starter  Status-Line  Orig-Header
		    EOOH-Line  Message  Terminator

Message-Starter	::= "^L" newline

Status-Line	::= Bit-Char  ","  (Basic-Label)* "," (User-Label)* newline

Basic-Label	::= Space  BLabel-Name  ","

User-Label	::= Space  ULabel-Name  ","

EOOH-Line	::= "*** EOOH ***" newline

Message		::= Visible-Header  Message-Text


;;; Utilities:

Terminator	::= "^_"

Horiz-Whitespace
		::= (Space | Tab)*

Bit-Char	::= "0" | "1"