You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(28) |
Jun
(12) |
Jul
(11) |
Aug
(12) |
Sep
(5) |
Oct
(19) |
Nov
(14) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(18) |
Feb
(30) |
Mar
(115) |
Apr
(89) |
May
(50) |
Jun
(44) |
Jul
(22) |
Aug
(13) |
Sep
(11) |
Oct
(30) |
Nov
(28) |
Dec
(39) |
2012 |
Jan
(38) |
Feb
(18) |
Mar
(43) |
Apr
(91) |
May
(108) |
Jun
(46) |
Jul
(37) |
Aug
(44) |
Sep
(33) |
Oct
(29) |
Nov
(36) |
Dec
(15) |
2013 |
Jan
(35) |
Feb
(611) |
Mar
(5) |
Apr
(55) |
May
(30) |
Jun
(28) |
Jul
(458) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(22) |
Dec
(32) |
2014 |
Jan
(16) |
Feb
(16) |
Mar
(42) |
Apr
(179) |
May
(7) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(2) |
2
(3) |
3
|
4
(2) |
5
(3) |
6
(2) |
7
(8) |
8
(12) |
9
|
10
|
11
(17) |
12
(16) |
13
(4) |
14
(3) |
15
(5) |
16
|
17
|
18
(1) |
19
(3) |
20
(2) |
21
(1) |
22
(1) |
23
|
24
|
25
(3) |
26
(1) |
27
|
28
|
29
|
30
|
From: Koichi S. <koi...@us...> - 2011-04-06 04:55:48
|
Project "Postgres-XC". The branch, documentation has been created at 180361060615c52e211244be7d5939c4a5edc0c4 (commit) - Log ----------------------------------------------------------------- commit 180361060615c52e211244be7d5939c4a5edc0c4 Author: Koichi Suzuki <koi...@gm...> Date: Wed Apr 6 13:49:40 2011 +0900 This is the first commit of "documentation" branch. This branch is to construct reference manual, man page and html document for Postgres-XC. Deatailed information of document preparaton will be given in a file in "doc" directory. At this time, I added "makesgml" tool. To make it easy to merge with PostgreSQL documentation and to translate to other language, makesgml can be used. This tool accepts two kind of tags, <!## label> ... <!## end> in the input file (namely, *.sgmlin) and selects only an area specified by -I option of "makesgml" command. This pair of label can be nested and you can select any part of the source file to be used in the target SGML file. diff --git a/doc/tools/makesgml/makesgml.c b/doc/tools/makesgml/makesgml.c new file mode 100644 index 0000000..013942c --- /dev/null +++ b/doc/tools/makesgml/makesgml.c @@ -0,0 +1,331 @@ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <unistd.h> +#include <errno.h> + + +typedef struct tokenlist +{ + struct tokenlist *next; + char *token; +} tokenlist; + + +#define STARTTOKEN "<!##" + +tokenlist *ignoreToks = NULL; +tokenlist *lastIgnoreToken = NULL; +tokenlist *includeToks = NULL; +tokenlist *lastIncludeToken = NULL; + +FILE *inf; +FILE *outf; +int inf_lno; +char *progname; +int default_include = 0; + +void make_sgml(int writeflag); +void usage(int exitcode); +void format_err(int lno); +int my_getline(char *buf); + +main(int argc, char *argv[]) +{ + int flags,opt; + char *ifnam = NULL; + char *ofnam = NULL; + + char *token; + + inf = stdin; + outf = stdout; + + progname = argv[0]; + while((opt = getopt(argc, argv, "i:o:E:I:d:")) != -1) + { + switch(opt) + { + case 'i': + if (ifnam) { + free(ifnam); + ifnam = NULL; + } + if ((strcmp(optarg, "-") == 0) || (strcmp(optarg, "stdin") == 0)) + { + inf = stdin; + } + else + { + ifnam = strndup(optarg, strlen(optarg)); + } + break; + case 'o': + if (ofnam) + { + free(ofnam); + ofnam = NULL; + } + if ((strcmp(optarg, "-") == 0) || (strcmp(optarg, "stdout") == 0)) + { + outf = stdout; + } + else + { + ofnam = strndup(optarg, strlen(optarg)); + } + break; + case 'E': + token = strndup(optarg,strlen(optarg)); + if (ignoreToks == NULL) + { + ignoreToks = (tokenlist *)malloc(sizeof(tokenlist)); + if (ignoreToks == NULL) goto memerr; + ignoreToks->token = token; + ignoreToks->next = NULL; + lastIgnoreToken = ignoreToks; + } + else + { + lastIgnoreToken->next = (tokenlist *)malloc(sizeof(tokenlist)); + if (lastIgnoreToken->next == NULL) goto memerr; + lastIgnoreToken = lastIgnoreToken->next; + lastIgnoreToken->next = NULL; + lastIgnoreToken->token = token; + } + break; + case 'I': + token = strndup(optarg, strlen(optarg)); + if (includeToks == NULL) + { + includeToks = (tokenlist *)malloc(sizeof(tokenlist)); + if (includeToks == NULL) goto memerr; + includeToks->token = token; + includeToks->next = NULL; + lastIncludeToken = includeToks; + } + else + { + lastIncludeToken->next = (tokenlist *)malloc(sizeof(tokenlist)); + if (lastIncludeToken->next == NULL) goto memerr; + lastIncludeToken = lastIncludeToken->next; + lastIncludeToken->next = NULL; + lastIncludeToken->token = token; + } + break; + case 'd': /* Default handling: include/exclude */ + if (strcmp(optarg, "i") == 0) + { + default_include = 1; + } + else if (strcmp(optarg, "e") == 0) + { + default_include = 0; + } + else + { + usage(1); + } + break; + default: + usage(1); + exit(1); + } + } + if (ifnam) + { + inf = fopen(ifnam, "r"); + if (inf == NULL) + { + fprintf(stderr, "Cannot open input file %s, %s\n", ifnam, strerror(errno)); + exit(1); + } + } + inf_lno = 0; + if (ofnam) + { + outf = fopen(ofnam, "w"); + if (outf == NULL) + { + fprintf(stderr, "Cannot open output file %s, %s\n", ofnam, strerror(errno)); + exit(1); + } + } + make_sgml(1); + exit(0); + + memerr: + fprintf(stderr, "Memory not available.\n"); + exit(1); +} + +int my_getline(char *buf) +{ + int c; + + c = getc(inf); + if (c == EOF) + { + *buf = 0; + return(EOF); + } + else + { + ungetc(c, inf); + } + for(;;) { + c = getc(inf); + switch(c) + { + case '\n': + *buf++ = c; + *buf = 0; + inf_lno++; + return(1); + case EOF: + *buf = 0; + inf_lno++; + return(1); + default: + *buf++ = c; + continue; + } + } + exit(1); +} + + +int find_match(char *token, tokenlist *toks) +{ + tokenlist *currToks; + + for (currToks = toks; currToks; currToks = currToks->next) + { + if (strcmp(token, currToks->token) == 0) + return(1); + } + return(0); +} + +int find_match_exclude(char *token) +{ + return(find_match(token, ignoreToks)); +} + +int find_match_include(char *token) +{ + return(find_match(token, includeToks)); +} + +void format_err(int lno) +{ + fprintf(stderr, "Input file format error. Line %d.\n", lno); + exit(1); +} + + +void make_sgml(int writeflag) +{ + int rv; + char inputline[4096]; + + for(;;) { + char *curr; + char *token; + + rv = my_getline(inputline); + if (rv == EOF) + return; + curr = inputline; + for (;;curr++) { + if (*curr == ' ' || *curr == '\t') + continue; + else + break; + } + if (memcmp(curr, STARTTOKEN, strlen(STARTTOKEN)) == 0) + { + curr += strlen(STARTTOKEN); + if (*curr != ' ' && *curr != '\t') { + format_err(inf_lno); + } + for (curr++;;curr++) { + if (*curr == '\n' || *curr == 0) { + format_err(inf_lno); + } + if (*curr == ' ' || *curr == '\t') { + continue; + } + else { + break; + } + } + token = curr; + for (;;curr++) { + if (*curr == '\n' || *curr == 0) { + format_err(inf_lno); + } + if (*curr == ' ' || *curr == '\t') { + *curr = 0; + curr++; + break; + } + else if (*curr == '>') { + *curr = 0; + curr++; + *curr = '>'; + break; + } + else { + continue; + } + } + for (;;curr++) { + if (*curr == '\n' || *curr == 0) { + format_err(inf_lno); + } + if (*curr == ' ' || *curr == '\t') { + continue; + } + else if (*curr == '>') { + break; + } + else { + format_err(inf_lno); + } + } + /* You can write anything after clsing '>' */ + fputc('\n', outf); + if (strcmp(token, "end") == 0) + return; + if (find_match_exclude(token)) { + make_sgml(0); + } + else if (find_match_include(token)) { + if (writeflag) + make_sgml(1); + else + make_sgml(0); + } + else { + make_sgml(0); + } + } + else + { + if (writeflag) + fputs(inputline, outf); + else + fputc('\n', outf); + } + } + exit(1); +} + +void usage(int exitcode) +{ + fprintf(stderr, + "%s -i infile -o outfile [-d i|e ] -D exclude_token -D ... -U include_token -U ...\n", + progname); + exit(exitcode); +} diff --git a/doc/tools/makesgml/test.multilang b/doc/tools/makesgml/test.multilang new file mode 100644 index 0000000..b6ce67c --- /dev/null +++ b/doc/tools/makesgml/test.multilang @@ -0,0 +1,22 @@ +Common to PostgreSQL and Postgres-XC, English or Japanese + +<!## PGXC > +PGXC +<!## en > +this +<!## end > +<!## jp > +ãã +<!## end > +<!## end > + +<!## PostgreSQL > +PostgreSQL +<!## en > +that +<!## end > +<!## jp > +ãã +<!## end > +<!## end > +ddd diff --git a/doc/tools/makesgml/test.out b/doc/tools/makesgml/test.out new file mode 100644 index 0000000..994ce81 --- /dev/null +++ b/doc/tools/makesgml/test.out @@ -0,0 +1,13 @@ +abcdefg + + +this + +more + + + + + + +ddd diff --git a/doc/tools/makesgml/test.test b/doc/tools/makesgml/test.test new file mode 100644 index 0000000..90f8bc7 --- /dev/null +++ b/doc/tools/makesgml/test.test @@ -0,0 +1,13 @@ +abcdefg + +<!## this> +this +<!## more> +more +<!## end> +<!## end> +<!## that> +that +<!## end> + +ddd ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-04-06 00:57:25
|
Project "Postgres-XC". The branch, master has been updated via 112ad257947a5cc60b7c598880d335a5b9a351c1 (commit) from e1946160fe64042e76b5252c66b6f6fb5da6b85d (commit) - Log ----------------------------------------------------------------- commit 112ad257947a5cc60b7c598880d335a5b9a351c1 Author: Michael P <mic...@us...> Date: Wed Apr 6 09:34:39 2011 +0900 Fix a memory leak in GTM: free connection data A memory free for string pgxc_node_id was not done, making it a possible memory leak. Patch written by Terasaka Mitsunobu diff --git a/src/gtm/client/fe-connect.c b/src/gtm/client/fe-connect.c index 9e2b564..52ce93c 100644 --- a/src/gtm/client/fe-connect.c +++ b/src/gtm/client/fe-connect.c @@ -869,6 +869,8 @@ freeGTM_Conn(GTM_Conn *conn) free(conn->pgport); if (conn->connect_timeout) free(conn->connect_timeout); + if (conn->pgxc_node_id) + free(conn->pgxc_node_id); if (conn->inBuffer) free(conn->inBuffer); if (conn->outBuffer) ----------------------------------------------------------------------- Summary of changes: src/gtm/client/fe-connect.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |