mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
cgen: omit consecutive Wconversion gcc pragmas
This commit is contained in:
1 parent
fab0dd534a
commit
cc9ee184d0
3 files changed
+25
-393
No files matched your search
@@ -237,6 +237,16 @@ func (b *buffer) writeb(x byte) { *b = append(*b, x)
|
||||
func (b *buffer) writes(s string) { *b = append(*b, s...) }
|
||||
func (b *buffer) writex(s []byte) { *b = append(*b, s...) }
|
||||
|
||||
func (b *buffer) undoWrites(s string) bool {
|
||||
nb := len(*b)
|
||||
ns := len(s)
|
||||
if (nb < ns) || (string((*b)[nb-ns:]) != s) {
|
||||
return false
|
||||
}
|
||||
*b = (*b)[:nb-ns]
|
||||
return true
|
||||
}
|
||||
|
||||
func expandBangInsert(b *buffer, s string, m map[string]func(*buffer) error) error {
|
||||
for {
|
||||
remaining := ""
|
||||
|
||||
Reference in new issue
Block a user