조성현

curl 환경설정 및 테스트 코드 추가

...@@ -876,63 +876,15 @@ void GraphItem::test() ...@@ -876,63 +876,15 @@ void GraphItem::test()
876 { 876 {
877 qDebug("* test action start"); 877 qDebug("* test action start");
878 878
879 - //지정한 사람 주변 topk coloring 879 + //count 테스트
880 -
881 -
882 -
883 -
884 - //vertex_iterator vi, vi_end;
885 - //Graph::adjacency_iterator ai, ai_end;
886 -
887 -
888 -
889 - //
890 - // <record, label>
891 - //TopKHeap<pair<int, string>> heap(TOP_K);
892 - //for (boost::tie(vi, vi_end) = boost::vertices(*graph); vi != vi_end; ++vi) {
893 - // if (node_type_map[*vi] != NODE_TYPE::NODE_AUTHOR) {
894 - // continue;
895 - // }
896 -
897 - // int record_cnt = 0;
898 - // for (boost::tie(ai, ai_end) = boost::adjacent_vertices(*vi, *graph);
899 - // ai != ai_end; ++ai) {
900 - // if (node_type_map[*ai] == NODE_TYPE::NODE_PAPER) {
901 - // ++record_cnt;
902 - // }
903 - // }
904 -
905 - // boost::put(vertex_record, *graph, *vi, record_cnt);
906 - // heap.push(make_pair(record_cnt, node_label_map[*vi]));
907 -
908 - // //qDebug() << record_cnt;
909 - //}
910 -
911 - ////get top K records
912 - //pair<int, string> topk_arr[TOP_K];
913 - //for (int i = 0; i < TOP_K; ++i) {
914 - // topk_arr[i] = heap.pop();
915 - // qDebug() << "topk[" << i << "] = " << topk_arr[i].first << ", " << QString::fromStdString(topk_arr[i].second);
916 - //}
917 -
918 -
919 - //for (auto& n : nodeList) {
920 - // auto label = n->getLabel();
921 - // n->setColor(QColor(Qt::lightGray));
922 - // for (auto& p : topk_arr) {
923 - // if (label.toStdString() == p.second) {
924 - // n->setColor(QColor(Qt::red));
925 - // break;
926 - // }
927 - // }
928 - //}
929 -
930 880
931 //전체노드 색 변경 881 //전체노드 색 변경
932 for (auto& n: nodeList) { 882 for (auto& n: nodeList) {
933 n->setColor(Qt::lightGray); 883 n->setColor(Qt::lightGray);
934 } 884 }
935 885
886 +
887 +
936 qDebug("* test action end"); 888 qDebug("* test action end");
937 } 889 }
938 890
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +#ifndef __CURL_CURLBUILD_H
2 +#define __CURL_CURLBUILD_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * Nothing in this file is intended to be modified or adjusted by the
34 + * curl library user nor by the curl library builder.
35 + *
36 + * If you think that something actually needs to be changed, adjusted
37 + * or fixed in this file, then, report it on the libcurl development
38 + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
39 + *
40 + * This header file shall only export symbols which are 'curl' or 'CURL'
41 + * prefixed, otherwise public name space would be polluted.
42 + *
43 + * NOTE 2:
44 + * -------
45 + *
46 + * Right now you might be staring at file include/curl/curlbuild.h.in or
47 + * at file include/curl/curlbuild.h, this is due to the following reason:
48 + *
49 + * On systems capable of running the configure script, the configure process
50 + * will overwrite the distributed include/curl/curlbuild.h file with one that
51 + * is suitable and specific to the library being configured and built, which
52 + * is generated from the include/curl/curlbuild.h.in template file.
53 + *
54 + */
55 +
56 +/* ================================================================ */
57 +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
58 +/* ================================================================ */
59 +
60 +#ifdef CURL_SIZEOF_LONG
61 +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
62 + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
63 +#endif
64 +
65 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
66 +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
67 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
68 +#endif
69 +
70 +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
71 +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
72 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
73 +#endif
74 +
75 +#ifdef CURL_TYPEOF_CURL_OFF_T
76 +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
77 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
78 +#endif
79 +
80 +#ifdef CURL_FORMAT_CURL_OFF_T
81 +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
82 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
83 +#endif
84 +
85 +#ifdef CURL_FORMAT_CURL_OFF_TU
86 +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
87 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
88 +#endif
89 +
90 +#ifdef CURL_FORMAT_OFF_T
91 +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
92 + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
93 +#endif
94 +
95 +#ifdef CURL_SIZEOF_CURL_OFF_T
96 +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
97 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
98 +#endif
99 +
100 +#ifdef CURL_SUFFIX_CURL_OFF_T
101 +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
102 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
103 +#endif
104 +
105 +#ifdef CURL_SUFFIX_CURL_OFF_TU
106 +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
107 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
108 +#endif
109 +
110 +/* ================================================================ */
111 +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
112 +/* ================================================================ */
113 +
114 +/* Configure process defines this to 1 when it finds out that system */
115 +/* header file ws2tcpip.h must be included by the external interface. */
116 +#cmakedefine CURL_PULL_WS2TCPIP_H
117 +#ifdef CURL_PULL_WS2TCPIP_H
118 +# ifndef WIN32_LEAN_AND_MEAN
119 +# define WIN32_LEAN_AND_MEAN
120 +# endif
121 +# include <windows.h>
122 +# include <winsock2.h>
123 +# include <ws2tcpip.h>
124 +#endif
125 +
126 +/* Configure process defines this to 1 when it finds out that system */
127 +/* header file sys/types.h must be included by the external interface. */
128 +#cmakedefine CURL_PULL_SYS_TYPES_H
129 +#ifdef CURL_PULL_SYS_TYPES_H
130 +# include <sys/types.h>
131 +#endif
132 +
133 +/* Configure process defines this to 1 when it finds out that system */
134 +/* header file stdint.h must be included by the external interface. */
135 +#cmakedefine CURL_PULL_STDINT_H
136 +#ifdef CURL_PULL_STDINT_H
137 +# include <stdint.h>
138 +#endif
139 +
140 +/* Configure process defines this to 1 when it finds out that system */
141 +/* header file inttypes.h must be included by the external interface. */
142 +#cmakedefine CURL_PULL_INTTYPES_H
143 +#ifdef CURL_PULL_INTTYPES_H
144 +# include <inttypes.h>
145 +#endif
146 +
147 +/* Configure process defines this to 1 when it finds out that system */
148 +/* header file sys/socket.h must be included by the external interface. */
149 +#cmakedefine CURL_PULL_SYS_SOCKET_H
150 +#ifdef CURL_PULL_SYS_SOCKET_H
151 +# include <sys/socket.h>
152 +#endif
153 +
154 +/* Configure process defines this to 1 when it finds out that system */
155 +/* header file sys/poll.h must be included by the external interface. */
156 +#cmakedefine CURL_PULL_SYS_POLL_H
157 +#ifdef CURL_PULL_SYS_POLL_H
158 +# include <sys/poll.h>
159 +#endif
160 +
161 +/* The size of `long', as computed by sizeof. */
162 +#define CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
163 +
164 +/* Integral data type used for curl_socklen_t. */
165 +#define CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T}
166 +
167 +/* The size of `curl_socklen_t', as computed by sizeof. */
168 +#define CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T}
169 +
170 +/* Data type definition of curl_socklen_t. */
171 +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
172 +
173 +/* Signed integral data type used for curl_off_t. */
174 +#define CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
175 +
176 +/* Data type definition of curl_off_t. */
177 +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
178 +
179 +/* curl_off_t formatting string directive without "%" conversion specifier. */
180 +#define CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}"
181 +
182 +/* unsigned curl_off_t formatting string without "%" conversion specifier. */
183 +#define CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}"
184 +
185 +/* curl_off_t formatting string directive with "%" conversion specifier. */
186 +#define CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}"
187 +
188 +/* The size of `curl_off_t', as computed by sizeof. */
189 +#define CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
190 +
191 +/* curl_off_t constant suffix. */
192 +#define CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
193 +
194 +/* unsigned curl_off_t constant suffix. */
195 +#define CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
196 +
197 +#endif /* __CURL_CURLBUILD_H */
1 +#ifndef __CURL_CURLBUILD_H
2 +#define __CURL_CURLBUILD_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * Nothing in this file is intended to be modified or adjusted by the
34 + * curl library user nor by the curl library builder.
35 + *
36 + * If you think that something actually needs to be changed, adjusted
37 + * or fixed in this file, then, report it on the libcurl development
38 + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
39 + *
40 + * This header file shall only export symbols which are 'curl' or 'CURL'
41 + * prefixed, otherwise public name space would be polluted.
42 + *
43 + * NOTE 2:
44 + * -------
45 + *
46 + * Right now you might be staring at file include/curl/curlbuild.h.in or
47 + * at file include/curl/curlbuild.h, this is due to the following reason:
48 + *
49 + * On systems capable of running the configure script, the configure process
50 + * will overwrite the distributed include/curl/curlbuild.h file with one that
51 + * is suitable and specific to the library being configured and built, which
52 + * is generated from the include/curl/curlbuild.h.in template file.
53 + *
54 + */
55 +
56 +/* ================================================================ */
57 +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
58 +/* ================================================================ */
59 +
60 +#ifdef CURL_SIZEOF_LONG
61 +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
62 + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
63 +#endif
64 +
65 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
66 +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
67 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
68 +#endif
69 +
70 +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
71 +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
72 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
73 +#endif
74 +
75 +#ifdef CURL_TYPEOF_CURL_OFF_T
76 +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
77 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
78 +#endif
79 +
80 +#ifdef CURL_FORMAT_CURL_OFF_T
81 +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
82 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
83 +#endif
84 +
85 +#ifdef CURL_FORMAT_CURL_OFF_TU
86 +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
87 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
88 +#endif
89 +
90 +#ifdef CURL_FORMAT_OFF_T
91 +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
92 + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
93 +#endif
94 +
95 +#ifdef CURL_SIZEOF_CURL_OFF_T
96 +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
97 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
98 +#endif
99 +
100 +#ifdef CURL_SUFFIX_CURL_OFF_T
101 +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
102 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
103 +#endif
104 +
105 +#ifdef CURL_SUFFIX_CURL_OFF_TU
106 +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
107 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
108 +#endif
109 +
110 +/* ================================================================ */
111 +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
112 +/* ================================================================ */
113 +
114 +/* Configure process defines this to 1 when it finds out that system */
115 +/* header file ws2tcpip.h must be included by the external interface. */
116 +#undef CURL_PULL_WS2TCPIP_H
117 +#ifdef CURL_PULL_WS2TCPIP_H
118 +# ifndef WIN32_LEAN_AND_MEAN
119 +# define WIN32_LEAN_AND_MEAN
120 +# endif
121 +# include <windows.h>
122 +# include <winsock2.h>
123 +# include <ws2tcpip.h>
124 +#endif
125 +
126 +/* Configure process defines this to 1 when it finds out that system */
127 +/* header file sys/types.h must be included by the external interface. */
128 +#undef CURL_PULL_SYS_TYPES_H
129 +#ifdef CURL_PULL_SYS_TYPES_H
130 +# include <sys/types.h>
131 +#endif
132 +
133 +/* Configure process defines this to 1 when it finds out that system */
134 +/* header file stdint.h must be included by the external interface. */
135 +#undef CURL_PULL_STDINT_H
136 +#ifdef CURL_PULL_STDINT_H
137 +# include <stdint.h>
138 +#endif
139 +
140 +/* Configure process defines this to 1 when it finds out that system */
141 +/* header file inttypes.h must be included by the external interface. */
142 +#undef CURL_PULL_INTTYPES_H
143 +#ifdef CURL_PULL_INTTYPES_H
144 +# include <inttypes.h>
145 +#endif
146 +
147 +/* Configure process defines this to 1 when it finds out that system */
148 +/* header file sys/socket.h must be included by the external interface. */
149 +#undef CURL_PULL_SYS_SOCKET_H
150 +#ifdef CURL_PULL_SYS_SOCKET_H
151 +# include <sys/socket.h>
152 +#endif
153 +
154 +/* Configure process defines this to 1 when it finds out that system */
155 +/* header file sys/poll.h must be included by the external interface. */
156 +#undef CURL_PULL_SYS_POLL_H
157 +#ifdef CURL_PULL_SYS_POLL_H
158 +# include <sys/poll.h>
159 +#endif
160 +
161 +/* The size of `long', as computed by sizeof. */
162 +#undef CURL_SIZEOF_LONG
163 +
164 +/* Integral data type used for curl_socklen_t. */
165 +#undef CURL_TYPEOF_CURL_SOCKLEN_T
166 +
167 +/* The size of `curl_socklen_t', as computed by sizeof. */
168 +#undef CURL_SIZEOF_CURL_SOCKLEN_T
169 +
170 +/* Data type definition of curl_socklen_t. */
171 +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
172 +
173 +/* Signed integral data type used for curl_off_t. */
174 +#undef CURL_TYPEOF_CURL_OFF_T
175 +
176 +/* Data type definition of curl_off_t. */
177 +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
178 +
179 +/* curl_off_t formatting string directive without "%" conversion specifier. */
180 +#undef CURL_FORMAT_CURL_OFF_T
181 +
182 +/* unsigned curl_off_t formatting string without "%" conversion specifier. */
183 +#undef CURL_FORMAT_CURL_OFF_TU
184 +
185 +/* curl_off_t formatting string directive with "%" conversion specifier. */
186 +#undef CURL_FORMAT_OFF_T
187 +
188 +/* The size of `curl_off_t', as computed by sizeof. */
189 +#undef CURL_SIZEOF_CURL_OFF_T
190 +
191 +/* curl_off_t constant suffix. */
192 +#undef CURL_SUFFIX_CURL_OFF_T
193 +
194 +/* unsigned curl_off_t constant suffix. */
195 +#undef CURL_SUFFIX_CURL_OFF_TU
196 +
197 +#endif /* __CURL_CURLBUILD_H */
1 +#ifndef __CURL_CURLRULES_H
2 +#define __CURL_CURLRULES_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* COMPILE TIME SANITY CHECKS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * All checks done in this file are intentionally placed in a public
34 + * header file which is pulled by curl/curl.h when an application is
35 + * being built using an already built libcurl library. Additionally
36 + * this file is also included and used when building the library.
37 + *
38 + * If compilation fails on this file it is certainly sure that the
39 + * problem is elsewhere. It could be a problem in the curlbuild.h
40 + * header file, or simply that you are using different compilation
41 + * settings than those used to build the library.
42 + *
43 + * Nothing in this file is intended to be modified or adjusted by the
44 + * curl library user nor by the curl library builder.
45 + *
46 + * Do not deactivate any check, these are done to make sure that the
47 + * library is properly built and used.
48 + *
49 + * You can find further help on the libcurl development mailing list:
50 + * https://cool.haxx.se/mailman/listinfo/curl-library/
51 + *
52 + * NOTE 2
53 + * ------
54 + *
55 + * Some of the following compile time checks are based on the fact
56 + * that the dimension of a constant array can not be a negative one.
57 + * In this way if the compile time verification fails, the compilation
58 + * will fail issuing an error. The error description wording is compiler
59 + * dependent but it will be quite similar to one of the following:
60 + *
61 + * "negative subscript or subscript is too large"
62 + * "array must have at least one element"
63 + * "-1 is an illegal array size"
64 + * "size of array is negative"
65 + *
66 + * If you are building an application which tries to use an already
67 + * built libcurl library and you are getting this kind of errors on
68 + * this file, it is a clear indication that there is a mismatch between
69 + * how the library was built and how you are trying to use it for your
70 + * application. Your already compiled or binary library provider is the
71 + * only one who can give you the details you need to properly use it.
72 + */
73 +
74 +/*
75 + * Verify that some macros are actually defined.
76 + */
77 +
78 +#ifndef CURL_SIZEOF_LONG
79 +# error "CURL_SIZEOF_LONG definition is missing!"
80 + Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing
81 +#endif
82 +
83 +#ifndef CURL_TYPEOF_CURL_SOCKLEN_T
84 +# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
85 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing
86 +#endif
87 +
88 +#ifndef CURL_SIZEOF_CURL_SOCKLEN_T
89 +# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
90 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing
91 +#endif
92 +
93 +#ifndef CURL_TYPEOF_CURL_OFF_T
94 +# error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
95 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing
96 +#endif
97 +
98 +#ifndef CURL_FORMAT_CURL_OFF_T
99 +# error "CURL_FORMAT_CURL_OFF_T definition is missing!"
100 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing
101 +#endif
102 +
103 +#ifndef CURL_FORMAT_CURL_OFF_TU
104 +# error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
105 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing
106 +#endif
107 +
108 +#ifndef CURL_SIZEOF_CURL_OFF_T
109 +# error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
110 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing
111 +#endif
112 +
113 +#ifndef CURL_SUFFIX_CURL_OFF_T
114 +# error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
115 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing
116 +#endif
117 +
118 +#ifndef CURL_SUFFIX_CURL_OFF_TU
119 +# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
120 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing
121 +#endif
122 +
123 +/*
124 + * Macros private to this header file.
125 + */
126 +
127 +#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
128 +
129 +#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
130 +
131 +/*
132 + * Verify that the size previously defined and expected for long
133 + * is the same as the one reported by sizeof() at compile time.
134 + */
135 +
136 +typedef char
137 + __curl_rule_01__
138 + [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
139 +
140 +/*
141 + * Verify that the size previously defined and expected for
142 + * curl_off_t is actually the the same as the one reported
143 + * by sizeof() at compile time.
144 + */
145 +
146 +typedef char
147 + __curl_rule_02__
148 + [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
149 +
150 +/*
151 + * Verify at compile time that the size of curl_off_t as reported
152 + * by sizeof() is greater or equal than the one reported for long
153 + * for the current compilation.
154 + */
155 +
156 +typedef char
157 + __curl_rule_03__
158 + [CurlchkszGE(curl_off_t, long)];
159 +
160 +/*
161 + * Verify that the size previously defined and expected for
162 + * curl_socklen_t is actually the the same as the one reported
163 + * by sizeof() at compile time.
164 + */
165 +
166 +typedef char
167 + __curl_rule_04__
168 + [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];
169 +
170 +/*
171 + * Verify at compile time that the size of curl_socklen_t as reported
172 + * by sizeof() is greater or equal than the one reported for int for
173 + * the current compilation.
174 + */
175 +
176 +typedef char
177 + __curl_rule_05__
178 + [CurlchkszGE(curl_socklen_t, int)];
179 +
180 +/* ================================================================ */
181 +/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
182 +/* ================================================================ */
183 +
184 +/*
185 + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
186 + * these to be visible and exported by the external libcurl interface API,
187 + * while also making them visible to the library internals, simply including
188 + * curl_setup.h, without actually needing to include curl.h internally.
189 + * If some day this section would grow big enough, all this should be moved
190 + * to its own header file.
191 + */
192 +
193 +/*
194 + * Figure out if we can use the ## preprocessor operator, which is supported
195 + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
196 + * or __cplusplus so we need to carefully check for them too.
197 + */
198 +
199 +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
200 + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
201 + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
202 + defined(__ILEC400__)
203 + /* This compiler is believed to have an ISO compatible preprocessor */
204 +#define CURL_ISOCPP
205 +#else
206 + /* This compiler is believed NOT to have an ISO compatible preprocessor */
207 +#undef CURL_ISOCPP
208 +#endif
209 +
210 +/*
211 + * Macros for minimum-width signed and unsigned curl_off_t integer constants.
212 + */
213 +
214 +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
215 +# define __CURL_OFF_T_C_HLPR2(x) x
216 +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
217 +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
218 + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
219 +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
220 + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
221 +#else
222 +# ifdef CURL_ISOCPP
223 +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
224 +# else
225 +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
226 +# endif
227 +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
228 +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
229 +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
230 +#endif
231 +
232 +/*
233 + * Get rid of macros private to this header file.
234 + */
235 +
236 +#undef CurlchkszEQ
237 +#undef CurlchkszGE
238 +
239 +#endif /* __CURL_CURLRULES_H */
1 +#ifndef __CURL_CURLVER_H
2 +#define __CURL_CURLVER_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* This header file contains nothing but libcurl version info, generated by
26 + a script at release-time. This was made its own header file in 7.11.2 */
27 +
28 +/* This is the global package copyright */
29 +#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, <daniel@haxx.se>."
30 +
31 +/* This is the version number of the libcurl package from which this header
32 + file origins: */
33 +#define LIBCURL_VERSION "7.54.1"
34 +
35 +/* The numeric version number is also available "in parts" by using these
36 + defines: */
37 +#define LIBCURL_VERSION_MAJOR 7
38 +#define LIBCURL_VERSION_MINOR 54
39 +#define LIBCURL_VERSION_PATCH 1
40 +
41 +/* This is the numeric version of the libcurl version number, meant for easier
42 + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
43 + always follow this syntax:
44 +
45 + 0xXXYYZZ
46 +
47 + Where XX, YY and ZZ are the main version, release and patch numbers in
48 + hexadecimal (using 8 bits each). All three numbers are always represented
49 + using two digits. 1.2 would appear as "0x010200" while version 9.11.7
50 + appears as "0x090b07".
51 +
52 + This 6-digit (24 bits) hexadecimal number does not show pre-release number,
53 + and it is always a greater number in a more recent release. It makes
54 + comparisons with greater than and less than work.
55 +
56 + Note: This define is the full hex number and _does not_ use the
57 + CURL_VERSION_BITS() macro since curl's own configure script greps for it
58 + and needs it to contain the full number.
59 +*/
60 +#define LIBCURL_VERSION_NUM 0x073601
61 +
62 +/*
63 + * This is the date and time when the full source package was created. The
64 + * timestamp is not stored in git, as the timestamp is properly set in the
65 + * tarballs by the maketgz script.
66 + *
67 + * The format of the date follows this template:
68 + *
69 + * "2007-11-23"
70 + */
71 +#define LIBCURL_TIMESTAMP "2017-06-14"
72 +
73 +#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
74 +#define CURL_AT_LEAST_VERSION(x,y,z) \
75 + (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
76 +
77 +#endif /* __CURL_CURLVER_H */
1 +#ifndef __CURL_EASY_H
2 +#define __CURL_EASY_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +#ifdef __cplusplus
25 +extern "C" {
26 +#endif
27 +
28 +CURL_EXTERN CURL *curl_easy_init(void);
29 +CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
30 +CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
31 +CURL_EXTERN void curl_easy_cleanup(CURL *curl);
32 +
33 +/*
34 + * NAME curl_easy_getinfo()
35 + *
36 + * DESCRIPTION
37 + *
38 + * Request internal information from the curl session with this function. The
39 + * third argument MUST be a pointer to a long, a pointer to a char * or a
40 + * pointer to a double (as the documentation describes elsewhere). The data
41 + * pointed to will be filled in accordingly and can be relied upon only if the
42 + * function returns CURLE_OK. This function is intended to get used *AFTER* a
43 + * performed transfer, all results from this function are undefined until the
44 + * transfer is completed.
45 + */
46 +CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
47 +
48 +
49 +/*
50 + * NAME curl_easy_duphandle()
51 + *
52 + * DESCRIPTION
53 + *
54 + * Creates a new curl session handle with the same options set for the handle
55 + * passed in. Duplicating a handle could only be a matter of cloning data and
56 + * options, internal state info and things like persistent connections cannot
57 + * be transferred. It is useful in multithreaded applications when you can run
58 + * curl_easy_duphandle() for each new thread to avoid a series of identical
59 + * curl_easy_setopt() invokes in every thread.
60 + */
61 +CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl);
62 +
63 +/*
64 + * NAME curl_easy_reset()
65 + *
66 + * DESCRIPTION
67 + *
68 + * Re-initializes a CURL handle to the default values. This puts back the
69 + * handle to the same state as it was in when it was just created.
70 + *
71 + * It does keep: live connections, the Session ID cache, the DNS cache and the
72 + * cookies.
73 + */
74 +CURL_EXTERN void curl_easy_reset(CURL *curl);
75 +
76 +/*
77 + * NAME curl_easy_recv()
78 + *
79 + * DESCRIPTION
80 + *
81 + * Receives data from the connected socket. Use after successful
82 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
83 + */
84 +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
85 + size_t *n);
86 +
87 +/*
88 + * NAME curl_easy_send()
89 + *
90 + * DESCRIPTION
91 + *
92 + * Sends data over the connected socket. Use after successful
93 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
94 + */
95 +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
96 + size_t buflen, size_t *n);
97 +
98 +#ifdef __cplusplus
99 +}
100 +#endif
101 +
102 +#endif
1 +#ifndef __CURL_MPRINTF_H
2 +#define __CURL_MPRINTF_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +#include <stdarg.h>
26 +#include <stdio.h> /* needed for FILE */
27 +#include "curl.h" /* for CURL_EXTERN */
28 +
29 +#ifdef __cplusplus
30 +extern "C" {
31 +#endif
32 +
33 +CURL_EXTERN int curl_mprintf(const char *format, ...);
34 +CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
35 +CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
36 +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
37 + const char *format, ...);
38 +CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
39 +CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
40 +CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
41 +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
42 + const char *format, va_list args);
43 +CURL_EXTERN char *curl_maprintf(const char *format, ...);
44 +CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
45 +
46 +#ifdef __cplusplus
47 +}
48 +#endif
49 +
50 +#endif /* __CURL_MPRINTF_H */
This diff is collapsed. Click to expand it.
1 +#ifndef __STDC_HEADERS_H
2 +#define __STDC_HEADERS_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +#include <sys/types.h>
26 +
27 +size_t fread(void *, size_t, size_t, FILE *);
28 +size_t fwrite(const void *, size_t, size_t, FILE *);
29 +
30 +int strcasecmp(const char *, const char *);
31 +int strncasecmp(const char *, const char *, size_t);
32 +
33 +#endif /* __STDC_HEADERS_H */
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
...@@ -2,8 +2,36 @@ ...@@ -2,8 +2,36 @@
2 #include "PaperGraphWidget.h" 2 #include "PaperGraphWidget.h"
3 #include "MainWindow.h" 3 #include "MainWindow.h"
4 4
5 +#include <stdio.h>
6 +#include <curl/curl.h>
7 +
5 int main(int argc, char *argv[]) 8 int main(int argc, char *argv[])
6 { 9 {
10 + if (1) {
11 + CURL *curl;
12 + CURLcode res;
13 +
14 + curl = curl_easy_init();
15 + if (curl) {
16 + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
17 + /* example.com is redirected, so we tell libcurl to follow redirection */
18 + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
19 +
20 + /* Perform the request, res will get the return code */
21 + res = curl_easy_perform(curl);
22 + /* Check for errors */
23 + if (res != CURLE_OK)
24 + fprintf(stderr, "curl_easy_perform() failed: %s\n",
25 + curl_easy_strerror(res));
26 +
27 + /* always cleanup */
28 + curl_easy_cleanup(curl);
29 + }
30 + return 0;
31 + }
32 +
33 +
34 +
7 QApplication app(argc, argv); 35 QApplication app(argc, argv);
8 36
9 MainWindow m; 37 MainWindow m;
......