Browse Source

Undead: only introduced files that are called

georgeg
Pjotr Prins 4 years ago
parent
commit
810c56a4c4
  1. 4
      Makefile
  2. 23
      contrib/undead/LICENSE
  3. 9
      contrib/undead/README.md
  4. 1323
      contrib/undead/src/undead/doformat.d
  5. 25
      contrib/undead/src/undead/internal/file.d
  6. 3068
      contrib/undead/src/undead/stream.d
  7. 21
      contrib/undead/src/undead/utf.d

4
Makefile

@ -1,7 +1,7 @@
# Simple Makefile
D_COMPILER=ldc2
DFLAGS = -wi -g -relocation-model=pic -unittest -main
DFLAGS = -wi -g -relocation-model=pic -unittest -main -Icontrib/undead/src
ifndef GUIX
ifdef GUIX_ENVIRONMENT
@ -15,7 +15,7 @@ endif
DLIBS = $(LIBRARY_PATH)/libphobos2-ldc.a $(LIBRARY_PATH)/libdruntime-ldc.a
DLIBS_DEBUG = $(LIBRARY_PATH)/libphobos2-ldc-debug.a $(LIBRARY_PATH)/libdruntime-ldc-debug.a
SRC = $(wildcard bio/std/*.d) $(wildcard bio/std/*/*.d) bio/std/experimental/hts/bgzf.d bio/core/bgzf/constants.d
SRC = $(wildcard contrib/undead/src/undead/*.d) contrib/undead/src/undead/internal/file.d $(wildcard bio/std/*.d) $(wildcard bio/std/*/*.d) bio/std/experimental/hts/bgzf.d bio/core/bgzf/constants.d bio/core/utils/stream.d bio/core/utils/switchendianness.d
OBJ = $(SRC:.d=.o)
BIN = bin/biod_tests

23
contrib/undead/LICENSE

@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

9
contrib/undead/README.md

@ -0,0 +1,9 @@
This is a subset copy of D's undead library. This code is considered
obsolete and should be phased out. The original can be found at https://github.com/dlang/undeaD
undeaD
======
Need an obsolete Phobos module? Here they are, back from the dead and upgraded to work with the latest D

1323
contrib/undead/src/undead/doformat.d

File diff suppressed because it is too large

25
contrib/undead/src/undead/internal/file.d

@ -0,0 +1,25 @@
// Written in the D programming language
module undead.internal.file;
// Copied from std.file. undead doesn't have access to it, but some modules
// in undead used std.file.deleteme when they were in Phobos, so this gives
// them access to a version of it.
public @property string deleteme() @safe
{
import std.conv : to;
import std.file : tempDir;
import std.path : buildPath;
import std.process : thisProcessID;
static _deleteme = "deleteme.dmd.unittest.pid";
static _first = true;
if(_first)
{
_deleteme = buildPath(tempDir(), _deleteme) ~ to!string(thisProcessID);
_first = false;
}
return _deleteme;
}

3068
contrib/undead/src/undead/stream.d

File diff suppressed because it is too large

21
contrib/undead/src/undead/utf.d

@ -0,0 +1,21 @@
/**
* Contains the obsolete functions from Phobos' `std.utf`.
*/
module undead.utf;
import std.utf;
import std.typecons;
//deprecated("Removed October 2017. Please use std.utf.encode instead.")
char[] toUTF8(return out char[4] buf, dchar c) nothrow @nogc @safe pure
{
const sz = encode!(Yes.useReplacementDchar)(buf, c);
return buf[0 .. sz];
}
//deprecated("Removed October 2017. Please use std.utf.encode instead.")
wchar[] toUTF16(return ref wchar[2] buf, dchar c) nothrow @nogc @safe pure
{
const sz = encode!(Yes.useReplacementDchar)(buf, c);
return buf[0 .. sz];
}
Loading…
Cancel
Save