Add !! to the magic "C HEADER ENDS HERE" string

This commit is contained in:
Nigel Tao committed 2018-06-16 09:04:34 +10:00
1 parent 23a462d31d
commit fdb7d7f174
13 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
// !! INSERT base-public.h.
// C HEADER ENDS HERE.
// !! C HEADER ENDS HERE.
// !! INSERT base-private.h.
+1 -1
View File
@@ -305,7 +305,7 @@ func (g *gen) generate() ([]byte, error) {
if err := g.genHeader(b); err != nil {
return nil, err
}
b.writes("// C HEADER ENDS HERE.\n\n")
b.writes("// !! C HEADER ENDS HERE.\n\n")
if err := g.genImpl(b); err != nil {
return nil, err
}
+1 -1
View File
@@ -123,7 +123,7 @@ const basePrivateH = "" +
""
const baseImplC = "" +
"// Copyright 2018 The Wuffs Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// !! INSERT base-public.h.\n\n// C HEADER ENDS HERE.\n\n// !! INSERT base-private.h.\n\n// !! INSERT wuffs_base__status__string data.\n\nconst char* wuffs_base__status__string(wuffs_base__status s) {\n uint16_t o = wuffs_base__status__string_offsets[(uint8_t)(s >> 24)];\n return o ? wuffs_base__status__string_data + o : \"unknown status\";\n}\n" +
"// Copyright 2018 The Wuffs Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// !! INSERT base-public.h.\n\n// !! C HEADER ENDS HERE.\n\n// !! INSERT base-private.h.\n\n// !! INSERT wuffs_base__status__string data.\n\nconst char* wuffs_base__status__string(wuffs_base__status s) {\n uint16_t o = wuffs_base__status__string_offsets[(uint8_t)(s >> 24)];\n return o ? wuffs_base__status__string_data + o : \"unknown status\";\n}\n" +
""
type template_args_short_read struct {
+1 -1
View File
@@ -203,7 +203,7 @@ func (h *genHelper) genDir(dirname string, filenames []string) error {
return nil
}
var cHeaderEndsHere = []byte("\n// C HEADER ENDS HERE.\n\n")
var cHeaderEndsHere = []byte("\n// !! C HEADER ENDS HERE.\n\n")
func (h *genHelper) genDirDependencies(qualifiedFilenames []string) error {
files, err := generate.ParseFiles(&h.tm, qualifiedFilenames, nil)