Skip to content

Commit af2ac47

Browse files
committed
all: single space after period
Done with grep & interactive search & replace, to double-check replacements. Not many remained after CL 20022. Fixes golang#18572 Change-Id: Idbe90ba3b584f9b9661d2bbd141607daaadfa41a Reviewed-on: https://go-review.googlesource.com/45270 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
1 parent 467f87c commit af2ac47

File tree

20 files changed

+141
-141
lines changed

20 files changed

+141
-141
lines changed

src/bufio/bufio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package bufio implements buffered I/O. It wraps an io.Reader or io.Writer
5+
// Package bufio implements buffered I/O. It wraps an io.Reader or io.Writer
66
// object, creating another object (Reader or Writer) that also implements
77
// the interface but provides buffering and some help for textual I/O.
88
package bufio

src/cmd/cgo/doc.go

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ as C.stdout, or functions such as C.putchar.
1414
1515
If the import of "C" is immediately preceded by a comment, that
1616
comment, called the preamble, is used as a header when compiling
17-
the C parts of the package. For example:
17+
the C parts of the package. For example:
1818
1919
// #include <stdio.h>
2020
// #include <errno.h>
2121
import "C"
2222
2323
The preamble may contain any C code, including function and variable
24-
declarations and definitions. These may then be referred to from Go
25-
code as though they were defined in the package "C". All names
24+
declarations and definitions. These may then be referred to from Go
25+
code as though they were defined in the package "C". All names
2626
declared in the preamble may be used, even if they start with a
27-
lower-case letter. Exception: static variables in the preamble may
27+
lower-case letter. Exception: static variables in the preamble may
2828
not be referenced from Go code; static functions are permitted.
2929
30-
See $GOROOT/misc/cgo/stdio and $GOROOT/misc/cgo/gmp for examples. See
30+
See $GOROOT/misc/cgo/stdio and $GOROOT/misc/cgo/gmp for examples. See
3131
"C? Go? Cgo!" for an introduction to using cgo:
3232
https://golang.org/doc/articles/c_go_cgo.html.
3333
3434
CFLAGS, CPPFLAGS, CXXFLAGS, FFLAGS and LDFLAGS may be defined with pseudo
3535
#cgo directives within these comments to tweak the behavior of the C, C++
36-
or Fortran compiler. Values defined in multiple directives are concatenated
37-
together. The directive can include a list of build constraints limiting its
36+
or Fortran compiler. Values defined in multiple directives are concatenated
37+
together. The directive can include a list of build constraints limiting its
3838
effect to systems satisfying one of the constraints
3939
(see https://golang.org/pkg/go/build/#hdr-Build_Constraints for details about the constraint syntax).
4040
For example:
@@ -57,16 +57,16 @@ The default pkg-config tool may be changed by setting the PKG_CONFIG environment
5757
5858
When building, the CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS, CGO_FFLAGS and
5959
CGO_LDFLAGS environment variables are added to the flags derived from
60-
these directives. Package-specific flags should be set using the
60+
these directives. Package-specific flags should be set using the
6161
directives, not the environment variables, so that builds work in
6262
unmodified environments.
6363
6464
All the cgo CPPFLAGS and CFLAGS directives in a package are concatenated and
65-
used to compile C files in that package. All the CPPFLAGS and CXXFLAGS
65+
used to compile C files in that package. All the CPPFLAGS and CXXFLAGS
6666
directives in a package are concatenated and used to compile C++ files in that
67-
package. All the CPPFLAGS and FFLAGS directives in a package are concatenated
68-
and used to compile Fortran files in that package. All the LDFLAGS directives
69-
in any package in the program are concatenated and used at link time. All the
67+
package. All the CPPFLAGS and FFLAGS directives in a package are concatenated
68+
and used to compile Fortran files in that package. All the LDFLAGS directives
69+
in any package in the program are concatenated and used at link time. All the
7070
pkg-config directives are concatenated and sent to pkg-config simultaneously
7171
to add to each appropriate set of command-line flags.
7272
@@ -84,27 +84,27 @@ Will be expanded to:
8484
8585
When the Go tool sees that one or more Go files use the special import
8686
"C", it will look for other non-Go files in the directory and compile
87-
them as part of the Go package. Any .c, .s, or .S files will be
88-
compiled with the C compiler. Any .cc, .cpp, or .cxx files will be
89-
compiled with the C++ compiler. Any .f, .F, .for or .f90 files will be
87+
them as part of the Go package. Any .c, .s, or .S files will be
88+
compiled with the C compiler. Any .cc, .cpp, or .cxx files will be
89+
compiled with the C++ compiler. Any .f, .F, .for or .f90 files will be
9090
compiled with the fortran compiler. Any .h, .hh, .hpp, or .hxx files will
9191
not be compiled separately, but, if these header files are changed,
92-
the C and C++ files will be recompiled. The default C and C++
92+
the C and C++ files will be recompiled. The default C and C++
9393
compilers may be changed by the CC and CXX environment variables,
9494
respectively; those environment variables may include command line
9595
options.
9696
9797
The cgo tool is enabled by default for native builds on systems where
98-
it is expected to work. It is disabled by default when
99-
cross-compiling. You can control this by setting the CGO_ENABLED
98+
it is expected to work. It is disabled by default when
99+
cross-compiling. You can control this by setting the CGO_ENABLED
100100
environment variable when running the go tool: set it to 1 to enable
101-
the use of cgo, and to 0 to disable it. The go tool will set the
101+
the use of cgo, and to 0 to disable it. The go tool will set the
102102
build constraint "cgo" if cgo is enabled.
103103
104104
When cross-compiling, you must specify a C cross-compiler for cgo to
105-
use. You can do this by setting the CC_FOR_TARGET environment
105+
use. You can do this by setting the CC_FOR_TARGET environment
106106
variable when building the toolchain using make.bash, or by setting
107-
the CC environment variable any time you run the go tool. The
107+
the CC environment variable any time you run the go tool. The
108108
CXX_FOR_TARGET and CXX environment variables work in a similar way for
109109
C++ code.
110110
@@ -138,7 +138,7 @@ C's union types are represented as a Go byte array with the same length.
138138
Go structs cannot embed fields with C types.
139139
140140
Go code cannot refer to zero-sized fields that occur at the end of
141-
non-empty C structs. To get the address of such a field (which is the
141+
non-empty C structs. To get the address of such a field (which is the
142142
only operation you can do with a zero-sized field) you must take the
143143
address of the struct and add the size of the struct.
144144
@@ -150,7 +150,7 @@ is different from the same C type used in another.
150150
Any C function (even void functions) may be called in a multiple
151151
assignment context to retrieve both the return value (if any) and the
152152
C errno variable as an error (use _ to skip the result value if the
153-
function returns void). For example:
153+
function returns void). For example:
154154
155155
n, err = C.sqrt(-1)
156156
_, err := C.voidFunc()
@@ -187,11 +187,11 @@ received from Go. For example:
187187
In C, a function argument written as a fixed size array
188188
actually requires a pointer to the first element of the array.
189189
C compilers are aware of this calling convention and adjust
190-
the call accordingly, but Go cannot. In Go, you must pass
190+
the call accordingly, but Go cannot. In Go, you must pass
191191
the pointer to the first element explicitly: C.f(&C.x[0]).
192192
193193
A few special functions convert between Go and C types
194-
by making copies of the data. In pseudo-Go definitions:
194+
by making copies of the data. In pseudo-Go definitions:
195195
196196
// Go string to C string
197197
// The C string is allocated in the C heap using malloc.
@@ -253,50 +253,50 @@ must be placed in preambles in other files, or in C source files.
253253
Passing pointers
254254
255255
Go is a garbage collected language, and the garbage collector needs to
256-
know the location of every pointer to Go memory. Because of this,
256+
know the location of every pointer to Go memory. Because of this,
257257
there are restrictions on passing pointers between Go and C.
258258
259259
In this section the term Go pointer means a pointer to memory
260260
allocated by Go (such as by using the & operator or calling the
261261
predefined new function) and the term C pointer means a pointer to
262-
memory allocated by C (such as by a call to C.malloc). Whether a
262+
memory allocated by C (such as by a call to C.malloc). Whether a
263263
pointer is a Go pointer or a C pointer is a dynamic property
264264
determined by how the memory was allocated; it has nothing to do with
265265
the type of the pointer.
266266
267267
Go code may pass a Go pointer to C provided the Go memory to which it
268-
points does not contain any Go pointers. The C code must preserve
268+
points does not contain any Go pointers. The C code must preserve
269269
this property: it must not store any Go pointers in Go memory, even
270-
temporarily. When passing a pointer to a field in a struct, the Go
270+
temporarily. When passing a pointer to a field in a struct, the Go
271271
memory in question is the memory occupied by the field, not the entire
272-
struct. When passing a pointer to an element in an array or slice,
272+
struct. When passing a pointer to an element in an array or slice,
273273
the Go memory in question is the entire array or the entire backing
274274
array of the slice.
275275
276276
C code may not keep a copy of a Go pointer after the call returns.
277277
278-
A Go function called by C code may not return a Go pointer. A Go
278+
A Go function called by C code may not return a Go pointer. A Go
279279
function called by C code may take C pointers as arguments, and it may
280280
store non-pointer or C pointer data through those pointers, but it may
281-
not store a Go pointer in memory pointed to by a C pointer. A Go
281+
not store a Go pointer in memory pointed to by a C pointer. A Go
282282
function called by C code may take a Go pointer as an argument, but it
283283
must preserve the property that the Go memory to which it points does
284284
not contain any Go pointers.
285285
286-
Go code may not store a Go pointer in C memory. C code may store Go
286+
Go code may not store a Go pointer in C memory. C code may store Go
287287
pointers in C memory, subject to the rule above: it must stop storing
288288
the Go pointer when the C function returns.
289289
290-
These rules are checked dynamically at runtime. The checking is
290+
These rules are checked dynamically at runtime. The checking is
291291
controlled by the cgocheck setting of the GODEBUG environment
292-
variable. The default setting is GODEBUG=cgocheck=1, which implements
293-
reasonably cheap dynamic checks. These checks may be disabled
294-
entirely using GODEBUG=cgocheck=0. Complete checking of pointer
292+
variable. The default setting is GODEBUG=cgocheck=1, which implements
293+
reasonably cheap dynamic checks. These checks may be disabled
294+
entirely using GODEBUG=cgocheck=0. Complete checking of pointer
295295
handling, at some cost in run time, is available via GODEBUG=cgocheck=2.
296296
297297
It is possible to defeat this enforcement by using the unsafe package,
298298
and of course there is nothing stopping the C code from doing anything
299-
it likes. However, programs that break these rules are likely to fail
299+
it likes. However, programs that break these rules are likely to fail
300300
in unexpected and unpredictable ways.
301301
302302
Using cgo directly
@@ -499,7 +499,7 @@ Here is a _cgo_gotypes.go containing definitions for needed C types:
499499
type _Ctype_void [0]byte
500500
501501
The _cgo_gotypes.go file also contains the definitions of the
502-
functions. They all have similar bodies that invoke runtime·cgocall
502+
functions. They all have similar bodies that invoke runtime·cgocall
503503
to make a switch from the Go runtime world to the system C (GCC-based)
504504
world.
505505
@@ -835,7 +835,7 @@ to avoid conflicts), write the go.o file to that directory, and invoke
835835
the host linker. The default value for the host linker is $CC, split
836836
into fields, or else "gcc". The specific host linker command line can
837837
be overridden using command line flags: cmd/link -extld=clang
838-
-extldflags='-ggdb -O3'. If any package in a build includes a .cc or
838+
-extldflags='-ggdb -O3'. If any package in a build includes a .cc or
839839
other file compiled by the C++ compiler, the go tool will use the
840840
-extld option to set the host linker to the C++ compiler.
841841

0 commit comments

Comments
 (0)