-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/csv.c | 2 | ||||
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/http.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/noncore/todayplugins/stockticker/libstocks/csv.c b/noncore/todayplugins/stockticker/libstocks/csv.c index f45af52..6170bed 100644 --- a/noncore/todayplugins/stockticker/libstocks/csv.c +++ b/noncore/todayplugins/stockticker/libstocks/csv.c | |||
@@ -1,46 +1,48 @@ | |||
1 | /* libstocks - Library to get current stock quotes from Yahoo Finance | 1 | /* libstocks - Library to get current stock quotes from Yahoo Finance |
2 | * | 2 | * |
3 | * Copyright (C) 2000 Eric Laeuffer | 3 | * Copyright (C) 2000 Eric Laeuffer |
4 | * | 4 | * |
5 | * This library is free software; you can redistribute it and/or | 5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Library General Public | 6 | * modify it under the terms of the GNU Library General Public |
7 | * License as published by the Free Software Foundation; either | 7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. | 8 | * version 2 of the License, or (at your option) any later version. |
9 | * | 9 | * |
10 | * This library is distributed in the hope that it will be useful, | 10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Library General Public License for more details. | 13 | * Library General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public |
16 | * License along with this library; if not, write to the | 16 | * License along with this library; if not, write to the |
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | * Boston, MA 02111-1307, USA. | 18 | * Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define __CSV_C__ | 21 | #define __CSV_C__ |
22 | #ifndef __UNIX__ | ||
22 | #define __UNIX__ | 23 | #define __UNIX__ |
24 | #endif | ||
23 | 25 | ||
24 | #include <string.h> | 26 | #include <string.h> |
25 | #include <stdlib.h> | 27 | #include <stdlib.h> |
26 | #include <stdio.h> | 28 | #include <stdio.h> |
27 | 29 | ||
28 | #ifdef __WINDOWS__ | 30 | #ifdef __WINDOWS__ |
29 | #include <mbstring.h> | 31 | #include <mbstring.h> |
30 | #endif | 32 | #endif |
31 | 33 | ||
32 | #include "csv.h" | 34 | #include "csv.h" |
33 | #include "stocks.h" | 35 | #include "stocks.h" |
34 | #include "lists.h" | 36 | #include "lists.h" |
35 | 37 | ||
36 | #define DATE_LENGTH 7 /*YYMMDD*/ | 38 | #define DATE_LENGTH 7 /*YYMMDD*/ |
37 | 39 | ||
38 | const char *months[12]= | 40 | const char *months[12]= |
39 | { | 41 | { |
40 | "Jan", | 42 | "Jan", |
41 | "Feb", | 43 | "Feb", |
42 | "Mar", | 44 | "Mar", |
43 | "Apr", | 45 | "Apr", |
44 | "May", | 46 | "May", |
45 | "Jun", | 47 | "Jun", |
46 | "Jul", | 48 | "Jul", |
diff --git a/noncore/todayplugins/stockticker/libstocks/http.c b/noncore/todayplugins/stockticker/libstocks/http.c index 3078746..2f38f8a 100644 --- a/noncore/todayplugins/stockticker/libstocks/http.c +++ b/noncore/todayplugins/stockticker/libstocks/http.c | |||
@@ -1,46 +1,48 @@ | |||
1 | /* libstocks - Library to get current stock quotes from Yahoo Finance | 1 | /* libstocks - Library to get current stock quotes from Yahoo Finance |
2 | * | 2 | * |
3 | * Copyright (C) 2000 Eric Laeuffer | 3 | * Copyright (C) 2000 Eric Laeuffer |
4 | * | 4 | * |
5 | * This library is free software; you can redistribute it and/or | 5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Library General Public | 6 | * modify it under the terms of the GNU Library General Public |
7 | * License as published by the Free Software Foundation; either | 7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. | 8 | * version 2 of the License, or (at your option) any later version. |
9 | * | 9 | * |
10 | * This library is distributed in the hope that it will be useful, | 10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Library General Public License for more details. | 13 | * Library General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public |
16 | * License along with this library; if not, write to the | 16 | * License along with this library; if not, write to the |
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | * Boston, MA 02111-1307, USA. | 18 | * Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define __HTTP_C__ | 21 | #define __HTTP_C__ |
22 | #ifndef __UNIX__ | ||
22 | #define __UNIX__ | 23 | #define __UNIX__ |
24 | #endif | ||
23 | 25 | ||
24 | #ifdef __UNIX__ | 26 | #ifdef __UNIX__ |
25 | #include <sys/socket.h> | 27 | #include <sys/socket.h> |
26 | #include <netinet/in.h> | 28 | #include <netinet/in.h> |
27 | #include <arpa/inet.h> | 29 | #include <arpa/inet.h> |
28 | #include <netdb.h> | 30 | #include <netdb.h> |
29 | #include <unistd.h> | 31 | #include <unistd.h> |
30 | #elif __WINDOWS__ | 32 | #elif __WINDOWS__ |
31 | #include <winsock.h> | 33 | #include <winsock.h> |
32 | #include <mbstring.h> | 34 | #include <mbstring.h> |
33 | #endif | 35 | #endif |
34 | 36 | ||
35 | #include <sys/types.h> | 37 | #include <sys/types.h> |
36 | #include <ctype.h> | 38 | #include <ctype.h> |
37 | #include <string.h> | 39 | #include <string.h> |
38 | #include <stdlib.h> | 40 | #include <stdlib.h> |
39 | #include <stdio.h> | 41 | #include <stdio.h> |
40 | 42 | ||
41 | #include "http.h" | 43 | #include "http.h" |
42 | #include "stocks.h" | 44 | #include "stocks.h" |
43 | 45 | ||
44 | #define BUF_SIZE 1024 | 46 | #define BUF_SIZE 1024 |
45 | #define HEADER_MAXBUF 512 | 47 | #define HEADER_MAXBUF 512 |
46 | 48 | ||