Skip to content

Commit ec4ca6f

Browse files
committed
[intro] Promote "Scope", "Normative references", "Terms and definitions"
to top-level clauses per ISO directives. Modify \definition macro so we can more easily have definitions at different depths in different lists.
1 parent c7a65cf commit ec4ca6f

File tree

4 files changed

+57
-55
lines changed

4 files changed

+57
-55
lines changed

source/intro.tex

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
%!TEX root = std.tex
2-
\rSec0[intro]{General}
32

4-
\indextext{diagnostic message|see{message, diagnostic}}%
5-
\indexdefn{conditionally-supported behavior|see{behavior, con\-ditionally-supported}}%
6-
\indextext{dynamic type|see{type, dynamic}}%
7-
\indextext{static type|see{type, static}}%
8-
\indextext{ill-formed program|see{program, ill-formed}}%
9-
\indextext{well-formed program|see{program, well-formed}}%
10-
\indextext{implementation-defined behavior|see{behavior, im\-plementation-defined}}%
11-
\indextext{undefined behavior|see{behavior, undefined}}%
12-
\indextext{unspecified behavior|see{behavior, unspecified}}%
13-
\indextext{implementation limits|see{limits, implementation}}%
14-
\indextext{locale-specific behavior|see{behavior, locale-spe\-cific}}%
15-
\indextext{multibyte character|see{character, multibyte}}%
16-
\indextext{object|seealso{object model}}%
17-
\indextext{subobject|seealso{object model}}%
18-
\indextext{derived class!most|see{most derived class}}%
19-
\indextext{derived object!most|see{most derived object}}%
20-
\indextext{program execution!as-if rule|see{as-if rule}}%
21-
\indextext{observable behavior|see{behavior, observable}}%
22-
\indextext{precedence of operator|see{operator, precedence of}}%
23-
\indextext{order of evaluation in expression|see{expression, order of evaluation of}}%
24-
\indextext{atomic operations|see{operation, atomic}}%
25-
\indextext{multiple threads|see{threads, multiple}}%
26-
\indextext{normative references|see{references, normative}}
27-
28-
\rSec1[intro.scope]{Scope}
3+
\rSec0[intro.scope]{Scope}
294

305
\pnum
316
\indextext{scope|(}%
@@ -46,7 +21,8 @@
4621
management operators, and additional library facilities.%
4722
\indextext{scope|)}
4823

49-
\rSec1[intro.refs]{Normative references}
24+
\indextext{normative references|see{references, normative}}%
25+
\rSec0[intro.refs]{Normative references}
5026

5127
\pnum
5228
\indextext{references!normative|(}%
@@ -91,7 +67,7 @@
9167
hereinafter called \defn{ECMA-262}.
9268
\indextext{references!normative|)}
9369

94-
\rSec1[intro.defs]{Terms and definitions}
70+
\rSec0[intro.defs]{Terms and definitions}
9571

9672
\pnum
9773
\indextext{definitions|(}%
@@ -112,6 +88,8 @@
11288
Standard are defined where they are used and italicized where they are
11389
defined.
11490

91+
\def\definition{\definitionx{\section}}%
92+
11593
\indexdefn{access}%
11694
\definition{access}{defns.access}
11795
\defncontext{execution-time action} to read or modify the value of an object
@@ -300,6 +278,30 @@
300278
semantic rules, and the one-definition rule~(\ref{basic.def.odr}).%
301279
\indextext{definitions|)}
302280

281+
\rSec0[intro]{General principles}
282+
283+
\indextext{diagnostic message|see{message, diagnostic}}%
284+
\indexdefn{conditionally-supported behavior|see{behavior, con\-ditionally-supported}}%
285+
\indextext{dynamic type|see{type, dynamic}}%
286+
\indextext{static type|see{type, static}}%
287+
\indextext{ill-formed program|see{program, ill-formed}}%
288+
\indextext{well-formed program|see{program, well-formed}}%
289+
\indextext{implementation-defined behavior|see{behavior, im\-plementation-defined}}%
290+
\indextext{undefined behavior|see{behavior, undefined}}%
291+
\indextext{unspecified behavior|see{behavior, unspecified}}%
292+
\indextext{implementation limits|see{limits, implementation}}%
293+
\indextext{locale-specific behavior|see{behavior, locale-spe\-cific}}%
294+
\indextext{multibyte character|see{character, multibyte}}%
295+
\indextext{object|seealso{object model}}%
296+
\indextext{subobject|seealso{object model}}%
297+
\indextext{derived class!most|see{most derived class}}%
298+
\indextext{derived object!most|see{most derived object}}%
299+
\indextext{program execution!as-if rule|see{as-if rule}}%
300+
\indextext{observable behavior|see{behavior, observable}}%
301+
\indextext{precedence of operator|see{operator, precedence of}}%
302+
\indextext{order of evaluation in expression|see{expression, order of evaluation of}}%
303+
\indextext{atomic operations|see{operation, atomic}}%
304+
\indextext{multiple threads|see{threads, multiple}}%
303305
\rSec1[intro.compliance]{Implementation compliance}
304306

305307
\pnum

source/iostreams.tex

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9937,37 +9937,39 @@
99379937

99389938
\rSec2[fs.definitions]{Terms and definitions}
99399939

9940-
\definitionx{absolute path}{fs.def.absolute.path}
9940+
\def\definition{\definitionx{\subsubsection}}%
9941+
9942+
\definition{absolute path}{fs.def.absolute.path}
99419943
A path that unambiguously
99429944
identifies the location of a file without reference to an additional starting
99439945
location. The elements of a path that determine if it is absolute are
99449946
operating system dependent.
99459947

9946-
\definitionx{canonical path}{fs.def.canonical.path}
9948+
\definition{canonical path}{fs.def.canonical.path}
99479949
An absolute path that has no elements that are symbolic links, and no \grammarterm{dot} or
99489950
\grammarterm{dot-dot} elements~(\ref{path.generic}).
99499951

9950-
\definitionx{directory}{fs.def.directory}
9952+
\definition{directory}{fs.def.directory}
99519953
A file within a file system that acts as a container of directory entries
99529954
that contain information about
99539955
other files, possibly including other directory files.
99549956

9955-
\definitionx{file}{fs.def.file}
9957+
\definition{file}{fs.def.file}
99569958
An object within a file system that holds user or system data. Files can be written to, or read from, or both. A file
99579959
has certain attributes, including type. File types include regular files
99589960
and directories. Other types of files, such as symbolic links~(\ref{fs.def.symlink}),
99599961
may be supported by the implementation.
99609962

9961-
\definitionx{file system}{fs.def.filesystem}
9963+
\definition{file system}{fs.def.filesystem}
99629964
A collection of files and certain of their attributes.
99639965

9964-
\definitionx{file system race}{fs.def.race}
9966+
\definition{file system race}{fs.def.race}
99659967
The condition that occurs
99669968
when multiple threads, processes, or computers interleave access and
99679969
modification of
99689970
the same object within a file system.
99699971

9970-
\definitionx{filename}{fs.def.filename}
9972+
\definition{filename}{fs.def.filename}
99719973
The name of a file. Filenames \grammarterm{dot} and \grammarterm{dot-dot} have special meaning. The
99729974
following characteristics of filenames are operating system dependent:
99739975
\begin{itemize}
@@ -9981,27 +9983,27 @@
99819983
files, such as directories.
99829984
\end{itemize}
99839985

9984-
\definitionx{hard link}{fs.def.hardlink}
9986+
\definition{hard link}{fs.def.hardlink}
99859987
A link~(\ref{fs.def.link}) to an existing file. Some
99869988
file systems support multiple hard links to a file. If the last hard link to a
99879989
file is removed, the file itself is removed.
99889990
\begin{note} A hard link can be thought of as a shared-ownership smart
99899991
pointer to a file.\end{note}
99909992

9991-
\definitionx{link}{fs.def.link}
9993+
\definition{link}{fs.def.link}
99929994
A directory entry that associates a
99939995
filename with a file. A link is either a hard link~(\ref{fs.def.hardlink}) or a
99949996
symbolic link~(\ref{fs.def.symlink}).
99959997

9996-
\definitionx{native encoding}{fs.def.native.encode}
9998+
\definition{native encoding}{fs.def.native.encode}
99979999
For narrow character strings, the operating system dependent current encoding
999810000
for pathnames~(\ref{fs.def.pathname}). For wide character strings, the implementation-defined execution
999910001
wide-character set encoding~(\ref{lex.charset}).
1000010002

10001-
\definitionx{native pathname format}{fs.def.native}
10003+
\definition{native pathname format}{fs.def.native}
1000210004
The operating system dependent pathname format accepted by the host operating system.
1000310005

10004-
\definitionx{normal form}{fs.def.normal.form}
10006+
\definition{normal form}{fs.def.normal.form}
1000510007
A path with no redundant current directory (\grammarterm{dot}) elements,
1000610008
no redundant parent directory (\grammarterm{dot-dot}) elements, and
1000710009
no redundant \grammarterm{directory-separator}{s}.
@@ -10017,20 +10019,20 @@
1001710019
that use different syntax for directory names and regular file names.
1001810020
\end{note}
1001910021

10020-
\definitionx{operating system dependent behavior}{fs.def.osdep}
10022+
\definition{operating system dependent behavior}{fs.def.osdep}
1002110023
Behavior that is dependent upon the behavior
1002210024
and characteristics of an operating system. See~\ref{fs.conform.os}.
1002310025

10024-
\definitionx{parent directory}{fs.def.parent}
10026+
\definition{parent directory}{fs.def.parent}
1002510027
\defncontext{of a directory} the directory that both contains a
1002610028
directory entry for the given directory and is represented by the filename
1002710029
\grammarterm{dot-dot} in the given directory.
1002810030

10029-
\definitionx{parent directory}{fs.def.parent.other}
10031+
\definition{parent directory}{fs.def.parent.other}
1003010032
\defncontext{of other types of files} a directory containing a directory
1003110033
entry for the file under discussion.
1003210034

10033-
\definitionx{path}{fs.def.path}
10035+
\definition{path}{fs.def.path}
1003410036
A sequence of elements that identify
1003510037
the location of a file within a filesystem.
1003610038
The elements are the
@@ -10039,20 +10041,20 @@
1003910041
and an optional sequence of filenames.
1004010042
The maximum number of elements in the sequence is operating system dependent.
1004110043

10042-
\definitionx{pathname}{fs.def.pathname}
10044+
\definition{pathname}{fs.def.pathname}
1004310045
A character string that represents the name of a path. Pathnames are
1004410046
formatted according to the generic pathname format grammar~(\ref{path.generic}) or an
1004510047
operating system dependent
1004610048
native pathname format.
1004710049

10048-
\definitionx{pathname resolution}{fs.def.pathres}
10050+
\definition{pathname resolution}{fs.def.pathres}
1004910051
Pathname resolution is the operating system dependent mechanism for resolving
1005010052
a pathname to a particular file in a file hierarchy. There may be multiple
1005110053
pathnames that resolve to the same file.
1005210054
\begin{example} POSIX specifies the mechanism in section 4.11, Pathname resolution.
1005310055
\end{example}
1005410056

10055-
\definitionx{relative path}{fs.def.relative-path}
10057+
\definition{relative path}{fs.def.relative-path}
1005610058
A path that is not absolute, and as such, only unambiguously
1005710059
identifies the location of a file when resolved~(\ref{fs.def.pathres}) relative to
1005810060
an implied starting location. The elements of a path that determine if it is
@@ -10061,7 +10063,7 @@
1006110063
Pathnames ``.'' and ``..'' are relative paths.
1006210064
\end{note}
1006310065

10064-
\definitionx{symbolic link}{fs.def.symlink}
10066+
\definition{symbolic link}{fs.def.symlink}
1006510067
A type of file with the
1006610068
property that when the file is encountered during pathname resolution, a string
1006710069
stored by the file is used to modify the pathname resolution.

source/lib-intro.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
\pnum
131131
\begin{note} \ref{intro.defs} defines additional terms used elsewhere in this International Standard. \end{note}
132132

133+
\def\definition{\definitionx{\subsection}}%
134+
133135
\definition{arbitrary-positional stream}{defns.arbitrary.stream}
134136
\indexdefn{stream!arbitrary-positional}%
135137
a stream (described in Clause~\ref{input.output}) that can seek to any integral position within

source/macros.tex

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,8 @@
512512
% usage: \definition{name}{xref}
513513
%\newcommand{\definition}[2]{\rSec2[#2]{#1}}
514514
% for ISO format, use:
515-
\newcommand{\definition}[2]{%
516-
\addxref{#2}%
517-
\subsection[#1]{\hfill[#2]}\vspace{-.3\onelineskip}\label{#2}\textbf{#1}\\%
518-
}
519-
\newcommand{\definitionx}[2]{%
520-
\addxref{#2}%
521-
\subsubsection[#1]{\hfill[#2]}\vspace{-.3\onelineskip}\label{#2}\textbf{#1}\\%
515+
\newcommand{\definitionx}[3]{%
516+
\addxref{#3}%
517+
#1[#2]{\hfill[#3]}\vspace{-.3\onelineskip}\label{#3}\textbf{#2}\\%
522518
}
523519
\newcommand{\defncontext}[1]{\textlangle#1\textrangle}

0 commit comments

Comments
 (0)