summaryrefslogtreecommitdiff
path: root/nuttx/netutils/webclient
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-22 18:44:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-22 18:44:53 +0000
commita54b0d55f452e6c62409d90e950e9db1d64f5291 (patch)
tree74c6c7540a7decc55ffeff6dfb36bfd4108c167a /nuttx/netutils/webclient
parent1fba03aabffbded96674b375a142c5a18e024fa2 (diff)
downloadpx4-nuttx-a54b0d55f452e6c62409d90e950e9db1d64f5291.tar.gz
px4-nuttx-a54b0d55f452e6c62409d90e950e9db1d64f5291.tar.bz2
px4-nuttx-a54b0d55f452e6c62409d90e950e9db1d64f5291.zip
Refactoring netutils strings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@351 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/webclient')
-rwxr-xr-xnuttx/netutils/webclient/makestrings40
-rw-r--r--nuttx/netutils/webclient/webclient-strings31
-rw-r--r--nuttx/netutils/webclient/webclient-strings.c93
-rw-r--r--nuttx/netutils/webclient/webclient-strings.h31
4 files changed, 0 insertions, 195 deletions
diff --git a/nuttx/netutils/webclient/makestrings b/nuttx/netutils/webclient/makestrings
deleted file mode 100755
index 6dec075dd..000000000
--- a/nuttx/netutils/webclient/makestrings
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/perl
-
-
-sub stringify {
- my $name = shift(@_);
- open(OUTPUTC, "> $name.c");
- open(OUTPUTH, "> $name.h");
-
- open(FILE, "$name");
-
- while(<FILE>) {
- if(/(.+) "(.+)"/) {
- $var = $1;
- $data = $2;
-
- $datan = $data;
- $datan =~ s/\\r/\r/g;
- $datan =~ s/\\n/\n/g;
- $datan =~ s/\\01/\01/g;
- $datan =~ s/\\0/\0/g;
-
- printf(OUTPUTC "const char $var\[%d] = \n", length($datan) + 1);
- printf(OUTPUTC "/* \"$data\" */\n");
- printf(OUTPUTC "{");
- for($j = 0; $j < length($datan); $j++) {
- printf(OUTPUTC "%#02x, ", unpack("C", substr($datan, $j, 1)));
- }
- printf(OUTPUTC "0 };\n");
-
- printf(OUTPUTH "extern const char $var\[%d];\n", length($datan) + 1);
-
- }
- }
- close(OUTPUTC);
- close(OUTPUTH);
-}
-stringify("webclient-strings");
-
-exit 0;
-
diff --git a/nuttx/netutils/webclient/webclient-strings b/nuttx/netutils/webclient/webclient-strings
deleted file mode 100644
index a33139723..000000000
--- a/nuttx/netutils/webclient/webclient-strings
+++ /dev/null
@@ -1,31 +0,0 @@
-http_http "http://"
-http_200 "200 "
-http_301 "301 "
-http_302 "302 "
-http_get "GET "
-http_10 "HTTP/1.0"
-http_11 "HTTP/1.1"
-http_content_type "content-type: "
-http_texthtml "text/html"
-http_location "location: "
-http_host "host: "
-http_crnl "\r\n"
-http_index_html "/index.html"
-http_404_html "/404.html"
-http_content_type_html "Content-type: text/html\r\n\r\n"
-http_content_type_css "Content-type: text/css\r\n\r\n"
-http_content_type_text "Content-type: text/text\r\n\r\n"
-http_content_type_png "Content-type: image/png\r\n\r\n"
-http_content_type_gif "Content-type: image/gif\r\n\r\n"
-http_content_type_jpg "Content-type: image/jpeg\r\n\r\n"
-http_content_type_binary "Content-type: application/octet-stream\r\n\r\n"
-http_html ".html"
-http_shtml ".shtml"
-http_htm ".htm"
-http_css ".css"
-http_png ".png"
-http_gif ".gif"
-http_jpg ".jpg"
-http_text ".text"
-http_txt ".txt"
-http_user_agent_fields "Connection: close\r\nUser-Agent: uIP/1.0 (; http://www.sics.se/~adam/uip/)\r\n\r\n"
diff --git a/nuttx/netutils/webclient/webclient-strings.c b/nuttx/netutils/webclient/webclient-strings.c
deleted file mode 100644
index 94723308e..000000000
--- a/nuttx/netutils/webclient/webclient-strings.c
+++ /dev/null
@@ -1,93 +0,0 @@
-const char http_http[8] =
-/* "http://" */
-{0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0 };
-const char http_200[5] =
-/* "200 " */
-{0x32, 0x30, 0x30, 0x20, 0 };
-const char http_301[5] =
-/* "301 " */
-{0x33, 0x30, 0x31, 0x20, 0 };
-const char http_302[5] =
-/* "302 " */
-{0x33, 0x30, 0x32, 0x20, 0 };
-const char http_get[5] =
-/* "GET " */
-{0x47, 0x45, 0x54, 0x20, 0 };
-const char http_10[9] =
-/* "HTTP/1.0" */
-{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0 };
-const char http_11[9] =
-/* "HTTP/1.1" */
-{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0 };
-const char http_content_type[15] =
-/* "content-type: " */
-{0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0 };
-const char http_texthtml[10] =
-/* "text/html" */
-{0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0 };
-const char http_location[11] =
-/* "location: " */
-{0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0 };
-const char http_host[7] =
-/* "host: " */
-{0x68, 0x6f, 0x73, 0x74, 0x3a, 0x20, 0 };
-const char http_crnl[3] =
-/* "\r\n" */
-{0xd, 0xa, 0 };
-const char http_index_html[12] =
-/* "/index.html" */
-{0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0 };
-const char http_404_html[10] =
-/* "/404.html" */
-{0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0 };
-const char http_content_type_html[28] =
-/* "Content-type: text/html\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_css [27] =
-/* "Content-type: text/css\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_text[28] =
-/* "Content-type: text/text\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x74, 0x65, 0x78, 0x74, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_png [28] =
-/* "Content-type: image/png\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_gif [28] =
-/* "Content-type: image/gif\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_jpg [29] =
-/* "Content-type: image/jpeg\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x65, 0x67, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_content_type_binary[43] =
-/* "Content-type: application/octet-stream\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xd, 0xa, 0xd, 0xa, 0 };
-const char http_html[6] =
-/* ".html" */
-{0x2e, 0x68, 0x74, 0x6d, 0x6c, 0 };
-const char http_shtml[7] =
-/* ".shtml" */
-{0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0 };
-const char http_htm[5] =
-/* ".htm" */
-{0x2e, 0x68, 0x74, 0x6d, 0 };
-const char http_css[5] =
-/* ".css" */
-{0x2e, 0x63, 0x73, 0x73, 0 };
-const char http_png[5] =
-/* ".png" */
-{0x2e, 0x70, 0x6e, 0x67, 0 };
-const char http_gif[5] =
-/* ".gif" */
-{0x2e, 0x67, 0x69, 0x66, 0 };
-const char http_jpg[5] =
-/* ".jpg" */
-{0x2e, 0x6a, 0x70, 0x67, 0 };
-const char http_text[6] =
-/* ".text" */
-{0x2e, 0x74, 0x65, 0x78, 0x74, 0 };
-const char http_txt[5] =
-/* ".txt" */
-{0x2e, 0x74, 0x78, 0x74, 0 };
-const char http_user_agent_fields[77] =
-/* "Connection: close\r\nUser-Agent: uIP/1.0 (; http://www.sics.se/~adam/uip/)\r\n\r\n" */
-{0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x28, 0x3b, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69, 0x70, 0x2f, 0x29, 0xd, 0xa, 0xd, 0xa, 0 };
diff --git a/nuttx/netutils/webclient/webclient-strings.h b/nuttx/netutils/webclient/webclient-strings.h
deleted file mode 100644
index 9e3ec9347..000000000
--- a/nuttx/netutils/webclient/webclient-strings.h
+++ /dev/null
@@ -1,31 +0,0 @@
-extern const char http_http[8];
-extern const char http_200[5];
-extern const char http_301[5];
-extern const char http_302[5];
-extern const char http_get[5];
-extern const char http_10[9];
-extern const char http_11[9];
-extern const char http_content_type[15];
-extern const char http_texthtml[10];
-extern const char http_location[11];
-extern const char http_host[7];
-extern const char http_crnl[3];
-extern const char http_index_html[12];
-extern const char http_404_html[10];
-extern const char http_content_type_html[28];
-extern const char http_content_type_css [27];
-extern const char http_content_type_text[28];
-extern const char http_content_type_png [28];
-extern const char http_content_type_gif [28];
-extern const char http_content_type_jpg [29];
-extern const char http_content_type_binary[43];
-extern const char http_html[6];
-extern const char http_shtml[7];
-extern const char http_htm[5];
-extern const char http_css[5];
-extern const char http_png[5];
-extern const char http_gif[5];
-extern const char http_jpg[5];
-extern const char http_text[6];
-extern const char http_txt[5];
-extern const char http_user_agent_fields[77];