Skip to content

Commit e539026

Browse files
committed
Add patch for 0LL for BSD indent/pgindent.
1 parent 34f80de commit e539026

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

src/tools/pgindent/indent.bsd.patch

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
This increases the number of typedef's understood by BSD indent from 100
3-
to 1000. The second patch allows it to understand 0x7fU constants.
3+
to 1000. The second patch allows it to understand 0x7fU and 0LL constants.
44

55
---------------------------------------------------------------------------
66

@@ -24,23 +24,35 @@ to 1000. The second patch allows it to understand 0x7fU constants.
2424
"switch", 1,
2525
"case", 2,
2626

27-
*** ./lexi.c.orig Wed May 26 10:50:54 1999
28-
--- ./lexi.c Wed May 26 10:51:08 1999
27+
*** ./lexi.c.orig Wed Apr 18 17:15:17 2001
28+
--- ./lexi.c Mon Sep 3 19:05:17 2001
2929
***************
30-
*** 186,192 ****
30+
*** 186,194 ****
3131
*e_token++ = *buf_ptr++;
3232
}
3333
}
34-
! if (*buf_ptr == 'L' || *buf_ptr == 'l')
35-
*e_token++ = *buf_ptr++;
34+
! if (*buf_ptr == 'L' || *buf_ptr == 'U' ||
35+
! *buf_ptr == 'l' || *buf_ptr == 'u')
36+
! *e_token++ = *buf_ptr++;
3637
}
3738
else
38-
--- 186,193 ----
39+
while (chartype[*buf_ptr] == alphanum) { /* copy it over */
40+
--- 186,203 ----
3941
*e_token++ = *buf_ptr++;
4042
}
4143
}
42-
! if (*buf_ptr == 'L' || *buf_ptr == 'U' ||
43-
! *buf_ptr == 'l' || *buf_ptr == 'u')
44-
*e_token++ = *buf_ptr++;
44+
! if (*buf_ptr == 'F' || *buf_ptr == 'f') {
45+
! /* float constant */
46+
! *e_token++ = *buf_ptr++;
47+
! } else {
48+
! /* integer constant (U, L, UL, LL, ULL) */
49+
! if (*buf_ptr == 'U' || *buf_ptr == 'u')
50+
! *e_token++ = *buf_ptr++;
51+
! if (*buf_ptr == 'L' || *buf_ptr == 'l')
52+
! *e_token++ = *buf_ptr++;
53+
! if (*buf_ptr == 'L' || *buf_ptr == 'l')
54+
! *e_token++ = *buf_ptr++;
55+
! }
4556
}
4657
else
58+
while (chartype[*buf_ptr] == alphanum) { /* copy it over */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy