Skip to content

Commit fbad728

Browse files
refactor: fix links and path for some pages
1 parent 726b1ee commit fbad728

File tree

7 files changed

+62
-34
lines changed

7 files changed

+62
-34
lines changed

src/components/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Behavior from "@components/Behavior.astro";
2+
import { Decl, DeclDoc } from "@components/decl-doc";
3+
import { DescList, Desc } from "@components/desc-list";
4+
import { ParamDocList, ParamDoc } from "@components/param-doc";
5+
import DocLink from "@components/DocLink.astro";
6+
import { CHeader, CppHeader } from "@components/header";
7+
import { FeatureTestMacro, FeatureTestMacroValue } from "@components/feature-test-macro";
8+
import { DR, DRList } from "@components/defect-report";
9+
import { Revision, RevisionBlock } from "@components/revision";
10+
import AutoCollapse from "@components/AutoCollapse.astro";
11+
import FlexTable from "@components/FlexTable.astro";
12+
import WG21PaperLink from "@components/WG21PaperLink.astro";
13+
14+
export {
15+
Behavior, Decl, DeclDoc, DescList, Desc, ParamDocList, ParamDoc, DocLink,
16+
CHeader, CppHeader, FeatureTestMacro, FeatureTestMacroValue, DR, DRList,
17+
Revision, RevisionBlock, AutoCollapse, FlexTable, WG21PaperLink
18+
};
File renamed without changes.

src/content/docs/c/language/basic/_meta.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/content/docs/c/language/basic/index.mdx

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Overview
3+
sidebar:
4+
order: 1
5+
cppdoc:
6+
keys: ["c.lang.basic"]
7+
---
8+
9+
import DocLink from "@components/DocLink.astro";
10+
11+
# Basic concepts
12+
13+
This section provides definitions for the specific terminology and the concepts used when describing the C programming language.
14+
15+
A C program is a sequence of text files (typically header and source files) that coimport DocLink from "@components/DocLink.astro";
16+
17+
# Basic concepts
18+
19+
This section provides definitions for the specific terminology and the concepts used when describing the C programming language.
20+
21+
A C program is a sequence of text files (typically header and source files) that contain <DocLink src="/c/language/declarations">declarations</DocLink>. They undergo <DocLink src="/c/language/translation_phases">translation</DocLink> to become an executable program, which is executed when the OS calls its <DocLink src="/c/language/main_function">main function</DocLink> (unless it is itself the OS or another *freestanding* program, in which case the entry point is implementation-defined).
22+
23+
Certain words in a C program have special meaning, they are <DocLink src="/c/keyword">keywords</DocLink>. Others can be used as <DocLink src="/c/language/identifier">identifiers</DocLink>, which may be used to identify <DocLink src="/c/language/object">objects</DocLink>, <DocLink src="/c/language/functions">functions</DocLink>, <DocLink src="/c/language/struct">struct</DocLink>, <DocLink src="/c/language/union">union</DocLink>, or <DocLink src="/c/language/enum">enumeration</DocLink> tags, their members, <DocLink src="/c/language/typedef">typedef</DocLink> names, <DocLink src="/c/language/statements">labels</DocLink>, or <DocLink src="/c/preprocessor/replace">macros</DocLink>.
24+
25+
Each identifier (other than macro) is only valid within a part of the program called its <DocLink src="/c/language/scope">scope</DocLink> and belongs to one of four kinds of <DocLink src="/c/language/name_space">name spaces</DocLink>. Some identifiers have <DocLink src="/c/language/storage_duration">linkage</DocLink> which makes them refer to the same entities when they appear in different scopes or translation units.
26+
27+
Definitions of functions include sequences of <DocLink src="/c/language/statements">statements</DocLink> and <DocLink src="/c/language/declarations">declarations</DocLink>, some of which include <DocLink src="/c/language/expressions">expressions</DocLink>, which specify the computations to be performed by the program.
28+
29+
<DocLink src="/c/language/declarations">Declarations</DocLink> and <DocLink src="/c/language/expressions">expressions</DocLink> create, destroy, access, and manipulate <DocLink src="/c/language/object">objects</DocLink>. Each <DocLink src="/c/language/object">object</DocLink>, <DocLink src="/c/language/functions">function</DocLink>, and <DocLink src="/c/language/expressions">expression</DocLink> in C is associated with a <DocLink src="/c/language/type">type</DocLink>.

src/content/docs/c/library/headers/_meta.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/content/docs/cpp/language/basics.mdx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@ cppdoc:
66
keys: ["cpp.lang.basic"]
77
---
88

9-
import Missing from "@components/Missing.astro";
10-
import DocLink from "@components/DocLink.astro";
119
import { Revision } from "@components/revision";
10+
import DocLink from "@components/DocLink.astro";
11+
12+
# Basic concepts
1213

1314
This section provides definitions for the specific terminology and the concepts used when describing the C++ programming language.
1415

15-
A C++ program is a sequence of text files (typically header and source files) that contain <Missing>declarations</Missing>. They undergo <Missing>translation</Missing> to become an executable program, which is executed when the C++ implementation calls its <DocLink src="/cpp/language/main_function">main function</DocLink>.
16+
A C++ program is a sequence of text files (typically header and source files) that contain <DocLink src="/cpp/language/declarations">declarations</DocLink>. They undergo <DocLink src="/cpp/language/translation_phases">translation</DocLink> to become an executable program, which is executed when the C++ implementation calls its <DocLink src="/cpp/language/main_function">main function</DocLink>.
17+
18+
Certain words in a C++ program have special meaning, and these are known as <DocLink src="/cpp/keyword">keywords</DocLink>. Others can be used as <DocLink src="/cpp/language/identifiers">identifiers</DocLink>. <DocLink src="/cpp/comment">Comments</DocLink> are ignored during translation. C++ programs also contain <DocLink src="/cpp/language/expressions">literals</DocLink>, the values of characters inside them are determined by <DocLink src="/cpp/language/charset">character sets and encodings</DocLink>. Certain characters in the program have to be represented with <DocLink src="/cpp/language/escape">escape sequences</DocLink>.
19+
20+
The *entities* of a C++ program are values, <DocLink src="/cpp/language/objects">objects</DocLink>, <DocLink src="/cpp/language/reference">references</DocLink><Revision since="C++17">, <DocLink src="/cpp/language/structured_binding">structured bindings</DocLink></Revision><Revision since="C++26">, <DocLink src="/cpp/language/function">result bindings</DocLink></Revision>, <DocLink src="/cpp/language/functions">functions</DocLink>, <DocLink src="/cpp/language/enum">enumerators</DocLink>, <DocLink src="/cpp/language/type">types</DocLink>, class members, <DocLink src="/cpp/language/templates">templates</DocLink>, <DocLink src="/cpp/language/template_specialization">template specializations</DocLink><Revision since="C++11">, <DocLink src="/cpp/language/pack">packs</DocLink></Revision>, and <DocLink src="/cpp/language/namespace">namespaces</DocLink>. Preprocessor <DocLink src="/cpp/preprocessor/replace">macros</DocLink> are not C++ entities.
1621

17-
Certain words in a C++ program have special meaning, and these are known as <Missing>keywords</Missing>. Others can be used as <Missing>identifiers</Missing>. <Missing>Comments</Missing> are ignored during translation. C++ programs also contain <Missing>literals</Missing>, the values of characters inside them are determined by <Missing>character sets and encodings</Missing>. Certain characters in the program have to be represented with <Missing>escape sequences</Missing>.
22+
<DocLink src="/cpp/language/declarations">Declarations</DocLink> may introduce entities, associate them with <DocLink src="/cpp/language/name">names</DocLink> and define their properties. The declarations that define all properties required to use an entity are <DocLink src="/cpp/language/definition">definitions</DocLink>. A program must contain only one definition of any non-inline function or variable that is <DocLink src="/cpp/language/definition">odr-used</DocLink>.
1823

19-
The _entities_ of a C++ program are values, <Missing>objects</Missing>, <Missing>references</Missing><Revision since="C++17">, <Missing>structured bindings</Missing></Revision><Revision since="C++26">, <Missing>result bindings</Missing></Revision>, <Missing>functions</Missing>, <Missing>enumerators</Missing>, <Missing>types</Missing>, class members, <Missing>templates</Missing>, <Missing>template specializations</Missing><Revision since="C++11">, <Missing>packs</Missing></Revision>, and <Missing>namespaces</Missing>. Preprocessor <Missing>macros</Missing> are not C++ entities.
24+
Definitions of functions usually include sequences of <DocLink src="/cpp/language/statements">statements</DocLink>, some of which include <DocLink src="/cpp/language/expressions">expressions</DocLink>, which specify the computations to be performed by the program.
2025

21-
<Missing>Declarations</Missing> may introduce entities, associate them with <Missing>names</Missing> and define their properties. The declarations that define all properties required to use an entity are <Missing>definitions</Missing>. A program must contain only one definition of any non-inline function or variable that is <Missing>odr-used</Missing>.
26+
Names encountered in a program are associated with the declarations that introduced them using <DocLink src="/cpp/language/lookup">name lookup</DocLink>. Each name is only valid within a part of the program called its <DocLink src="/cpp/language/scope">scope</DocLink>. Some names have <DocLink src="/cpp/language/storage_duration">linkage</DocLink> which makes them refer to the same entities when they appear in different scopes or translation units.
2227

23-
Definitions of functions usually include sequences of <Missing>statements</Missing>, some of which include <Missing>expressions</Missing>, which specify the computations to be performed by the program.
28+
Each object, reference, function, expression in C++ is associated with a <DocLink src="/cpp/language/type">type</DocLink>, which may be <DocLink src="/cpp/language/types">fundamental</DocLink>, compound, or <DocLink src="/cpp/language/classes">user-defined</DocLink>, complete or <DocLink src="/cpp/language/incomplete_type">incomplete</DocLink>, etc.
2429

25-
Names encountered in a program are associated with the declarations that introduced them using <Missing>name lookup</Missing>. Each name is only valid within a part of the program called its <Missing>scope</Missing>. Some names have <Missing>linkage</Missing> which makes them refer to the same entities when they appear in different scopes or translation units.
30+
Declared objects and declared references that are not <DocLink src="/cpp/language/data_members">non-static data members</DocLink> are *variables ​*.
2631

27-
Each object, reference, function, expression in C++ is associated with a <Missing>type</Missing>, which may be <Missing>fundamental</Missing>, compound, or <Missing>user-defined</Missing>, complete or <Missing>incomplete</Missing>, etc.
32+
## See also
2833

29-
Declared objects and declared references that are not <Missing>non-static data members</Missing> are _variables_.
34+
C documentation for <DocLink src="/c/language/basic_concepts">Basic concepts</DocLink>

0 commit comments

Comments
 (0)