Skip to content

Commit 5889c41

Browse files
committed
Generate tabs in generate_mime_type_map.php
The PHP file is space indented, but we need the C file to be tab indented.
1 parent ff19ec2 commit 5889c41

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

sapi/cli/generate_mime_type_map.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
}
4242

43-
?>
43+
echo <<<HEADER
4444
/*
4545
+----------------------------------------------------------------------+
4646
| Copyright (c) The PHP Group |
@@ -64,15 +64,23 @@
6464
#define PHP_CLI_SERVER_MIME_TYPE_MAP_H
6565
6666
typedef struct php_cli_server_ext_mime_type_pair {
67-
const char *ext;
68-
const char *mime_type;
67+
\tconst char *ext;
68+
\tconst char *mime_type;
6969
} php_cli_server_ext_mime_type_pair;
7070
7171
static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
72-
<?php foreach ($extensions as $extension => $mime): ?>
73-
{ "<?= addcslashes($extension, "\0..\37!@\@\177..\377") ?>", "<?= addcslashes($mime, "\0..\37!@\@\177..\377") ?>" },
74-
<?php endforeach ?>
75-
{ NULL, NULL }
72+
73+
HEADER;
74+
75+
foreach ($extensions as $extension => $mime) {
76+
echo "\t{ \"" .addcslashes($extension, "\0..\37!@\@\177..\377") . "\", \""
77+
. addcslashes($mime, "\0..\37!@\@\177..\377") . "\" },\n";
78+
}
79+
80+
echo <<<FOOTER
81+
\t{ NULL, NULL }
7682
};
7783
7884
#endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */
85+
86+
FOOTER;

0 commit comments

Comments
 (0)