summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-13 14:12:55 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-13 14:12:55 +0200
commit7f6387b59ae1b5d642b0d05afbb14cab07061a9a (patch)
treed09f6f4674163b6a57d8805408877b05294f6931 /win32
parent3f72c77ce47ee0906905b83161d9c1d24e425d89 (diff)
downloadphp-git-7f6387b59ae1b5d642b0d05afbb14cab07061a9a.tar.gz
Trim trailing whitespace in source code files
Diffstat (limited to 'win32')
-rw-r--r--win32/build/Makefile6
-rw-r--r--win32/build/buildconf.js6
-rw-r--r--win32/build/config.w322
-rw-r--r--win32/build/config.w32.phpize.in2
-rw-r--r--win32/build/confutils.js112
-rw-r--r--win32/build/default.manifest8
-rw-r--r--win32/build/mkdist.php26
-rw-r--r--win32/codepage.c12
-rw-r--r--win32/codepage.h6
-rw-r--r--win32/cp_enc_map_gen.c2
-rw-r--r--win32/dllmain.c4
-rw-r--r--win32/getrusage.c4
-rw-r--r--win32/getrusage.h4
-rw-r--r--win32/install.txt24
-rw-r--r--win32/ioutil.c14
-rw-r--r--win32/ioutil.h6
-rw-r--r--win32/readdir.c2
-rw-r--r--win32/time.h2
-rw-r--r--win32/winutil.c2
19 files changed, 122 insertions, 122 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile
index 56c2653956..59077d09b8 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -68,14 +68,14 @@ Zend\zend_language_parser.c Zend\zend_language_parser.h: Zend\zend_language_pars
sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_parser.y
$(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d -p phpdbg_ sapi/phpdbg/phpdbg_parser.y
-
+
!if $(RE2C) != ""
Zend\zend_ini_scanner.c: Zend\zend_ini_scanner.l
$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l
Zend\zend_language_scanner.c: Zend\zend_language_scanner.l
$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l
-
+
sapi\phpdbg\phpdbg_lexer.c: sapi\phpdbg\phpdbg_lexer.l
$(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l
!endif
@@ -128,7 +128,7 @@ $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV):
@for %D in ($(BUILD_DIRS_SUB)) do @if not exist %D @mkdir %D > NUL
@if not exist $(BUILD_DIR_DEV) @mkdir $(BUILD_DIR_DEV) > NUL
@cd "$(PHP_SRC_DIR)"
-
+
clean-sapi:
@echo Cleaning SAPI
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index d3526b5a2f..6963c6ede9 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -56,17 +56,17 @@ function find_config_w32(dirname)
var c, i, ok, n;
var item = null;
var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"].*\\)", "gm");
-
+
for (; !fc.atEnd(); fc.moveNext())
{
ok = true;
/* check if we already picked up a module with the same dirname;
* if we have, don't include it here */
n = FSO.GetFileName(fc.item());
-
+
if (n == '.svn' || n == 'tests')
continue;
-
+
// WScript.StdOut.WriteLine("checking " + dirname + "/" + n);
if (MODULES.Exists(n)) {
WScript.StdOut.WriteLine("Skipping " + dirname + "/" + n + " -- already have a module with that name");
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 1269c6e30f..05ad6e194a 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -63,7 +63,7 @@ toolset_setup_common_cflags();
ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto');
var PHP_MP_DISABLED = true;
if (VS_TOOLSET && PHP_MP != 'disable') {
- // no from disable-all
+ // no from disable-all
if(PHP_MP == 'auto' || PHP_MP == 'no') {
ADD_FLAG('CFLAGS', ' /MP ');
PHP_MP_DISABLED = false;
diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in
index 5d9cd6efa6..812d28faf5 100644
--- a/win32/build/config.w32.phpize.in
+++ b/win32/build/config.w32.phpize.in
@@ -44,7 +44,7 @@ ARG_WITH('prefix', 'PHP installation prefix', PHP_PREFIX);
ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto');
var PHP_MP_DISABLED = true;
if (VS_TOOLSET && PHP_MP != 'disable') {
- // no from disable-all
+ // no from disable-all
if(PHP_MP == 'auto' || PHP_MP == 'no') {
ADD_FLAG('CFLAGS', ' /MP ');
PHP_MP_DISABLED = false;
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 8b3d081c1c..1bf452e967 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -128,7 +128,7 @@ var PHP_VERSION_STRING = "7.1.0";
function get_version_numbers()
{
var cin = file_get_contents("configure.in");
-
+
if (cin.match(new RegExp("PHP_MAJOR_VERSION=(\\d+)"))) {
PHP_VERSION = RegExp.$1;
}
@@ -230,7 +230,7 @@ function condense_path(path)
/* on a different drive */
break;
}
-
+
return path;
}
@@ -245,7 +245,7 @@ function ConfigureArg(type, optname, helptext, defval)
this.arg = "--" + type + "-" + optname;
this.imparg = "--" + opptype + "-" + optname;
}
-
+
this.optname = optname;
this.helptext = helptext;
this.defval = defval;
@@ -292,7 +292,7 @@ function word_wrap_and_indent(indent, text, line_suffix, indent_char)
if (text == null) {
return "";
}
-
+
var words = text.split(new RegExp("\\s+", "g"));
var i = 0;
var ret_text = "";
@@ -312,7 +312,7 @@ function word_wrap_and_indent(indent, text, line_suffix, indent_char)
for (i = 0; i < indent; i++) {
space += indent_char;
}
-
+
for (i = 0; i < words.length; i++) {
if (this_line.length) {
t = this_line + " " + words[i];
@@ -351,7 +351,7 @@ function conf_process_args()
var analyzed = false;
var nice = "cscript /nologo configure.js ";
var disable_all = false;
-
+
args = WScript.Arguments;
for (i = 0; i < args.length; i++) {
arg = args(i);
@@ -475,7 +475,7 @@ can be built that way. \
analyzed = analyze_arg(arg.defval);
shared = analyzed[0];
argval = analyzed[1];
-
+
// Don't trust a default "yes" answer for a non-core module
// in a snapshot build
if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) {
@@ -504,7 +504,7 @@ can be built that way. \
}
}
}
-
+
if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") {
force = true;
for (j = 0; j < snapshot_build_exclusions.length; j++) {
@@ -771,7 +771,7 @@ function CHECK_LIB(libnames, target, path_to_check, common_name)
var i, j, k, libname;
var location = false;
var path = path_to_check.split(';');
-
+
for (i = 0; i < libnames.length; i++) {
libname = libnames[i];
@@ -844,7 +844,7 @@ function OLD_CHECK_LIB(libnames, target, path_to_check)
} else {
target = "_" + target.toUpperCase();
}
-
+
if (path_to_check == null) {
path_to_check = php_usual_lib_suspects;
} else {
@@ -923,7 +923,7 @@ function CHECK_FUNC_IN_HEADER(header_name, func_name, path_to_check, add_to_flag
return c;
}
STDOUT.WriteLine("No");
- return false;
+ return false;
}
function GREP_HEADER(header_name, regex, path_to_check)
@@ -945,7 +945,7 @@ function GREP_HEADER(header_name, regex, path_to_check)
if (typeof(p) == "string") {
c = file_get_contents(p);
}
- }
+ }
if (!c) {
return false;
}
@@ -965,7 +965,7 @@ function GREP_HEADER(header_name, regex, path_to_check)
function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env, add_dir_part, add_to_flag_only)
{
var dir_part_to_add = "";
-
+
if (use_env == null) {
use_env = true;
}
@@ -983,7 +983,7 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
} else {
path_to_check += ";" + php_usual_include_suspects;
}
-
+
var p = search_paths(header_name, path_to_check, use_env ? "INCLUDE" : null);
var have = 0;
var sym;
@@ -1000,7 +1000,7 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
if (typeof(p) == "string" && add_dir_part) {
ADD_FLAG(flag_name, '/I "' + p + dir_part_to_add + '" ');
}
- }
+ }
have = p ? 1 : 0
sym = header_name.toUpperCase();
@@ -1120,15 +1120,15 @@ function generate_version_info_resource(makefiletarget, basename, creditspath, s
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": $(PHP_DIR)\\build\\template.rc");
MFO.WriteLine("\t$(RC) /nologo $(BASE_INCLUDES) /I $(PHP_DIR)/include /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"'
- + makefiletarget + '\\"" /d URL="\\"' + project_url +
- '\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
+ + makefiletarget + '\\"" /d URL="\\"' + project_url +
+ '\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
'\\"" /d THANKS_GUYS="\\"' + thanks + '\\"" $(PHP_DIR)\\build\\template.rc');
} else {
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": win32\\build\\template.rc");
MFO.WriteLine("\t$(RC) /nologo $(BASE_INCLUDES) /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"'
- + makefiletarget + '\\"" /d URL="\\"' + project_url +
- '\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
+ + makefiletarget + '\\"" /d URL="\\"' + project_url +
+ '\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
'\\"" /d THANKS_GUYS="\\"' + thanks + '\\"" win32\\build\\template.rc');
}
MFO.WriteBlankLines(1);
@@ -1188,7 +1188,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
resname = generate_version_info_resource(makefiletarget, sapiname, configure_module_dirname, true);
manifest_name = generate_version_info_manifest(makefiletarget);
-
+
MFO.WriteLine(makefiletarget + ": $(BUILD_DIR)\\" + makefiletarget);
MFO.WriteLine("\t@echo SAPI " + sapiname_for_printing + " build complete");
if (MODE_PHPIZE) {
@@ -1207,7 +1207,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
ldflags = "$(LDFLAGS)";
manifest = "-@$(_VC_MANIFEST_EMBED_EXE)";
}
-
+
if(is_pgo_desired(sapiname) && (PHP_PGI == "yes" || PHP_PGO != "no")) {
// Add compiler and link flags if PGO options are selected
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
@@ -1241,7 +1241,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
if (manifest) {
MFO.WriteLine("\t" + manifest);
}
-
+
DEFINE('CFLAGS_' + SAPI + '_OBJ', '$(CFLAGS_' + SAPI + ')');
if (configure_module_dirname.match("pecl")) {
@@ -1261,7 +1261,7 @@ function ADD_DIST_FILE(filename)
} else {
ADD_FLAG("PHP_EXTRA_DIST_FILES", filename);
}
-}
+}
function file_get_contents(filename)
{
@@ -1364,7 +1364,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
if (force_all_shared()) {
shared = true;
eval("PHP_" + EXT + "_SHARED = true;");
- } else {
+ } else {
eval("shared = PHP_" + EXT + "_SHARED;");
}
} else {
@@ -1394,7 +1394,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
MFO.WriteBlankLines(1);
ADD_SOURCES(configure_module_dirname, file_list, extname, obj_dir);
-
+
MFO.WriteBlankLines(1);
if (shared) {
@@ -1442,7 +1442,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
MFO.WriteLine(dllname + ": $(BUILD_DIR)\\" + dllname);
MFO.WriteLine("\t@echo EXT " + extname + " build complete");
MFO.WriteBlankLines(1);
-
+
DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_' + EXT + ')');
} else {
ADD_FLAG("STATIC_EXT_OBJS", "$(" + EXT + "_GLOBAL_OBJS)");
@@ -1479,9 +1479,9 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
}
}
}
-
+
extension_module_ptrs += '\tphpext_' + extname + '_ptr,\r\n';
-
+
DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_PHP) $(CFLAGS_' + EXT + ')');
}
if (MODE_PHPIZE) {
@@ -1546,7 +1546,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
var _tmp = src.split("\\");
var filename = _tmp.pop();
-
+
// build the obj out dir and use it as a key
var dirname = _tmp.join("\\");
@@ -1572,7 +1572,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
var build_dir = (dirname ? obj_dir + "\\" + dirname : obj_dir).replace(new RegExp("^..\\\\"), "");
}
- obj = sub_build + build_dir + "\\" + filename.replace(re, ".obj");
+ obj = sub_build + build_dir + "\\" + filename.replace(re, ".obj");
if (i > 0) {
srcs_line += " " + dir + "\\" + src;
@@ -1587,7 +1587,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
if (!srcs_by_dir.hasOwnProperty(build_dir)) {
srcs_by_dir[build_dir] = [];
- }
+ }
/* storing the index from the file_list */
srcs_by_dir[build_dir].push(i);
@@ -1617,7 +1617,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
if (PHP_ANALYZER == "clang") {
var analyzer_base_args = X64 ? "-m64" : "-m32";
var analyzer_base_flags = "";
-
+
analyzer_base_args += " --analyze";
var vc_ver;
@@ -1637,7 +1637,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
} else {
analyzer_base_flags += " -D _MSC_VER=" + probe_binary(PATH_PROG('cl', null));
}
-
+
if (X64) {
analyzer_base_flags += " -D _M_X64 -D _WIN64";
} else {
@@ -1658,7 +1658,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
"--library=win32\\build\\cppcheck.cfg " +
"--library=" + cppcheck_lib + " " +
/* "--rule-file=win32\build\cppcheck_rules.xml " + */
- " --std=c89 --std=c++11 " +
+ " --std=c89 --std=c++11 " +
"--quiet --inconclusive --template=vs -j 4 ";
var cppcheck_build_dir = get_define("CPPCHECK_BUILD_DIR");
@@ -1678,9 +1678,9 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
MFO.WriteLine("\t@$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + d + obj);
if ("clang" == PHP_ANALYZER) {
- MFO.WriteLine("\t\"@$(CLANG_CL)\" " + analyzer_base_args + " $(" + flags + "_ANALYZER) $(CFLAGS_ANALYZER) $(" + bd_flags_name + "_ANALYZER) " + dir + "\\" + src);
+ MFO.WriteLine("\t\"@$(CLANG_CL)\" " + analyzer_base_args + " $(" + flags + "_ANALYZER) $(CFLAGS_ANALYZER) $(" + bd_flags_name + "_ANALYZER) " + dir + "\\" + src);
} else if ("cppcheck" == PHP_ANALYZER) {
- MFO.WriteLine("\t\"@$(CPPCHECK)\" " + analyzer_base_args + " $(" + flags + "_ANALYZER) $(CFLAGS_ANALYZER) $(" + bd_flags_name + "_ANALYZER) " + analyzer_base_flags + " " + dir + "\\" + src);
+ MFO.WriteLine("\t\"@$(CPPCHECK)\" " + analyzer_base_args + " $(" + flags + "_ANALYZER) $(CFLAGS_ANALYZER) $(" + bd_flags_name + "_ANALYZER) " + analyzer_base_flags + " " + dir + "\\" + src);
}else if (PHP_ANALYZER == "pvs") {
MFO.WriteLine("\t@\"$(PVS_STUDIO)\" --cl-params $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " --source-file " + dir + "\\" + src
+ " --cfg PVS-Studio.conf --errors-off \"V122 V117 V111\" ");
@@ -1705,8 +1705,8 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
DEFINE(sym, tv);
- /* Generate the object response file and define it to the Makefile. This can be
- useful when getting the "command line too long" linker errors.
+ /* Generate the object response file and define it to the Makefile. This can be
+ useful when getting the "command line too long" linker errors.
TODO pack this into a function when response files are used for other kinds of info. */
var obj_lst_fh = null;
if (!FSO.FileExists(obj_lst_fn)) {
@@ -1750,11 +1750,11 @@ function generate_internal_functions()
var indata;
STDOUT.WriteLine("Generating main/internal_functions.c");
-
+
infile = FSO.OpenTextFile("main/internal_functions.c.in", 1);
indata = infile.ReadAll();
infile.Close();
-
+
indata = indata.replace("@EXT_INCLUDE_CODE@", extension_include_code);
indata = indata.replace("@EXT_MODULE_PTRS@", extension_module_ptrs);
@@ -1930,7 +1930,7 @@ function generate_tmp_php_ini()
if ("shared" != extensions_enabled[i][1]) {
continue;
}
-
+
var directive = "extension";
if ("opcache" == extensions_enabled[i][0] || "xdebug" == extensions_enabled[i][0]) {
directive = "zend_extension";
@@ -2149,11 +2149,11 @@ function generate_config_h()
prefix = PHP_PREFIX.replace(new RegExp("\\\\", "g"), "\\\\");
STDOUT.WriteLine("Generating main/config.w32.h");
-
+
infile = FSO.OpenTextFile("win32/build/config.w32.h.in", 1);
indata = infile.ReadAll();
infile.Close();
-
+
outfile = FSO.CreateTextFile("main/config.w32.h", true);
indata = indata.replace(new RegExp("@PREFIX@", "g"), prefix);
@@ -2195,7 +2195,7 @@ function generate_config_h()
pieces += '" "';
}
}
-
+
outfile.WriteLine("#define " + keys[i] + " " + pieces);
}
@@ -2206,7 +2206,7 @@ function generate_config_h()
outfile.WriteLine("#define HAVE_ATANH 1");
}
-
+
outfile.Close();
}
@@ -2222,7 +2222,7 @@ function generate_phpize()
var MF = FSO.CreateTextFile(dest + "/phpize.js", true);
var DEPS = FSO.CreateTextFile(dest + "/ext_deps.js", true);
-
+
prefix = get_define("PHP_PREFIX");
prefix = prefix.replace(new RegExp("/", "g"), "\\");
prefix = prefix.replace(new RegExp("\\\\", "g"), "\\\\");
@@ -2344,7 +2344,7 @@ function handle_analyzer_makefile_flags(fd, key, val)
}
val = new_val;
- if ("clang" == PHP_ANALYZER) {
+ if ("clang" == PHP_ANALYZER) {
val = val.replace(/\/FD /, "")
.replace(/\/Fp.+? /, "")
.replace(/\/Fo.+? /, "")
@@ -2409,7 +2409,7 @@ function generate_makefile()
/* \s+\/ eliminates extra whitespace caused when using \ for string continuation,
whereby \/ is the start of the next compiler switch */
var val = trim(configure_subst.Item(keys[i])).replace(/\s+\//gm, " /");
-
+
MF.WriteLine(keys[i] + "=" + val + " ");
MF.WriteBlankLines(1);
@@ -2437,7 +2437,7 @@ function generate_makefile()
MF.WriteLine(" @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(BUILD_DIR_DEV)\\include\\%D mkdir $(BUILD_DIR_DEV)\\include\\%D >nul");
for (i in headers_install) {
if (headers_install[i][2] != "") {
- MF.WriteLine(" @if not exist $(BUILD_DIR_DEV)\\include\\" + headers_install[i][2] + " mkdir $(BUILD_DIR_DEV)\\include\\" +
+ MF.WriteLine(" @if not exist $(BUILD_DIR_DEV)\\include\\" + headers_install[i][2] + " mkdir $(BUILD_DIR_DEV)\\include\\" +
headers_install[i][2] + ">nul");
MF.WriteLine(" @copy " + headers_install[i][0] + " " + "$(BUILD_DIR_DEV)\\include\\" + headers_install[i][2] + " /y >nul");
}
@@ -2499,7 +2499,7 @@ function generate_makefile()
}
TF.Close();
- MF.Close();
+ MF.Close();
}
function ADD_FLAG(name, flags, target)
@@ -2514,7 +2514,7 @@ function ADD_FLAG(name, flags, target)
/* Prefix with a space, thus making sure the
current flag is not a substring of some
other. It's still not a complete check if
- some flags with spaces got added.
+ some flags with spaces got added.
TODO rework to use an array, so direct
match can be done. This will also
@@ -2523,7 +2523,7 @@ function ADD_FLAG(name, flags, target)
if (curr_flags.indexOf(" " + flags) >= 0 || curr_flags.indexOf(flags + " ") >= 0) {
return;
}
-
+
flags = curr_flags + " " + flags;
configure_subst.Remove(name);
}
@@ -2600,7 +2600,7 @@ function copy_and_subst(srcname, destname, subst_array)
content = content.replace(re, rep);
}
-
+
var f = FSO.CreateTextFile(destname, true);
f.Write(content);
f.Close();
@@ -2621,14 +2621,14 @@ function glob(path_pattern)
if (FSO.FileExists(path_pattern)) {
return new Array(path_pattern);
}
-
+
// first, build as much as possible that doesn't have a pattern
for (p = 0; p < path_parts.length; p++) {
if (path_parts[p].match(is_pat_re))
break;
if (p)
base += "\\";
- base += path_parts[p];
+ base += path_parts[p];
}
return _inner_glob(base, p, path_parts);
@@ -2998,7 +2998,7 @@ function toolset_is_64()
return null != full.match(/x86_64/);*/
/* Even executed within an environment setup with vcvars32.bat,
- clang-cl doesn't recognize the arch toolset. But as it needs
+ clang-cl doesn't recognize the arch toolset. But as it needs
the VS environment, checking the arch of cl.exe is correct. */
return probe_binary(PATH_PROG('cl', null), 64);
} else if (ICC_TOOLSET) {
diff --git a/win32/build/default.manifest b/win32/build/default.manifest
index 992f41c738..5f7b8d5917 100644
--- a/win32/build/default.manifest
+++ b/win32/build/default.manifest
@@ -7,10 +7,10 @@
</requestedPrivileges>
</security>
</trustInfo>
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
<!-- Windows Vista -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
@@ -19,6 +19,6 @@
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
- </application>
+ </application>
</compatibility>
</assembly>
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index de328e08e1..f1de6e3884 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -73,13 +73,13 @@ function get_depends($module)
"api-ms-win-crt-.+\.dll",
);
global $build_dir, $extra_dll_deps, $ext_targets, $sapi_targets, $pecl_targets, $phpdll, $per_module_deps, $pecl_dll_deps;
-
+
$bd = strtolower(realpath($build_dir));
$is_pecl = in_array($module, $pecl_targets);
-
+
$cmd = "$GLOBALS[build_dir]\\deplister.exe \"$module\" \"$GLOBALS[build_dir]\"";
- $proc = proc_open($cmd,
+ $proc = proc_open($cmd,
array(1 => array("pipe", "w")),
$pipes);
@@ -111,7 +111,7 @@ function get_depends($module)
continue;
}
}
-
+
if ($is_pecl) {
if (!in_array($dep, $pecl_dll_deps)) {
$pecl_dll_deps[] = $dep;
@@ -208,7 +208,7 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
$hdr['size'] = octdec(trim($hdr['size']));
echo "File: $hdr[filename] $hdr[size]\n";
-
+
if ($filename == $hdr['filename']) {
echo "Found the file we want\n";
$dest = fopen($destfilename, 'wb');
@@ -217,14 +217,14 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
echo "Wrote $x bytes into $destfilename\n";
break;
}
-
+
/* skip body of the file */
$size = 512 * ceil((int)$hdr['size'] / 512);
echo "Skipping $size bytes\n";
gzseek($fp, gztell($fp) + $size);
-
+
} while (!$done);
-
+
} /* }}} */
@@ -333,9 +333,9 @@ foreach ($extra_dll_deps as $dll) {
}
/* TODO:
-add sanity check and test if all required DLLs are present, per version
+add sanity check and test if all required DLLs are present, per version
This version works at least for 3.6, 3.8 and 4.0 (5.3-vc6, 5.3-vc9 and HEAD).
-Add ADD_DLLS to add extra DLLs like dynamic dependencies for standard
+Add ADD_DLLS to add extra DLLs like dynamic dependencies for standard
deps. For example, libenchant.dll loads libenchant_myspell.dll or
libenchant_ispell.dll
*/
@@ -457,7 +457,7 @@ function copy_test_dir($directory, $dest)
}
}
- closedir($directory_list);
+ closedir($directory_list);
}
function make_phar_dot_phar($dist_dir)
@@ -543,7 +543,7 @@ if (!$use_pear_template) {
extract_file_from_tarball('Archive_Tar', 'Archive/Tar.php', "$dist_dir/PEAR/go-pear-bundle");
extract_file_from_tarball('Console_Getopt', 'Console/Getopt.php', "$dist_dir/PEAR/go-pear-bundle");
}
-
+
/* add extras from the template dir */
if (file_exists($snapshot_template)) {
$items = glob("$snapshot_template/*");
@@ -573,7 +573,7 @@ if (file_exists($snapshot_template)) {
}
}
}
-
+
/* copy c++ runtime */
$items = glob("$snapshot_template/dlls/*.CRT");
diff --git a/win32/codepage.c b/win32/codepage.c
index 8823219184..25cd4d786f 100644
--- a/win32/codepage.c
+++ b/win32/codepage.c
@@ -96,7 +96,7 @@ PW32CP wchar_t *php_win32_cp_conv_to_w(DWORD cp, DWORD flags, const char* in, si
PW32CP wchar_t *php_win32_cp_conv_ascii_to_w(const char* in, size_t in_len, size_t *out_len)
{/*{{{*/
wchar_t *ret = NULL;
- const char *idx = in, *end;
+ const char *idx = in, *end;
assert(in && in_len ? in[in_len] == '\0' : 1);
@@ -385,7 +385,7 @@ PW32CP wchar_t *php_win32_cp_env_any_to_w(const char* env)
} while (NULL != (cur = strchr(prev, '\0')) && cur++ && *cur && bin_len + (cur - prev) < 32760);
- envw = (wchar_t *) malloc((bin_len + 3) * sizeof(wchar_t));
+ envw = (wchar_t *) malloc((bin_len + 3) * sizeof(wchar_t));
if (!envw) {
SET_ERRNO_FROM_WIN32_CODE(ERROR_OUTOFMEMORY);
return NULL;
@@ -524,7 +524,7 @@ PW32CP const struct php_win32_cp *php_win32_cp_cli_do_restore(DWORD id)
/* {{{ proto bool sapi_windows_cp_set(int cp)
* Set process codepage. */
-PHP_FUNCTION(sapi_windows_cp_set)
+PHP_FUNCTION(sapi_windows_cp_set)
{
zend_long id;
const struct php_win32_cp *cp;
@@ -605,12 +605,12 @@ PHP_FUNCTION(sapi_windows_cp_conv)
php_error_docref(NULL, E_WARNING, "String is too long");
RETURN_NULL();
}
-
+
if (IS_LONG == Z_TYPE_P(z_in_cp)) {
if (ZEND_LONG_UINT_OVFL(Z_LVAL_P(z_in_cp))) {
php_error_docref(NULL, E_WARNING, "Argument %d is out of range", Z_LVAL_P(z_in_cp));
RETURN_NULL();
- }
+ }
in_cp = php_win32_cp_get_by_id((DWORD)Z_LVAL_P(z_in_cp));
if (!in_cp) {
@@ -631,7 +631,7 @@ PHP_FUNCTION(sapi_windows_cp_conv)
if (ZEND_LONG_UINT_OVFL(Z_LVAL_P(z_out_cp))) {
php_error_docref(NULL, E_WARNING, "Argument %d is out of range", Z_LVAL_P(z_out_cp));
RETURN_NULL();
- }
+ }
out_cp = php_win32_cp_get_by_id((DWORD)Z_LVAL_P(z_out_cp));
if (!out_cp) {
diff --git a/win32/codepage.h b/win32/codepage.h
index 9cfe3cd80b..cf3d72e39b 100644
--- a/win32/codepage.h
+++ b/win32/codepage.h
@@ -84,8 +84,8 @@ __forceinline static wchar_t *php_win32_cp_conv_any_to_w(const char* in, size_t
if (php_win32_cp_use_unicode()) {
/* First try the pure ascii conversion. This is the fastest way to do the
- thing. Only applicable if the source string is UTF-8 in general.
- While it could possibly be ok with European encodings, usage with
+ thing. Only applicable if the source string is UTF-8 in general.
+ While it could possibly be ok with European encodings, usage with
Asian encodings can cause unintended side effects. Lookup the term
"mojibake" if need more. */
ret = php_win32_cp_conv_ascii_to_w(in, in_len, out_len);
@@ -97,7 +97,7 @@ __forceinline static wchar_t *php_win32_cp_conv_any_to_w(const char* in, size_t
/* Still need this fallback with regard to possible broken data
in the existing scripts. Broken data might be hardcoded in
the user scripts, as UTF-8 settings was de facto ignored in
- older PHP versions. The fallback can be removed later for
+ older PHP versions. The fallback can be removed later for
the sake of purity, keep now for BC reasons. */
if (!ret) {
const struct php_win32_cp *acp = php_win32_cp_get_by_id(GetACP());
diff --git a/win32/cp_enc_map_gen.c b/win32/cp_enc_map_gen.c
index 7417c529fa..d27e28e82b 100644
--- a/win32/cp_enc_map_gen.c
+++ b/win32/cp_enc_map_gen.c
@@ -165,7 +165,7 @@ static const struct cp cp_map[] = {
{ 65001, "utf-8", "UTF-8", "Unicode (UTF-8)" },
{ 0, NULL, NULL },
};
-
+
diff --git a/win32/dllmain.c b/win32/dllmain.c
index 80a498ce7f..947c38d5ad 100644
--- a/win32/dllmain.c
+++ b/win32/dllmain.c
@@ -68,8 +68,8 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID dummy)
}
#ifdef HAVE_LIBXML
- /* This imply that only LIBXML_STATIC_FOR_DLL is supported ATM.
- If that changes, this place will need some rework.
+ /* This imply that only LIBXML_STATIC_FOR_DLL is supported ATM.
+ If that changes, this place will need some rework.
TODO Also this should be revisited as no initialization
might be needed for TS build (libxml build with TLS
support. */
diff --git a/win32/getrusage.c b/win32/getrusage.c
index b195319fd0..7facddf9ed 100644
--- a/win32/getrusage.c
+++ b/win32/getrusage.c
@@ -21,8 +21,8 @@
#include "getrusage.h"
/*
- * Parts of this file is based on code from the OpenVSwitch project, that
- * is released under the Apache 2.0 license and is copyright 2014 Nicira, Inc.
+ * Parts of this file is based on code from the OpenVSwitch project, that
+ * is released under the Apache 2.0 license and is copyright 2014 Nicira, Inc.
* and have been modified to work with PHP.
*/
diff --git a/win32/getrusage.h b/win32/getrusage.h
index 97051e0fb3..59e0b2d5dd 100644
--- a/win32/getrusage.h
+++ b/win32/getrusage.h
@@ -21,8 +21,8 @@
/*
* Note
- *
- * RUSAGE_CHILDREN is not implemented, and the RUSAGE_THREAD will
+ *
+ * RUSAGE_CHILDREN is not implemented, and the RUSAGE_THREAD will
* therefore instead be used instead to emulate the behavior.
*/
diff --git a/win32/install.txt b/win32/install.txt
index be87921dc0..a980b94b94 100644
--- a/win32/install.txt
+++ b/win32/install.txt
@@ -237,8 +237,8 @@ c:\php
Server modules provide significantly better performance and additional
functionality compared to the CGI binary. The FastCGI is significantly
more stable and can be faster than the ISAPI module with IIS.
- The CLI version is designed to let you use PHP for command line
- scripting. More information about CLI is available in the chapter
+ The CLI version is designed to let you use PHP for command line
+ scripting. More information about CLI is available in the chapter
about using PHP from the command line.
Warning
@@ -268,8 +268,8 @@ c:\php
The next step is to set up a valid configuration file for PHP, php.ini.
There are two ini files distributed in the zip file, php.ini-development
- and php.ini-production. We advise you to use php.ini-production,
- because we optimized the default settings in this file for performance,
+ and php.ini-production. We advise you to use php.ini-production,
+ because we optimized the default settings in this file for performance,
and security. Read this well documented file carefully because it has
changes from php.ini-production that will drastically affect your setup.
Some examples are display_errors being off and magic_quotes_gpc being off.
@@ -670,8 +670,8 @@ AddType application/x-httpd-php .php
PHPIniDir "C:/php"
Note: Remember to substitute your actual path to PHP for the c:/php/
- in the above examples. Take care to use either
- php5apache2.dll in your LoadModule directive and not php5apache.dll
+ in the above examples. Take care to use either
+ php5apache2.dll in your LoadModule directive and not php5apache.dll
as the latter ones are designed to run with Apache 1.3.x.
Note: If you want to use content negotiation, read related FAQ.
@@ -969,8 +969,8 @@ extension_dir = C:\php\extensions
extension=php_bz2.dll
* Some of the extensions need extra DLLs to work. Couple of them can
- be found in the distribution package, in in the main folder in PHP 5,
- but some, for example Oracle (php_oci8.dll) require DLLs which are
+ be found in the distribution package, in in the main folder in PHP 5,
+ but some, for example Oracle (php_oci8.dll) require DLLs which are
not bundled with the distribution package.
* Some of these DLLs are not bundled with the PHP distribution. See
each extensions documentation page for details. Also, read the
@@ -1004,7 +1004,7 @@ extension=php_bz2.dll
php_filepro.dll filePro functions Read-only access
php_ftp.dll FTP functions
php_gd2.dll GD library image functions GD2
- php_gettext.dll Gettext functions, requires libintl-1.dll,
+ php_gettext.dll Gettext functions, requires libintl-1.dll,
iconv.dll (bundled).
php_iconv.dll ICONV characterset conversion Requires: iconv.dll
php_imap.dll IMAP POP3 and NNTP functions None
@@ -1061,7 +1061,7 @@ Introduction to PECL Installations
When building PHP modules, it's important to have known-good versions
of the required tools (autoconf, automake, libtool, etc.) See the
- SVN Instructions for details on the required tools, and required
+ SVN Instructions for details on the required tools, and required
versions.
__________________________________________________________________
@@ -1078,10 +1078,10 @@ Downloading PECL extensions
PECL extensions that have releases listed on the PECL web site are
available for download and installation using the pecl command.
Specific revisions may also be specified.
- * SVN
+ * SVN
Most PECL extensions also reside in SVN. A web-based view may be
seen at http://svn.php.net/pecl/. To download straight from SVN,
- the following sequence of commands may be used.
+ the following sequence of commands may be used.
$ svn co http://svn.php.net/repository/pecl/<extname>/trunk
diff --git a/win32/ioutil.c b/win32/ioutil.c
index d9c19564fb..c7e1cea1ca 100644
--- a/win32/ioutil.c
+++ b/win32/ioutil.c
@@ -38,7 +38,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
- */
+ */
#include <assert.h>
#include <stdlib.h>
@@ -112,7 +112,7 @@ PW32IO BOOL php_win32_ioutil_posix_to_open_opts(int flags, mode_t mode, php_iout
* be deleted even whilst it's open.
*/
/* opts->share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; */
- /* XXX No UINX behavior Good to know it's doable.
+ /* XXX No UINX behavior Good to know it's doable.
Not being done as this means a behavior change. Should be evaluated properly. */
opts->share = FILE_SHARE_READ | FILE_SHARE_WRITE;
@@ -394,7 +394,7 @@ PW32IO int php_win32_ioutil_chdir_w(const wchar_t *path)
{/*{{{*/
int ret = 0;
DWORD err = 0;
-
+
if (!SetCurrentDirectoryW(path)) {
err = GetLastError();
ret = -1;
@@ -408,7 +408,7 @@ PW32IO int php_win32_ioutil_rename_w(const wchar_t *oldname, const wchar_t *newn
{/*{{{*/
int ret = 0;
DWORD err = 0;
-
+
PHP_WIN32_IOUTIL_CHECK_PATH_W(oldname, -1, 0)
PHP_WIN32_IOUTIL_CHECK_PATH_W(newname, -1, 0)
@@ -448,7 +448,7 @@ PW32IO wchar_t *php_win32_ioutil_getcwd_w(const wchar_t *buf, int len)
}
buf = tmp_buf;
}
-
+
if (!GetCurrentDirectoryW(len, buf)) {
err = GetLastError();
SET_ERRNO_FROM_WIN32_CODE(err);
@@ -469,7 +469,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len)
if (len == 0) {
return 0;
}
-
+
start = path;
/* Don't really care about the path normalization, pure parsing here. */
@@ -629,7 +629,7 @@ PW32IO HANDLE php_win32_ioutil_findfirstfile_w(char *path, WIN32_FIND_DATA *data
}
ret = FindFirstFileW(pathw, data);
-
+
if (INVALID_HANDLE_VALUE == ret && path) {
ret = FindFirstFileA(path, data);
}
diff --git a/win32/ioutil.h b/win32/ioutil.h
index f96719ec19..8cce745044 100644
--- a/win32/ioutil.h
+++ b/win32/ioutil.h
@@ -38,7 +38,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
- */
+ */
#ifndef PHP_WIN32_IOUTIL_H
#define PHP_WIN32_IOUTIL_H
@@ -148,7 +148,7 @@ typedef enum {
PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w(wchar_t **buf, size_t len, size_t *new_len);
#ifdef PHP_EXPORTS
-/* This symbols are needed only for the DllMain, but should not be exported
+/* This symbols are needed only for the DllMain, but should not be exported
or be available when used with PHP binaries. */
BOOL php_win32_ioutil_init(void);
#endif
@@ -159,7 +159,7 @@ __forceinline static wchar_t *php_win32_ioutil_conv_any_to_w(const char* in, siz
{/*{{{*/
wchar_t *mb, *ret;
size_t mb_len;
-
+
mb = php_win32_cp_conv_any_to_w(in, in_len, &mb_len);
if (!mb) {
return NULL;
diff --git a/win32/readdir.c b/win32/readdir.c
index 07ae3da7bb..5217e03c78 100644
--- a/win32/readdir.c
+++ b/win32/readdir.c
@@ -127,7 +127,7 @@ struct dirent *readdir(DIR *dp)
strlcpy(dp->dent.d_name, _tmp, _MAX_FNAME+1);
dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name);
free(_tmp);
-
+
dp->offset++;
dp->dent.d_ino = 1;
diff --git a/win32/time.h b/win32/time.h
index 05420b0693..f366c2f00f 100644
--- a/win32/time.h
+++ b/win32/time.h
@@ -55,7 +55,7 @@ PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
PHPAPI int usleep(unsigned int useconds);
#ifdef PHP_EXPORTS
-/* This symbols are needed only for the DllMain, but should not be exported
+/* This symbols are needed only for the DllMain, but should not be exported
or be available when used with PHP binaries. */
BOOL php_win32_init_gettimeofday(void);
#endif
diff --git a/win32/winutil.c b/win32/winutil.c
index 51c096d923..cb487fc252 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -145,7 +145,7 @@ PHP_WINUTIL_API int php_win32_code_to_errno(unsigned long w32Err)
int eerrno;
};
- static const struct code_to_errno_map errmap[] =
+ static const struct code_to_errno_map errmap[] =
{
/* 1 */ { ERROR_INVALID_FUNCTION , EINVAL }
/* 2 */ , { ERROR_FILE_NOT_FOUND , ENOENT }