Skip to content

Commit

Permalink
trivial file edits
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright authored and thewilsonator committed Apr 9, 2024
1 parent d3db2e7 commit 06db0bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions compiler/src/dmd/mars.d
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,9 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param

version (none)
{
for (size_t i = 0; i < arguments.length; i++)
foreach (i, arg; arguments[])
{
printf("arguments[%d] = '%s'\n", i, arguments[i]);
printf("arguments[%d] = '%s'\n", cast(int)i, arguments[i]);
}
}

Expand All @@ -614,6 +614,7 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param
return false;
}
}
//printf("push %s\n", p);
files.push(p);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/root/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ nothrow:

version (Posix)
{
//printf("File::read('%s')\n",name);
//printf("File::read('%.*s')\n", cast(int)name.length, name.ptr);
int fd = name.toCStringThen!(slice => open(slice.ptr, O_RDONLY));
if (fd == -1)
{
Expand Down
2 changes: 2 additions & 0 deletions compiler/src/dmd/root/filename.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module dmd.root.filename;

import core.stdc.ctype;
import core.stdc.errno;
import core.stdc.stdio;
import core.stdc.string;

import dmd.common.file;
Expand Down Expand Up @@ -858,6 +859,7 @@ nothrow:
{
if (!name.length)
return 0;
//static int count; printf("count: %d %.*s\n", ++count, cast(int)name.length, name.ptr);
version (Posix)
{
stat_t st;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/root/rmem.d
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Params:
Returns: A null-terminated copy of the input array.
*/
extern (D) char[] xarraydup(const(char)[] s) pure nothrow
extern (D) char[] xarraydup(scope const(char)[] s) pure nothrow
{
if (!s)
return null;
Expand Down

0 comments on commit 06db0bf

Please sign in to comment.