Skip to content

Commit

Permalink
Replace most usage of std.c.* with the druntime equivalents, in prepa…
Browse files Browse the repository at this point in the history
…ration for deprecation of the std.c.* modules.
  • Loading branch information
joakim-noah committed Oct 11, 2014
1 parent 43175e1 commit c9a9cd9
Show file tree
Hide file tree
Showing 63 changed files with 98 additions and 98 deletions.
6 changes: 3 additions & 3 deletions samples/chello.d
Expand Up @@ -15,10 +15,10 @@

// From an example from "Inside OLE" Copyright Microsoft

import std.c.stdio;
import std.c.stdlib;
import core.stdc.stdio;
import core.stdc.stdlib;
import std.string;
import std.c.windows.windows;
import core.sys.windows.windows;
import std.c.windows.com;

GUID CLSID_Hello = { 0x30421140, 0, 0, [0xC0, 0, 0, 0, 0, 0, 0, 0x46] };
Expand Down
2 changes: 1 addition & 1 deletion samples/d2html.d
Expand Up @@ -11,7 +11,7 @@
* "as is" without express or implied warranty.
*/

import std.c.stdio;
import core.stdc.stdio;

import std.conv;
import std.string;
Expand Down
6 changes: 3 additions & 3 deletions samples/dclient.d
Expand Up @@ -13,9 +13,9 @@
* Compuserve: >INTERNET:kraigb@microsoft.com
*/

import std.c.stdio;
import std.c.stdlib;
import std.c.windows.windows;
import core.stdc.stdio;
import core.stdc.stdlib;
import core.sys.windows.windows;
import std.c.windows.com;

GUID CLSID_Hello = { 0x30421140, 0, 0, [0xC0, 0, 0, 0, 0, 0, 0, 0x46] };
Expand Down
12 changes: 6 additions & 6 deletions samples/dhry.d
Expand Up @@ -333,9 +333,9 @@
*************************************************************************
*/

import std.c.stdio;
import std.c.string;
import std.c.stdlib;
import core.stdc.stdio;
import core.stdc.string;
import core.stdc.stdlib;
import std.string;

/* Compiler and system dependent definitions: */
Expand Down Expand Up @@ -894,7 +894,7 @@ Boolean Func_3(Enumeration Enum_Par_Val)

version (Win32)
{
import std.c.windows.windows;
import core.sys.windows.windows;

double dtime()
{
Expand All @@ -908,7 +908,7 @@ version (Win32)

version (linux)
{
import std.c.linux.linux;
import core.stdc.time;

double dtime()
{
Expand All @@ -922,7 +922,7 @@ version (linux)

version (OSX) // supplied by Anders F Bjorklund
{
import std.c.linux.linux;
import core.sys.posix.sys.time;

double dtime()
{
Expand Down
8 changes: 4 additions & 4 deletions samples/dserver.d
Expand Up @@ -14,11 +14,11 @@
* Compuserve: >INTERNET:kraigb@microsoft.com
*/

import std.c.stdio;
import std.c.stdlib;
import std.c.string;
import core.stdc.stdio;
import core.stdc.stdlib;
import core.stdc.string;
import std.string;
import std.c.windows.windows;
import core.sys.windows.windows;
import std.c.windows.com;

import chello;
Expand Down
2 changes: 1 addition & 1 deletion samples/mydll/dll.d
@@ -1,7 +1,7 @@

// Public Domain

import std.c.windows.windows;
import core.sys.windows.windows;
import core.sys.windows.dll;

__gshared HINSTANCE g_hInst;
Expand Down
2 changes: 1 addition & 1 deletion samples/mydll/mydll.d
@@ -1,5 +1,5 @@

module mydll;
import std.c.stdio;
import core.stdc.stdio;

export void dllprint() { printf("hello dll world\n"); }
8 changes: 4 additions & 4 deletions samples/pi.d
@@ -1,7 +1,7 @@
import std.stdio;
import std.conv;
import std.c.stdlib;
import std.c.time;
import core.stdc.stdlib;
import core.stdc.time;

const int LONG_TIME = 4000;

Expand Down Expand Up @@ -42,11 +42,11 @@ int main(string[] args)
t.length = q + 1;

/* compute pi */
std.c.time.time(&startime);
core.stdc.time.time(&startime);
arctan(2);
arctan(3);
mul4();
std.c.time.time(&endtime);
core.stdc.time.time(&endtime);

// Return to the number of digits we want to display
q--;
Expand Down
2 changes: 1 addition & 1 deletion samples/winsamp.d
Expand Up @@ -11,7 +11,7 @@ module winsamp;

pragma(lib, "gdi32.lib");
import core.runtime;
import std.c.windows.windows;
import core.sys.windows.windows;
import std.string;

enum IDC_BTNCLICK = 101;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/gflow.c
Expand Up @@ -774,7 +774,7 @@ STATIC void defstarkill()

#if 1
/* The following program fails for this:
import std.c.stdio;
import core.stdc.stdio;
class Foo
{
Expand Down
2 changes: 1 addition & 1 deletion test/compilable/cppmangle.d
Expand Up @@ -4,7 +4,7 @@

version(linux):

import std.c.stdio;
import core.stdc.stdio;

extern (C++) int foob(int i, int j, int k);

Expand Down
2 changes: 1 addition & 1 deletion test/compilable/imports/art4769a.d
@@ -1,6 +1,6 @@
module imports.art4769a;

import std.c.stdio;
import core.stdc.stdio;

template DataStreamability(T)
{
Expand Down
2 changes: 1 addition & 1 deletion test/compilable/imports/test25a.d
@@ -1,7 +1,7 @@
module imports.test25a;

import imports.test25b;
import std.c.stdio;
import core.stdc.stdio;

class Afoo
{
Expand Down
2 changes: 1 addition & 1 deletion test/compilable/imports/test25b.d
Expand Up @@ -2,7 +2,7 @@ module imports.test25b;

import imports.test25a;

import std.c.stdio;
import core.stdc.stdio;

class Bfoo
{
Expand Down
2 changes: 1 addition & 1 deletion test/compilable/testcov1.d
Expand Up @@ -2,6 +2,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -cov

import std.c.string;
import core.stdc.string;
import testcov1a;

4 changes: 2 additions & 2 deletions test/d_do_test.d
Expand Up @@ -262,9 +262,9 @@ string genTempFilename(string result_path)

int system(string command)
{
if (!command) return std.c.process.system(null);
if (!command) return core.stdc.stdlib.system(null);
const commandz = toStringz(command);
auto status = std.c.process.system(commandz);
auto status = core.stdc.stdlib.system(commandz);
if (status == -1) return status;
version (Windows) status <<= 8;
return status;
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail262.d
Expand Up @@ -7,7 +7,7 @@ fail_compilation/fail262.d(23): Error: function fail262.B.f does not override an

// Issue 1645 - can override base class' const method with non-const method

import std.c.stdio;
import core.stdc.stdio;

class A
{
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail329.d
Expand Up @@ -6,7 +6,7 @@ fail_compilation/fail329.d(29): Error: variable fail329.A.foo.__ensure.result ca
---
*/

//import std.c.stdio;
//import core.stdc.stdio;

/*******************************************/

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/Same.d
Expand Up @@ -2,7 +2,7 @@
// PERMUTE_ARGS:

module Same; // makes no difference if removed
import std.c.stdio;
import core.stdc.stdio;
class Same
{
this()
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/auto1.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;

/******************************************/

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/bitops.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:

import std.c.stdio;
import core.stdc.stdio;
import core.bitop;

/*****************************************************/
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/circular.d
Expand Up @@ -5,7 +5,7 @@

// Bugzilla 4543

import std.c.stdio;
import core.stdc.stdio;
import imports.circularA;

class bclass {};
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/closure.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;

struct S { int a,b,c,d; }

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/delegate.d
@@ -1,6 +1,6 @@
// REQUIRED_ARGS:

import std.c.stdio;
import core.stdc.stdio;

/********************************************************/

Expand Down
12 changes: 6 additions & 6 deletions test/runnable/dhry.d
Expand Up @@ -335,9 +335,9 @@
*************************************************************************
*/

import std.c.stdio;
import std.c.string;
import std.c.stdlib;
import core.stdc.stdio;
import core.stdc.string;
import core.stdc.stdlib;
import std.string;


Expand Down Expand Up @@ -867,7 +867,7 @@ Boolean Func_3 (Enumeration Enum_Par_Val)

version (Windows)
{
import std.c.windows.windows;
import core.sys.windows.windows;

double dtime()
{
Expand All @@ -881,7 +881,7 @@ version (Windows)

version (linux)
{
import std.c.linux.linux;
import core.stdc.time;

double dtime()
{
Expand All @@ -895,7 +895,7 @@ version (linux)

version (OSX) // supplied by Anders F Bjorklund
{
import std.c.linux.linux;
import core.sys.posix.sys.time;

double dtime()
{
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/extra-files/mul9377a.d
@@ -1,4 +1,4 @@
import std.c.stdio;
import core.stdc.stdio;

import mul9377b;

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/extra-files/mul9377b.d
@@ -1,6 +1,6 @@
module mul9377b;

import std.c.stdio;
import core.stdc.stdio;

int j;

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/extra-files/multi9377.d
@@ -1,4 +1,4 @@
import std.c.stdio;
import core.stdc.stdio;

import mul9377a, mul9377b;

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/extra-files/test2.d
@@ -1,6 +1,6 @@

import object;
import std.c.stdio;
import core.stdc.stdio;
import std.algorithm;

/* ================================ */
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/foreach.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;

/**************************************************/

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/foreach2.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;

/**************************************************/

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/foreach3.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;

struct Foo
{
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/foreach4.d
@@ -1,5 +1,5 @@

import std.c.stdio;
import core.stdc.stdio;
import std.stdio;

alias bool bit;
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/iasm64.d
Expand Up @@ -5,7 +5,7 @@
// written by Walter Bright
// http://www.digitalmars.com

import std.c.stdio;
import core.stdc.stdio;

version (D_PIC)
{
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/imports/Other.d
@@ -1,6 +1,6 @@
module imports.Other; // makes no difference if removed
import Same;
import std.c.stdio;
import core.stdc.stdio;

class Other : Same // segfault
// class Other : Same.Same //***UGLY ALERT*** but doesn't segfault
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/imports/testminitAA.d
@@ -1,6 +1,6 @@
module imports.testminitAA;

import std.c.stdio;
import core.stdc.stdio;
int aa;

static this()
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/imports/testminitBB.d
@@ -1,6 +1,6 @@
module imports.testminitBB;

import std.c.stdio;
import core.stdc.stdio;
int bb;

static this()
Expand Down

0 comments on commit c9a9cd9

Please sign in to comment.