mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Reformat httpd* using astylerc
This commit is contained in:
parent
c35b1099a4
commit
6164f0cd34
@ -142,8 +142,7 @@
|
||||
#define HTTP_DATA_TO_SEND_CONTINUE 1
|
||||
#define HTTP_NO_DATA_TO_SEND 0
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
const char *name;
|
||||
u8_t shtml;
|
||||
} default_filename;
|
||||
@ -2201,8 +2200,7 @@ http_find_file(struct http_state *hs, const char *uri, int is_09)
|
||||
}
|
||||
sub = uri;
|
||||
ext = uri;
|
||||
for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, "."))
|
||||
{
|
||||
for (sub = strstr(sub, "."); sub != NULL; sub = strstr(sub, ".")) {
|
||||
ext = sub;
|
||||
sub++;
|
||||
}
|
||||
|
@ -6,16 +6,14 @@
|
||||
#if LWIP_HTTPD_DYNAMIC_HEADERS
|
||||
/** This struct is used for a list of HTTP header strings for various
|
||||
* filename extensions. */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
const char *extension;
|
||||
const char *content_type;
|
||||
} tHTTPHeader;
|
||||
|
||||
/** A list of strings used in HTTP headers (see RFC 1945 HTTP/1.0 and
|
||||
* RFC 2616 HTTP/1.1 for header field definitions) */
|
||||
static const char * const g_psHTTPHeaderStrings[] =
|
||||
{
|
||||
static const char *const g_psHTTPHeaderStrings[] = {
|
||||
"HTTP/1.0 200 OK\r\n",
|
||||
"HTTP/1.0 404 File not found\r\n",
|
||||
"HTTP/1.0 400 Bad Request\r\n",
|
||||
@ -82,8 +80,7 @@ static const char * const g_psHTTPHeaderStrings[] =
|
||||
/** A list of extension-to-HTTP header strings (see outdated RFC 1700 MEDIA TYPES
|
||||
* and http://www.iana.org/assignments/media-types for registered content types
|
||||
* and subtypes) */
|
||||
static const tHTTPHeader g_psHTTPHeaders[] =
|
||||
{
|
||||
static const tHTTPHeader g_psHTTPHeaders[] = {
|
||||
{ "html", HTTP_HDR_HTML},
|
||||
{ "htm", HTTP_HDR_HTML},
|
||||
{ "shtml", HTTP_HDR_SSI},
|
||||
|
@ -107,8 +107,7 @@ static int payload_alingment_dummy_counter = 0;
|
||||
|
||||
#define MAX_PATH_LEN 256
|
||||
|
||||
struct file_entry
|
||||
{
|
||||
struct file_entry {
|
||||
struct file_entry *next;
|
||||
const char *filename_c;
|
||||
};
|
||||
@ -445,8 +444,7 @@ int process_sub(FILE *data_file, FILE *struct_file)
|
||||
filesProcessed += process_sub(data_file, struct_file);
|
||||
CHDIR("..");
|
||||
curSubdir[sublen] = 0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
printf("WARNING: cannot process sub due to path length restrictions: \"%s/%s\"\n", curSubdir, currName);
|
||||
}
|
||||
}
|
||||
@ -786,8 +784,7 @@ int process_file(FILE *data_file, FILE *struct_file, const char *filename)
|
||||
fprintf(struct_file, "data_%s," NEWLINE, varname);
|
||||
fprintf(struct_file, "data_%s + %d," NEWLINE, varname, i);
|
||||
fprintf(struct_file, "sizeof(data_%s) - %d," NEWLINE, varname, i);
|
||||
switch(flags)
|
||||
{
|
||||
switch (flags) {
|
||||
case (FS_FILE_FLAGS_HEADER_INCLUDED):
|
||||
flags_str = "FS_FILE_FLAGS_HEADER_INCLUDED";
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user