updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / cdtool / glibc-2.10.patch
blob55d20fb69746a79c4fbe993f063d875dcacd36c7
1 diff -ur cdtool-2.1.8.orig/cdown.c cdtool-2.1.8/cdown.c
2 --- cdtool-2.1.8.orig/cdown.c 2005-10-17 22:11:59.000000000 +0300
3 +++ cdtool-2.1.8/cdown.c 2009-06-19 20:15:57.000000000 +0300
4 @@ -325,7 +325,7 @@
7 /************************************************************************/
8 -/* Procedure: getline
9 +/* Procedure: get_line
10 * Purpose: read a line of text from the CDDB server
12 * Inputs:
13 @@ -333,14 +333,14 @@
14 * Returns: The line of text
15 * Notes:
16 * 1. The CDDB databases use \r\n to end lines. All lines returned
17 - * by getline() have the \r and \n stripped.
18 + * by get_line() have the \r and \n stripped.
19 * 2. Non-reentrant: the memory buffer returned previously is
20 * recycled
21 * 3. Do NOT modify the contents of the returned buffer past the
22 * NULL - data from the network is stored there
24 /************************************************************************/
25 -char *getline(void) {
26 +char *get_line(void) {
27 static char *buffer = NULL;
28 static char *lastline = NULL;
29 static int buffered = 0;
30 @@ -451,7 +451,7 @@
31 char *cdtitle;
33 netprintf(sock, "cddb read %s %s\n", categ, discid);
34 - message = getline();
35 + message = get_line();
36 switch (atoi(message)) {
37 case 401: fprintf(stderr, "error: entry not found\n"); return;
38 case 402: fprintf(stderr, "error: server error\n"); return;
39 @@ -461,13 +461,13 @@
40 default: fprintf(stderr, "error: bad message: %s\n", message); return;
42 while (iRawMode) { /* infinite loop, or skip if !iRawMode */
43 - message = getline();
44 + message = get_line();
45 if (!strcmp (message, "."))
46 return;
47 printf ("%s\r\n", message);
49 do {
50 - message = getline();
51 + message = get_line();
52 firstword = strchr(message, '=');
53 if (firstword != NULL) {
54 *firstword = '\0';
55 @@ -511,7 +511,7 @@
56 int input = 0;
57 int exact = 1;
59 - message = getline();
60 + message = get_line();
61 switch (atoi(message)) {
62 case 403: fprintf(stderr, "error: database entry is corrupt\n"); return;
63 case 409: fprintf(stderr, "error: no handshake\n"); return;
64 @@ -523,7 +523,7 @@
65 if (!exact) {
66 fprintf(stderr, "CD has no exact match\n 0: None\n");
67 do {
68 - message = getline();
69 + message = get_line();
70 if (strcmp(message, ".") != 0) {
71 matches = realloc(matches, sizeof(char*) * (++count));
72 fprintf(stderr, " %d: ", count); printcd(message);
73 @@ -628,15 +628,15 @@
74 void parsesites(void) {
75 char *buffer;
77 - buffer = getline();
78 + buffer = get_line();
79 switch (atoi(buffer)) {
80 case 210: break; /* OK */
81 case 401: fprintf(stderr, "error: no site list available\n"); return;
83 - buffer = getline();
84 + buffer = get_line();
85 do {
86 printf("%s\n", buffer);
87 - } while (strcmp(buffer = getline(), ".") != 0);
88 + } while (strcmp(buffer = get_line(), ".") != 0);
91 /************************************************************************/
92 @@ -755,7 +755,7 @@
93 exit(3);
96 - bleh = getline();
97 + bleh = get_line();
98 if (!signon(bleh)) {
99 errormsg("%s: signon error on host %s", progname, pszHost);
100 close(sock);
101 @@ -773,7 +773,7 @@
102 getuname(), gethname(), progname, VERSIONSTRING);
104 /* get welcome message */
105 - bleh = getline();
106 + bleh = get_line();
107 if (!welcome(bleh)) {
108 errormsg("%s: bad welcome message [%s]", progname, bleh);
109 close(sock);