diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-09-08 02:41:22 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-09-08 02:41:22 +0000 |
commit | 319dbfa7364721d3343af03a7ce063c2a2c9d385 (patch) | |
tree | a2146fe02c49ce1e497b7c287dfcaa367a703ae4 /src/tutorial/C-code/funcs.c | |
parent | a90f12fd9d6886da4f0734288496361a304d3882 (diff) | |
download | postgresql-319dbfa7364721d3343af03a7ce063c2a2c9d385.tar.gz postgresql-319dbfa7364721d3343af03a7ce063c2a2c9d385.zip |
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
Diffstat (limited to 'src/tutorial/C-code/funcs.c')
-rw-r--r-- | src/tutorial/C-code/funcs.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/tutorial/C-code/funcs.c b/src/tutorial/C-code/funcs.c index 989787e45ea..219a87c9472 100644 --- a/src/tutorial/C-code/funcs.c +++ b/src/tutorial/C-code/funcs.c @@ -17,9 +17,10 @@ Postgres in his CREATE FUNCTION statement. */ -int add_one(int arg); -char16 *concat16(char16 * arg1, char16 * arg2); -text *copytext(text * t); +int add_one(int arg); +char16 *concat16(char16 * arg1, char16 * arg2); +text *copytext(text * t); + bool c_overpaid(TUPLE t, /* the current instance of EMP */ int4 limit); @@ -32,24 +33,24 @@ add_one(int arg) return (arg + 1); } -char16 * +char16 * concat16(char16 * arg1, char16 * arg2) { - char16 *new_c16 = (char16 *) palloc(sizeof(char16)); + char16 *new_c16 = (char16 *) palloc(sizeof(char16)); memset(new_c16, 0, sizeof(char16)); strncpy((char *) new_c16, (char *) arg1, 16); return (char16 *) (strncat((char *) new_c16, (char *) arg2, 16)); } -text * +text * copytext(text * t) { /* * VARSIZE is the total size of the struct in bytes. */ - text *new_t = (text *) palloc(VARSIZE(t)); + text *new_t = (text *) palloc(VARSIZE(t)); memset(new_t, 0, VARSIZE(t)); @@ -69,8 +70,8 @@ bool c_overpaid(TUPLE t, /* the current instance of EMP */ int4 limit) { - bool isnull = false; - int4 salary; + bool isnull = false; + int4 salary; salary = (int4) GetAttributeByName(t, "salary", &isnull); |