diff --git a/internal/cgen/auxiliary/base.cc b/internal/cgen/auxiliary/base.cc index 3ab746d9..3924b1cc 100644 --- a/internal/cgen/auxiliary/base.cc +++ b/internal/cgen/auxiliary/base.cc @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/base.hh b/internal/cgen/auxiliary/base.hh index c1f9d544..6b1eeac6 100644 --- a/internal/cgen/auxiliary/base.hh +++ b/internal/cgen/auxiliary/base.hh @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/cbor.cc b/internal/cgen/auxiliary/cbor.cc index 45911950..286a7e36 100644 --- a/internal/cgen/auxiliary/cbor.cc +++ b/internal/cgen/auxiliary/cbor.cc @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/cbor.hh b/internal/cgen/auxiliary/cbor.hh index d1a9b9dd..cbfd6922 100644 --- a/internal/cgen/auxiliary/cbor.hh +++ b/internal/cgen/auxiliary/cbor.hh @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/image.cc b/internal/cgen/auxiliary/image.cc index d6f891de..a8688a10 100644 --- a/internal/cgen/auxiliary/image.cc +++ b/internal/cgen/auxiliary/image.cc @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2021 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/image.hh b/internal/cgen/auxiliary/image.hh index 0aebab09..851141d1 100644 --- a/internal/cgen/auxiliary/image.hh +++ b/internal/cgen/auxiliary/image.hh @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2021 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/json.cc b/internal/cgen/auxiliary/json.cc index 82281f1b..ad311d20 100644 --- a/internal/cgen/auxiliary/json.cc +++ b/internal/cgen/auxiliary/json.cc @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/auxiliary/json.hh b/internal/cgen/auxiliary/json.hh index 3758ecb5..88fc4bcb 100644 --- a/internal/cgen/auxiliary/json.hh +++ b/internal/cgen/auxiliary/json.hh @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/all-impl.c b/internal/cgen/base/all-impl.c index 1c4d35a5..e179efc4 100644 --- a/internal/cgen/base/all-impl.c +++ b/internal/cgen/base/all-impl.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/floatconv-submodule-code.c b/internal/cgen/base/floatconv-submodule-code.c index 468eb62d..5afd3159 100644 --- a/internal/cgen/base/floatconv-submodule-code.c +++ b/internal/cgen/base/floatconv-submodule-code.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/floatconv-submodule-data.c b/internal/cgen/base/floatconv-submodule-data.c index 26a11d45..7e4db5b5 100644 --- a/internal/cgen/base/floatconv-submodule-data.c +++ b/internal/cgen/base/floatconv-submodule-data.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/fundamental-private.h b/internal/cgen/base/fundamental-private.h index b7166ec7..7202bf47 100644 --- a/internal/cgen/base/fundamental-private.h +++ b/internal/cgen/base/fundamental-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/fundamental-public.h b/internal/cgen/base/fundamental-public.h index 68640261..892126cc 100644 --- a/internal/cgen/base/fundamental-public.h +++ b/internal/cgen/base/fundamental-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/image-private.h b/internal/cgen/base/image-private.h index 7c12b221..1cb8a674 100644 --- a/internal/cgen/base/image-private.h +++ b/internal/cgen/base/image-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/image-public.h b/internal/cgen/base/image-public.h index b16460d4..1cb140af 100644 --- a/internal/cgen/base/image-public.h +++ b/internal/cgen/base/image-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/intconv-submodule.c b/internal/cgen/base/intconv-submodule.c index 859594e9..c0632674 100644 --- a/internal/cgen/base/intconv-submodule.c +++ b/internal/cgen/base/intconv-submodule.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/io-private.h b/internal/cgen/base/io-private.h index 5c63b268..ad0c2b64 100644 --- a/internal/cgen/base/io-private.h +++ b/internal/cgen/base/io-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/io-public.h b/internal/cgen/base/io-public.h index cf66c4f9..fa5feb21 100644 --- a/internal/cgen/base/io-public.h +++ b/internal/cgen/base/io-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/magic-submodule.c b/internal/cgen/base/magic-submodule.c index 1b974540..32f65005 100644 --- a/internal/cgen/base/magic-submodule.c +++ b/internal/cgen/base/magic-submodule.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2021 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/memory-private.h b/internal/cgen/base/memory-private.h index e2086b02..15ff0974 100644 --- a/internal/cgen/base/memory-private.h +++ b/internal/cgen/base/memory-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/memory-public.h b/internal/cgen/base/memory-public.h index 9a5adcf0..c5527049 100644 --- a/internal/cgen/base/memory-public.h +++ b/internal/cgen/base/memory-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/pixconv-submodule.c b/internal/cgen/base/pixconv-submodule.c index 4cab2d46..0b3e66bd 100644 --- a/internal/cgen/base/pixconv-submodule.c +++ b/internal/cgen/base/pixconv-submodule.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/range-private.h b/internal/cgen/base/range-private.h index a336c573..010ed7ee 100644 --- a/internal/cgen/base/range-private.h +++ b/internal/cgen/base/range-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/range-public.h b/internal/cgen/base/range-public.h index 2924d500..a146b8db 100644 --- a/internal/cgen/base/range-public.h +++ b/internal/cgen/base/range-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2017 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/strconv-private.h b/internal/cgen/base/strconv-private.h index 5c716c83..1cd9e051 100644 --- a/internal/cgen/base/strconv-private.h +++ b/internal/cgen/base/strconv-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/strconv-public.h b/internal/cgen/base/strconv-public.h index 1147ed0e..ec2ad839 100644 --- a/internal/cgen/base/strconv-public.h +++ b/internal/cgen/base/strconv-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/token-private.h b/internal/cgen/base/token-private.h index 801ce73f..26c48644 100644 --- a/internal/cgen/base/token-private.h +++ b/internal/cgen/base/token-private.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/token-public.h b/internal/cgen/base/token-public.h index 2934538c..f7df668a 100644 --- a/internal/cgen/base/token-public.h +++ b/internal/cgen/base/token-public.h @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/base/utf8-submodule.c b/internal/cgen/base/utf8-submodule.c index 64780e97..8020542b 100644 --- a/internal/cgen/base/utf8-submodule.c +++ b/internal/cgen/base/utf8-submodule.c @@ -1,5 +1,3 @@ -// After editing this file, run "go generate" in the ../data directory. - // Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/internal/cgen/cgen.go b/internal/cgen/cgen.go index 88c15881..7d3fd7ec 100644 --- a/internal/cgen/cgen.go +++ b/internal/cgen/cgen.go @@ -355,11 +355,6 @@ func insertBaseAllPublicH(buf *buffer) error { func insertBaseCopyright(buf *buffer) error { s := string(embedBaseAllImplC) - if strings.HasPrefix(s, "// After editing ") { - if i := strings.Index(s, "\n\n"); i >= 0 { - s = s[i+2:] - } - } if i := strings.Index(s, "\n\n"); i >= 0 { buf.writes(s[:i+1]) } diff --git a/internal/cgen/embed.go b/internal/cgen/embed.go index f3a4d0fd..24c3211b 100644 --- a/internal/cgen/embed.go +++ b/internal/cgen/embed.go @@ -26,11 +26,6 @@ type EmbeddedString string // Trim removes the leading "Copyright etc" boilerplate. func (e EmbeddedString) Trim() string { s := string(e) - if strings.HasPrefix(s, "// After editing ") { - if i := strings.Index(s, "\n\n"); i >= 0 { - s = s[i+2:] - } - } if strings.HasPrefix(s, "// Copyright ") { if i := strings.Index(s, "\n\n"); i >= 0 { s = s[i+2:]