aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2017-07-23 17:24:45 +0200
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2017-07-23 17:24:45 +0200
commit31bf2d56dd0c3918a0b6d8a1cfe4c3eae54a50a3 (patch)
tree94991fdc11ecda334d8a00a4834c9d57c3d944f4
parent22ce06bb13324b8b0cf008d263699d2f103b07ee (diff)
About to remake the top-level comments. I'm scared, so I commit.
-rw-r--r--CONTRIBUTING.md15
-rw-r--r--FORMATS.md21
-rw-r--r--arch/all/compiler-gcc/roles.yml12
-rw-r--r--arch/all/compiler-renesas/roles.yml12
-rw-r--r--arch/all/compiler-sdcc/bits/types/primitive.h (renamed from arch/all/compiler-sdcc/bits/types.h)3
-rw-r--r--arch/all/compiler-sdcc/roles.yml4
-rw-r--r--arch/all/compiler-turbo/bits/types.h2
-rw-r--r--arch/all/compiler-turbo/roles.yml4
-rw-r--r--arch/all/compiler-xlc/roles.yml5
-rw-r--r--arch/all/core-sh/include/builtin.h1
-rw-r--r--arch/all/core-sh/include/fixed.h1
-rw-r--r--arch/all/core-sh/include/machine.h1
-rw-r--r--arch/all/core-sh/include/smachine.h1
-rw-r--r--arch/all/core-sh/include/umachine.h1
-rw-r--r--arch/all/core-sh/roles.yml11
-rw-r--r--arch/all/core/copyright.yml6
-rw-r--r--arch/all/core/include/alloca.h1
-rw-r--r--arch/all/core/include/assert.h1
-rw-r--r--arch/all/core/include/byteswap.h1
-rw-r--r--arch/all/core/include/cdefs.h1
-rw-r--r--arch/all/core/include/cdefs/attrs.h4
-rw-r--r--arch/all/core/include/cdefs/compiler.h1
-rw-r--r--arch/all/core/include/cdefs/features.h1
-rw-r--r--arch/all/core/include/cdefs/utils.h1
-rw-r--r--arch/all/core/include/complex.h1
-rw-r--r--arch/all/core/include/ctype.h1
-rw-r--r--arch/all/core/include/dirent.h1
-rw-r--r--arch/all/core/include/endian.h1
-rw-r--r--arch/all/core/include/errno.h1
-rw-r--r--arch/all/core/include/features.h1
-rw-r--r--arch/all/core/include/fenv.h1
-rw-r--r--arch/all/core/include/float.h1
-rw-r--r--arch/all/core/include/inttypes.h1
-rw-r--r--arch/all/core/include/iso646.h1
-rw-r--r--arch/all/core/include/limits.h1
-rw-r--r--arch/all/core/include/locale.h1
-rw-r--r--arch/all/core/include/malloc.h1
-rw-r--r--arch/all/core/include/printf.h1
-rw-r--r--arch/all/core/include/setjmp.h1
-rw-r--r--arch/all/core/include/signal.h1
-rw-r--r--arch/all/core/include/stdarg.h1
-rw-r--r--arch/all/core/include/stdatomic.h1
-rw-r--r--arch/all/core/include/stdbool.h1
-rw-r--r--arch/all/core/include/stddef.h1
-rw-r--r--arch/all/core/include/stdfix.h1
-rw-r--r--arch/all/core/include/stdint.h1
-rw-r--r--arch/all/core/include/stdio.h1
-rw-r--r--arch/all/core/include/stdio_ext.h1
-rw-r--r--arch/all/core/include/stdlib.h1
-rw-r--r--arch/all/core/include/string.h1
-rw-r--r--arch/all/core/include/time.h1
-rw-r--r--arch/all/core/include/varargs.h1
-rw-r--r--arch/all/core/roles.yml70
-rw-r--r--arch/all/core/src/stdio/open.c.draft19
-rw-r--r--arch/all/core/src/stdio/printf/register.c (renamed from arch/all/core/src/stdio/register.c)0
-rw-r--r--arch/all/cpp/include/ios17
-rw-r--r--arch/all/cpp/include/iosfwd17
-rw-r--r--arch/all/cpp/include/iostream17
-rw-r--r--arch/all/cpp/include/mystrbuf17
-rw-r--r--arch/all/cpp/include/new17
-rw-r--r--arch/all/cpp/include/streambuf17
-rw-r--r--arch/all/cpp/include/string17
-rw-r--r--arch/all/cpp/roles.yml10
-rw-r--r--arch/all/ensigdsp-sh/include/ensigdsp.h1
-rw-r--r--arch/all/ensigdsp-sh/roles.yml4
-rw-r--r--arch/all/iconv/include/iconv.h1
-rw-r--r--arch/all/iconv/roles.yml12
-rw-r--r--arch/all/math/include/math.h1
-rw-r--r--arch/all/math/include/mathf.h1
-rw-r--r--arch/all/math/info.yml2
-rw-r--r--arch/all/math/roles.yml5
-rw-r--r--arch/all/stdcocorico/copyright.yml7
-rw-r--r--arch/all/stdcocorico/include/stdcocorico.h1
-rw-r--r--arch/all/stdcocorico/roles.yml4
-rw-r--r--arch/casiowin/core-crt/README.md (renamed from arch/casiowin/fxlib-crt/README.md)4
-rw-r--r--arch/casiowin/core-crt/copyright.yml (renamed from arch/casiowin/fxlib-core/copyright.yml)0
-rw-r--r--arch/casiowin/core-crt/info.yml (renamed from arch/casiowin/fxlib-crt/info.yml)0
-rw-r--r--arch/casiowin/core-crt/roles.yml4
-rw-r--r--arch/casiowin/core-crt/src/crt0.c (renamed from arch/casiowin/fxlib-crt/src/crt0.c)0
-rw-r--r--arch/casiowin/core/README.md (renamed from arch/casiowin/fxlib-core/README.md)3
-rw-r--r--arch/casiowin/core/bits/time.h (renamed from arch/casiowin/fxlib-core/bits/time.h)0
-rw-r--r--arch/casiowin/core/copyright.yml (renamed from arch/casiowin/fxlib-crt/copyright.yml)0
-rw-r--r--arch/casiowin/core/info.yml4
-rw-r--r--arch/casiowin/core/roles.yml13
-rw-r--r--arch/casiowin/core/src/alloc/_syscalls.sx (renamed from arch/casiowin/fxlib-core/src/alloc/_syscalls.sx)0
-rw-r--r--arch/casiowin/core/src/assert/_syscalls.sx (renamed from arch/casiowin/fxlib-core/src/assert/_syscalls.sx)0
-rw-r--r--arch/casiowin/core/src/assert/assert.c (renamed from arch/casiowin/fxlib-core/src/assert/assert.c)0
-rw-r--r--arch/casiowin/core/src/core/_syscalls.sx (renamed from arch/casiowin/fxlib-core/src/core/_syscalls.sx)0
-rw-r--r--arch/casiowin/core/src/syscall.h (renamed from arch/casiowin/fxlib-core/src/syscall.h)0
-rw-r--r--arch/casiowin/easy-grayscales/include/draw.h1
-rw-r--r--arch/casiowin/easy-grayscales/include/gray.h1
-rw-r--r--arch/casiowin/easy-grayscales/roles.yml5
-rw-r--r--arch/casiowin/easy-input/include/EasyInput.h1
-rw-r--r--arch/casiowin/easy-input/roles.yml8
-rw-r--r--arch/casiowin/fxlib-core/info.yml4
-rw-r--r--arch/casiowin/fxlib/include/commbios.h1
-rw-r--r--arch/casiowin/fxlib/include/dispbios.h1
-rw-r--r--arch/casiowin/fxlib/include/filebios.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/app.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/battery.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/bcd.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/cdefs.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/clock.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/comm.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/display.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/file.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/keyboard.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/serial.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/syscall.h1
-rw-r--r--arch/casiowin/fxlib/include/fxlib/timer.h1
-rw-r--r--arch/casiowin/fxlib/include/keybios.h1
-rw-r--r--arch/casiowin/fxlib/include/timer.h1
-rw-r--r--arch/casiowin/fxlib/roles.yml41
-rw-r--r--arch/casiowin/info.yml5
-rw-r--r--arch/casiowin/libfxsys/include/app.h1
-rw-r--r--arch/casiowin/libfxsys/include/asm.h1
-rw-r--r--arch/casiowin/libfxsys/include/disp.h1
-rw-r--r--arch/casiowin/libfxsys/include/file.h1
-rw-r--r--arch/casiowin/libfxsys/include/key.h1
-rw-r--r--arch/casiowin/libfxsys/include/keycodes.h1
-rw-r--r--arch/casiowin/libfxsys/include/official.h1
-rw-r--r--arch/casiowin/libfxsys/include/print.h1
-rw-r--r--arch/casiowin/libfxsys/include/rtc.h1
-rw-r--r--arch/casiowin/libfxsys/include/syscall.h1
-rw-r--r--arch/casiowin/libfxsys/roles.yml13
-rw-r--r--arch/casiowin/monochromelib/include/MonochromeLib.h1
-rw-r--r--arch/casiowin/monochromelib/include/monochrome.h1
-rw-r--r--arch/casiowin/monochromelib/roles.yml47
-rw-r--r--arch/casiowin/revolutionfx/include/revolution.h1
-rw-r--r--arch/casiowin/revolutionfx/roles.yml4
-rw-r--r--copyright.yml12
-rwxr-xr-xtools/Internals/copyright.py2
-rwxr-xr-xtools/Internals/exceptions.py40
-rw-r--r--tools/Internals/locales/en_US.yml2
-rw-r--r--tools/Internals/locales/fr_FR.yml2
-rwxr-xr-xtools/Internals/module.py422
-rwxr-xr-xtools/Internals/tools/__init__.py12
-rwxr-xr-xtools/Internals/tools/gnu_gcc.py8
-rwxr-xr-xtools/Internals/tools/utils/bfd.py38
-rwxr-xr-xtools/configure.py17
-rwxr-xr-xtools/getcopyright.py6
-rwxr-xr-xtools/update_license.py132
143 files changed, 834 insertions, 444 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index dfe7147..e83ebf1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -42,7 +42,8 @@ Each module will have a few files and folders ("opt." stands for "optional",
- `bits/` (opt.): the C/C++ header bits folder;
- `src/` (opt.): the C/C++/ASM source files;
- `info.yml` (man.): machine-readable information file discussed above;
-- `copyright.yml` (rec.): machine-readable copyright information file.
+- `copyright.yml` (rec.): machine-readable copyright information file;
+- `roles.yml` (rec.): machine-readable roles for your source files.
Other files (usually documentation) can of course be put there.
@@ -54,6 +55,15 @@ improved for everyone's comfort, please contact the current maintainer(s),
as they have authority. And please, if it is denied, don't make a scene out
of it: fork this project, and do a better job at maintaining it.
+## Roles file (top-level comments)
+The top-level comment of each source/include file is **NOT** hand-written,
+it is generated by a script which reads the copyright lines and the licences
+from the machine-readable copyright information files `copyright.yml`,
+and the short description of each file from the roles files `roles.yml`
+present in each module root.
+
+See the section about roles files in `FORMATS.md`.
+
## C/C++ headers and header bits
libcarrot uses a C superpreprocessor, which role is to:
@@ -87,9 +97,6 @@ defined and what they are expected to define, the modules using this
instruction should have a `BITS.md` documentation at their root (e.g.
in `arch/all/core/`).
-TODO: explain the header's top comment, fields and stuff? Make a `headers.yml`
-file?
-
## C/C++/ASM source files
Sources are found automatically in the `src` folder, using their extensions
(`c` for C source files, `cpp`, `cc`, `cxx` and others for C++ source files,
diff --git a/FORMATS.md b/FORMATS.md
index 40b3afb..96b1559 100644
--- a/FORMATS.md
+++ b/FORMATS.md
@@ -170,3 +170,24 @@ save. An example user configuration is:
pack: GNU/AR
pack_params:
path: /opt/fx/bin/sh3eb-elf-ar
+
+## Roles file
+What a roles file is for is explained in `CONTRIBUTING.md`.
+It is organized in the same way of any arborescence, e.g.:
+
+ %YAML 1.2
+ ---
+ bits:
+ stdio.h: I/O extensions for some platform.
+ stdlib.h: Standard library extensions for some platform.
+ include:
+ subfolder:
+ subsub:
+ something.h: Defines how wonderful my tie is.
+ noextension: Some file without any extension, and that's fine.
+ wow.hpp: Wow, a C++ header!
+ src:
+ stdpyramid:
+ open.c: Open a pyramid project.
+ build.c: Build a pyramid.
+ thing.c: make_a_thing();
diff --git a/arch/all/compiler-gcc/roles.yml b/arch/all/compiler-gcc/roles.yml
new file mode 100644
index 0000000..101b7c1
--- /dev/null
+++ b/arch/all/compiler-gcc/roles.yml
@@ -0,0 +1,12 @@
+bits:
+ types:
+ exact.h: Exact-width integer types for GCC.
+ fast.h: Fastest-width integer types for GCC.
+ least.h: Least-width integer types for GCC.
+ max.h: Maximum width integer types for GCC.
+ primitive.h: Information about the primitive types for GCC.
+ ptr.h: Pointer type in GCC.
+ alloca.h: Static allocation for GCC.
+ compiler.h: GCC identification macros.
+ endian.h: Endianness identification for GCC.
+ stdarg.h: Variable argument list management for GCC.
diff --git a/arch/all/compiler-renesas/roles.yml b/arch/all/compiler-renesas/roles.yml
new file mode 100644
index 0000000..e7038b7
--- /dev/null
+++ b/arch/all/compiler-renesas/roles.yml
@@ -0,0 +1,12 @@
+bits:
+ types:
+ exact.h: Exact-width integer types for SHC.
+ fast.h: Fastest-width integer types for SHC.
+ least.h: Least-width integer types for SHC.
+ max.h: Maximum width integer types for SHC.
+ primitive.h: Information about the primitive types for SHC.
+ ptr.h: Pointer type in SHC.
+ float.h: Floating-point types information for SHC.
+ compiler.h: SHC identification macros.
+ endian.h: Endianness identification for SHC.
+ stdarg.h: Variable argument list management for SHC.
diff --git a/arch/all/compiler-sdcc/bits/types.h b/arch/all/compiler-sdcc/bits/types/primitive.h
index a3a06a3..3854421 100644
--- a/arch/all/compiler-sdcc/bits/types.h
+++ b/arch/all/compiler-sdcc/bits/types/primitive.h
@@ -1,6 +1,3 @@
-/* ************************************************************************* */
-/* Basic integer types */
-/* ************************************************************************* */
/* Char type. */
# define __CHAR_BIT 128
diff --git a/arch/all/compiler-sdcc/roles.yml b/arch/all/compiler-sdcc/roles.yml
new file mode 100644
index 0000000..809b408
--- /dev/null
+++ b/arch/all/compiler-sdcc/roles.yml
@@ -0,0 +1,4 @@
+bits:
+ compiler.h: SDCC identification macros.
+ endian.h: Endianness identification for SDCC.
+ stdarg.h: Variable argument list management for SDCC.
diff --git a/arch/all/compiler-turbo/bits/types.h b/arch/all/compiler-turbo/bits/types.h
deleted file mode 100644
index 001de30..0000000
--- a/arch/all/compiler-turbo/bits/types.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* TODO */
-# error "This file is to write."
diff --git a/arch/all/compiler-turbo/roles.yml b/arch/all/compiler-turbo/roles.yml
new file mode 100644
index 0000000..0cb49de
--- /dev/null
+++ b/arch/all/compiler-turbo/roles.yml
@@ -0,0 +1,4 @@
+bits:
+ compiler.h: Turbo C identification macros.
+ endian.h: Endianness identification for Turbo C.
+ stdarg.h: Variable argument list management for Turbo C.
diff --git a/arch/all/compiler-xlc/roles.yml b/arch/all/compiler-xlc/roles.yml
new file mode 100644
index 0000000..035ded2
--- /dev/null
+++ b/arch/all/compiler-xlc/roles.yml
@@ -0,0 +1,5 @@
+bits:
+ types:
+ primitive.h: Information about the primitive types for XLC.
+ compiler.h: XLC identification macros.
+ endian.h: Endianness identification for XLC.
diff --git a/arch/all/core-sh/include/builtin.h b/arch/all/core-sh/include/builtin.h
index 3885364..e1f047e 100644
--- a/arch/all/core-sh/include/builtin.h
+++ b/arch/all/core-sh/include/builtin.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Built-in utilities in Renesas' compiler.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdint.h>
diff --git a/arch/all/core-sh/include/fixed.h b/arch/all/core-sh/include/fixed.h
index 7cc81ed..ff390b5 100644
--- a/arch/all/core-sh/include/fixed.h
+++ b/arch/all/core-sh/include/fixed.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Fixed utilities for Renesas' SHC compiler.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core-sh/include/machine.h b/arch/all/core-sh/include/machine.h
index 28e9c52..c957123 100644
--- a/arch/all/core-sh/include/machine.h
+++ b/arch/all/core-sh/include/machine.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* SuperH assembly-related utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* Include the subheaders. */
# include <smachine.h>
diff --git a/arch/all/core-sh/include/smachine.h b/arch/all/core-sh/include/smachine.h
index a74946f..1153e25 100644
--- a/arch/all/core-sh/include/smachine.h
+++ b/arch/all/core-sh/include/smachine.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* SuperH assembly-related utilities, superuser mode.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdint.h>
diff --git a/arch/all/core-sh/include/umachine.h b/arch/all/core-sh/include/umachine.h
index 4584f3c..cda5fe0 100644
--- a/arch/all/core-sh/include/umachine.h
+++ b/arch/all/core-sh/include/umachine.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* SuperH assembly-related utilities, user mode.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdint.h>
diff --git a/arch/all/core-sh/roles.yml b/arch/all/core-sh/roles.yml
new file mode 100644
index 0000000..5cc3fa3
--- /dev/null
+++ b/arch/all/core-sh/roles.yml
@@ -0,0 +1,11 @@
+%YAML 1.2
+---
+bits:
+ byteswap.h: Optimized byteswapping utilities for SuperH.
+ setjmp.h: Non-local jump buffer type.
+include:
+ builtin.h: Built-ins for SHC.
+ fixed.h: Fixed-point numbers, Renesas' way.
+ machine.h: SuperH intrinsics.
+ smachine.h: SuperH intrinsics, privileged mode.
+ umachine.h: SuperH intrinsics, user mode.
diff --git a/arch/all/core/copyright.yml b/arch/all/core/copyright.yml
index b9cb33b..659c51d 100644
--- a/arch/all/core/copyright.yml
+++ b/arch/all/core/copyright.yml
@@ -4,3 +4,9 @@ files: '*'
copyright:
- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
license: LGPL-3
+---
+files: 'src/ctype/tab.c'
+copyright:
+- [1991, 2016, "Free Software Foundation, Inc", "info@fsf.org"]
+- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
+license: LGPL-3
diff --git a/arch/all/core/include/alloca.h b/arch/all/core/include/alloca.h
index cd27814..efcbd34 100644
--- a/arch/all/core/include/alloca.h
+++ b/arch/all/core/include/alloca.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Allocate memory on stack.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/assert.h b/arch/all/core/include/assert.h
index 09f4453..a0e7aa0 100644
--- a/arch/all/core/include/assert.h
+++ b/arch/all/core/include/assert.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Assertions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/byteswap.h b/arch/all/core/include/byteswap.h
index 0f611e6..9a94970 100644
--- a/arch/all/core/include/byteswap.h
+++ b/arch/all/core/include/byteswap.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Byte swapping utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdint.h>
diff --git a/arch/all/core/include/cdefs.h b/arch/all/core/include/cdefs.h
index 418d25b..b2c5d78 100644
--- a/arch/all/core/include/cdefs.h
+++ b/arch/all/core/include/cdefs.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* C definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* Identification macros for libcarrot.
* - `__LIBCARROT__` is defined and equal to 1 if the current libc
diff --git a/arch/all/core/include/cdefs/attrs.h b/arch/all/core/include/cdefs/attrs.h
index 53bc450..830eecd 100644
--- a/arch/all/core/include/cdefs/attrs.h
+++ b/arch/all/core/include/cdefs/attrs.h
@@ -1,7 +1,3 @@
-/* ****************************************************************************
- * C Compiler helpers.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- * ************************************************************************* */
#ifndef _CDEFS_H
# error "This file should be included by `cdefs.h`!"
#endif
diff --git a/arch/all/core/include/cdefs/compiler.h b/arch/all/core/include/cdefs/compiler.h
index 43409c2..4e6e743 100644
--- a/arch/all/core/include/cdefs/compiler.h
+++ b/arch/all/core/include/cdefs/compiler.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Compiler description.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#ifndef _CDEFS_H
# error "This file should be included by `cdefs.h`!"
diff --git a/arch/all/core/include/cdefs/features.h b/arch/all/core/include/cdefs/features.h
index 103c963..add5d3f 100644
--- a/arch/all/core/include/cdefs/features.h
+++ b/arch/all/core/include/cdefs/features.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Compiler features.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#ifndef _CDEFS_H
# error "This file should be included by `cdefs.h`!"
diff --git a/arch/all/core/include/cdefs/utils.h b/arch/all/core/include/cdefs/utils.h
index ebfd93d..36aa516 100644
--- a/arch/all/core/include/cdefs/utils.h
+++ b/arch/all/core/include/cdefs/utils.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* C utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#ifndef _CDEFS_H
# error "This file should be included by `cdefs.h`!"
diff --git a/arch/all/core/include/complex.h b/arch/all/core/include/complex.h
index 938cc3f..5aa05e1 100644
--- a/arch/all/core/include/complex.h
+++ b/arch/all/core/include/complex.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Complex utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core/include/ctype.h b/arch/all/core/include/ctype.h
index 07222b0..75a47d7 100644
--- a/arch/all/core/include/ctype.h
+++ b/arch/all/core/include/ctype.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Character type.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_DECLS
diff --git a/arch/all/core/include/dirent.h b/arch/all/core/include/dirent.h
index 36c2602..97c4051 100644
--- a/arch/all/core/include/dirent.h
+++ b/arch/all/core/include/dirent.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Directory listing.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_DECLS
diff --git a/arch/all/core/include/endian.h b/arch/all/core/include/endian.h
index a96a337..46c114e 100644
--- a/arch/all/core/include/endian.h
+++ b/arch/all/core/include/endian.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Endian conversion utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <byteswap.h>
diff --git a/arch/all/core/include/errno.h b/arch/all/core/include/errno.h
index 372198c..82a2816 100644
--- a/arch/all/core/include/errno.h
+++ b/arch/all/core/include/errno.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* libc error codes.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_DECLS
diff --git a/arch/all/core/include/features.h b/arch/all/core/include/features.h
index 207b748..6d205ae 100644
--- a/arch/all/core/include/features.h
+++ b/arch/all/core/include/features.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* C features.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* This file turns the feature macros, defined by the compiler or by the
* user, into internal macros used by the library, in order to set the
diff --git a/arch/all/core/include/fenv.h b/arch/all/core/include/fenv.h
index 8089a8d..5a58eba 100644
--- a/arch/all/core/include/fenv.h
+++ b/arch/all/core/include/fenv.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* Floating environment.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* TODO */
diff --git a/arch/all/core/include/float.h b/arch/all/core/include/float.h
index e844dc3..2f59027 100644
--- a/arch/all/core/include/float.h
+++ b/arch/all/core/include/float.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Floating constants.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include_bits <types.h>
diff --git a/arch/all/core/include/inttypes.h b/arch/all/core/include/inttypes.h
index 1055f53..2f8f964 100644
--- a/arch/all/core/include/inttypes.h
+++ b/arch/all/core/include/inttypes.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Things using types from `stdint.h`.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/iso646.h b/arch/all/core/include/iso646.h
index 5109979..9136fe4 100644
--- a/arch/all/core/include/iso646.h
+++ b/arch/all/core/include/iso646.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* English words.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core/include/limits.h b/arch/all/core/include/limits.h
index 8d48002..e910118 100644
--- a/arch/all/core/include/limits.h
+++ b/arch/all/core/include/limits.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Integer limits.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/locale.h b/arch/all/core/include/locale.h
index 4f07e88..18d629a 100644
--- a/arch/all/core/include/locale.h
+++ b/arch/all/core/include/locale.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Locales.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/malloc.h b/arch/all/core/include/malloc.h
index 1ef65ae..3ab5991 100644
--- a/arch/all/core/include/malloc.h
+++ b/arch/all/core/include/malloc.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Dynamic memory allocation.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <alloca.h>
diff --git a/arch/all/core/include/printf.h b/arch/all/core/include/printf.h
index 05fa69d..0bcd64c 100644
--- a/arch/all/core/include/printf.h
+++ b/arch/all/core/include/printf.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* printf-related utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdio.h>
diff --git a/arch/all/core/include/setjmp.h b/arch/all/core/include/setjmp.h
index 78d92a9..a66850b 100644
--- a/arch/all/core/include/setjmp.h
+++ b/arch/all/core/include/setjmp.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Non-local jumps.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_DECLS
diff --git a/arch/all/core/include/signal.h b/arch/all/core/include/signal.h
index 700c79b..f98efdb 100644
--- a/arch/all/core/include/signal.h
+++ b/arch/all/core/include/signal.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Signals.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_NAMESPACE_STD
diff --git a/arch/all/core/include/stdarg.h b/arch/all/core/include/stdarg.h
index 9bcb6cb..852a164 100644
--- a/arch/all/core/include/stdarg.h
+++ b/arch/all/core/include/stdarg.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Variable argument lists.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#if defined(_VARARGS_H)
diff --git a/arch/all/core/include/stdatomic.h b/arch/all/core/include/stdatomic.h
index f14bfb6..163dd96 100644
--- a/arch/all/core/include/stdatomic.h
+++ b/arch/all/core/include/stdatomic.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Atomic integer types.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core/include/stdbool.h b/arch/all/core/include/stdbool.h
index 2665817..a4cd04f 100644
--- a/arch/all/core/include/stdbool.h
+++ b/arch/all/core/include/stdbool.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Booleans.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#if !__USE_CXX98
diff --git a/arch/all/core/include/stddef.h b/arch/all/core/include/stddef.h
index e4c61c0..81d0e0b 100644
--- a/arch/all/core/include/stddef.h
+++ b/arch/all/core/include/stddef.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Standard definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
__BEGIN_NAMESPACE_STD
diff --git a/arch/all/core/include/stdfix.h b/arch/all/core/include/stdfix.h
index b5a62e8..d35acb9 100644
--- a/arch/all/core/include/stdfix.h
+++ b/arch/all/core/include/stdfix.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Standard fix integers.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core/include/stdint.h b/arch/all/core/include/stdint.h
index 4cee9b1..edc1d54 100644
--- a/arch/all/core/include/stdint.h
+++ b/arch/all/core/include/stdint.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Standard integer types.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/stdio.h b/arch/all/core/include/stdio.h
index 3bd391c..f7912e3 100644
--- a/arch/all/core/include/stdio.h
+++ b/arch/all/core/include/stdio.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Standard I/O.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/stdio_ext.h b/arch/all/core/include/stdio_ext.h
index 47a2177..6583f87 100644
--- a/arch/all/core/include/stdio_ext.h
+++ b/arch/all/core/include/stdio_ext.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Extended standard I/O utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdio.h>
diff --git a/arch/all/core/include/stdlib.h b/arch/all/core/include/stdlib.h
index 6c8ec81..4e55162 100644
--- a/arch/all/core/include/stdlib.h
+++ b/arch/all/core/include/stdlib.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Standard library utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/string.h b/arch/all/core/include/string.h
index e02cb84..a5f3356 100644
--- a/arch/all/core/include/string.h
+++ b/arch/all/core/include/string.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* String utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/time.h b/arch/all/core/include/time.h
index d1ab0ec..07a6f4c 100644
--- a/arch/all/core/include/time.h
+++ b/arch/all/core/include/time.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Time utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/core/include/varargs.h b/arch/all/core/include/varargs.h
index ee98f25..b03c7e5 100644
--- a/arch/all/core/include/varargs.h
+++ b/arch/all/core/include/varargs.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Old variable argument lists.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/all/core/roles.yml b/arch/all/core/roles.yml
new file mode 100644
index 0000000..525e368
--- /dev/null
+++ b/arch/all/core/roles.yml
@@ -0,0 +1,70 @@
+%YAML 1.2
+---
+include:
+ cdefs:
+ attrs.h: C Compiler helpers.
+ compiler.h: Compiler description.
+ features.h: Compiler features.
+ utils.h: C utilities.
+ alloca.h: Allocate memory on stack.
+ assert.h: Assertions.
+ byteswap.h: Byte swapping utilities.
+ cdefs.h: C definitions.
+ complex.h: Complex utilities.
+ ctype.h: Character type.
+ dirent.h: Directory listing.
+ endian.h: Endian conversion utilities.
+ errno.h: libc error codes.
+ features.h: C features.
+ fenv.h: Floating environment.
+ float.h: Floating constants.
+ inttypes.h: Things using types from `stdint.h`.
+ iso646.h: English words.
+ limits.h: Integer limits.
+ locale.h: Locales.
+ malloc.h: Dynamic memory allocation.
+ printf.h: printf-related utilities.
+ setjmp.h: Non-local jumps.
+ signal.h: Signals.
+ stdarg.h: Variable argument lists.
+ stdatomic.h: Atomic integer types.
+ stdbool.h: Booleans.
+ stddef.h: Standard definitions.
+ stdfix.h: Standard fix integers.
+ stdint.h: Standard integer types.
+ stdio.h: Standard I/O.
+ stdio_ext.h: Extended standard I/O utilities.
+ stdlib.h: Standard library utilities.
+ string.h: String utilities.
+ time.h: Time utilities.
+ varargs.h: Old variable argument lists.
+src:
+ ctype:
+ funcs.c: Character utilities.
+ tab.c: ASCII locale table for character identification.
+ stdio:
+ printf:
+ default.c: Default printf callbacks.
+ fprintf.c: Print formatted in a stream.
+ prinf.h: Internal header for printf-related utilities.
+ register.c: Manage printf callbacks.
+ sprintf.c: String front-end to [v]s[n]printf.
+ vfprintf.c: The core of all.
+ read.c: Read from a stream.
+ seek.c: Seek on a stream.
+ stdio.h: Internal header for standard I/O utilities.
+ stdout.c: Standard output and error streams definition.
+ write.c: Write to a stream.
+ stdlib:
+ div.c: Division utilities.
+ rand.c: Basic random utilities.
+ wchar.c: Wide char-related utilities.
+ string:
+ memchr.c: Look for a character in a memory area.
+ memcpy.c: Copy the content of a memory area into another.
+ memset.c: Initialize the content of a memory area.
+ strchr.c: Look for a character in a string.
+ strlen.c: Find out the length of a string.
+ byteswap.c: default byte swapping utilities.
+ errno.c: errno management.
+ locales.c: Localization register.
diff --git a/arch/all/core/src/stdio/open.c.draft b/arch/all/core/src/stdio/open.c.draft
index c093171..00c5389 100644
--- a/arch/all/core/src/stdio/open.c.draft
+++ b/arch/all/core/src/stdio/open.c.draft
@@ -1,21 +1,4 @@
-/* ****************************************************************************
- * stdio/open.c -- Open a stream.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
- * ************************************************************************* */
+/* Open a stream. */
#include "stdio.h"
/**
diff --git a/arch/all/core/src/stdio/register.c b/arch/all/core/src/stdio/printf/register.c
index 1b53e94..1b53e94 100644
--- a/arch/all/core/src/stdio/register.c
+++ b/arch/all/core/src/stdio/printf/register.c
diff --git a/arch/all/cpp/include/ios b/arch/all/cpp/include/ios
index 6de0178..5769ee6 100644
--- a/arch/all/cpp/include/ios
+++ b/arch/all/cpp/include/ios
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * ios -- C++ I/O stream.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ I/O stream.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_IOS_HPP) && !defined(_IOS_)
# define _IOS_HPP 1
diff --git a/arch/all/cpp/include/iosfwd b/arch/all/cpp/include/iosfwd
index fd979ef..cfcfbf4 100644
--- a/arch/all/cpp/include/iosfwd
+++ b/arch/all/cpp/include/iosfwd
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * iosfwd -- C++ I/O library forward declarations.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ I/O library forward declarations.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_IOSFWD_HPP) && !defined(_IOSFWD_)
# define _IOSFWD_HPP 1
diff --git a/arch/all/cpp/include/iostream b/arch/all/cpp/include/iostream
index 586c749..1ac56a3 100644
--- a/arch/all/cpp/include/iostream
+++ b/arch/all/cpp/include/iostream
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * iostream -- C++ I/O standard iostream object.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ I/O standard iostream object.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_IOSTREAM_)
# define _IOSTREAM_HPP 1
diff --git a/arch/all/cpp/include/mystrbuf b/arch/all/cpp/include/mystrbuf
index 8ca54b8..fc50fbf 100644
--- a/arch/all/cpp/include/mystrbuf
+++ b/arch/all/cpp/include/mystrbuf
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * mystrbuf -- C++ string buffer.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ string buffer.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_MYSTRBUF_HPP) && !defined(_MYSTRBUF_)
# define _MYSTRBUF_HPP 1
diff --git a/arch/all/cpp/include/new b/arch/all/cpp/include/new
index a037246..0d7b2ec 100644
--- a/arch/all/cpp/include/new
+++ b/arch/all/cpp/include/new
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * new -- C++ new operator.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ new operator.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_NEW_HPP) && !defined(__NEW__) \
&& !defined(_NEW_) && !defined(__NEW_H)
diff --git a/arch/all/cpp/include/streambuf b/arch/all/cpp/include/streambuf
index 76f21b1..bf5dde9 100644
--- a/arch/all/cpp/include/streambuf
+++ b/arch/all/cpp/include/streambuf
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * streambuf -- C++ stream buffer.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ stream buffer.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_STREAMBUF_HPP) && !defined(_STREAMBUF_)
# define _STREAMBUF_HPP 1
diff --git a/arch/all/cpp/include/string b/arch/all/cpp/include/string
index 49bb6c7..18fd448 100644
--- a/arch/all/cpp/include/string
+++ b/arch/all/cpp/include/string
@@ -1,20 +1,5 @@
/* ****************************************************************************
- * string -- C++ string.h wrapper.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
- *
- * This file is part of libcarrot.
- * libcarrot is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3.0 of the License,
- * or (at your option) any later version.
- *
- * libcarrot is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with the libcarrot; if not, see <http://www.gnu.org/licenses/>.
+ * C++ string.h wrapper.
* ************************************************************************* */
#if __USE_CXX98 && !defined(_STRING_HPP) && !defined(_STRING_)
# define _STRING_HPP 1
diff --git a/arch/all/cpp/roles.yml b/arch/all/cpp/roles.yml
new file mode 100644
index 0000000..66635b4
--- /dev/null
+++ b/arch/all/cpp/roles.yml
@@ -0,0 +1,10 @@
+%YAML 1.2
+---
+include:
+ ios: C++ I/O streams.
+ iosfwd: C++ I/O library forward declarations.
+ iostream: C++ I/O standard iostream object.
+ mystrbuf: C++ string buffer.
+ new: C++ new operator.
+ streambuf: C++ stream buffer.
+ string: C++ string.h wrapper.
diff --git a/arch/all/ensigdsp-sh/include/ensigdsp.h b/arch/all/ensigdsp-sh/include/ensigdsp.h
index c24cdfc..3babf1a 100644
--- a/arch/all/ensigdsp-sh/include/ensigdsp.h
+++ b/arch/all/ensigdsp-sh/include/ensigdsp.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Ensigma DSP library.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fixed.h>
__BEGIN_DECLS
diff --git a/arch/all/ensigdsp-sh/roles.yml b/arch/all/ensigdsp-sh/roles.yml
new file mode 100644
index 0000000..043ef73
--- /dev/null
+++ b/arch/all/ensigdsp-sh/roles.yml
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+include:
+ ensigdsp.h: Ensigma DSP library.
diff --git a/arch/all/iconv/include/iconv.h b/arch/all/iconv/include/iconv.h
index ba819a1..fa61464 100644
--- a/arch/all/iconv/include/iconv.h
+++ b/arch/all/iconv/include/iconv.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Generic Conversion Interface.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey
* ************************************************************************* */
#include <cdefs.h>
#include <stddef.h>
diff --git a/arch/all/iconv/roles.yml b/arch/all/iconv/roles.yml
new file mode 100644
index 0000000..948f964
--- /dev/null
+++ b/arch/all/iconv/roles.yml
@@ -0,0 +1,12 @@
+%YAML 1.2
+---
+include:
+ iconv.h: Generic Conversion Interface.
+src:
+ conv:
+ utf8_to_wchar.c: "UTF-8 to `wchar_t`."
+ wchar_to_utf8.c: "`wchar_t` to UTF-8."
+ iconv.c: Main conversion function.
+ iconv.h: iconv internals.
+ open.c: Open and close an iconv descriptor.
+ routes.c: Encoding routes.
diff --git a/arch/all/math/include/math.h b/arch/all/math/include/math.h
index 6bfcfa3..c32c002 100644
--- a/arch/all/math/include/math.h
+++ b/arch/all/math/include/math.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Math functions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <errno.h>
diff --git a/arch/all/math/include/mathf.h b/arch/all/math/include/mathf.h
index 67e3a7d..7b7e0a9 100644
--- a/arch/all/math/include/mathf.h
+++ b/arch/all/math/include/mathf.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Math functions for floats.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <errno.h>
diff --git a/arch/all/math/info.yml b/arch/all/math/info.yml
index 1b24119..6e690ba 100644
--- a/arch/all/math/info.yml
+++ b/arch/all/math/info.yml
@@ -1,5 +1,5 @@
%YAML 1.2
---
magic: potatosdk-1.0
-description: The core libc.
+description: Mathematical utilities for the libc.
out: libm
diff --git a/arch/all/math/roles.yml b/arch/all/math/roles.yml
new file mode 100644
index 0000000..8bade51
--- /dev/null
+++ b/arch/all/math/roles.yml
@@ -0,0 +1,5 @@
+%YAML 1.2
+---
+include:
+ math.h: Math functions.
+ mathf.h: Math functions for floats.
diff --git a/arch/all/stdcocorico/copyright.yml b/arch/all/stdcocorico/copyright.yml
index 618aede..93e584f 100644
--- a/arch/all/stdcocorico/copyright.yml
+++ b/arch/all/stdcocorico/copyright.yml
@@ -2,6 +2,11 @@
---
files: '*'
copyright:
-- [2014, Simon "Gee" Giraudot, gee@ptilouk.net]
+- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
+license: LGPL-3
+---
+files: 'include/stdcocorico.h'
+copyright:
+- [2014, Simon "Gee" Giraudot, contact@ptilouk.net]
- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
license: LGPL-3
diff --git a/arch/all/stdcocorico/include/stdcocorico.h b/arch/all/stdcocorico/include/stdcocorico.h
index 4be9c9f..3299313 100644
--- a/arch/all/stdcocorico/include/stdcocorico.h
+++ b/arch/all/stdcocorico/include/stdcocorico.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Cocorico! Code in french.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdlib.h>
diff --git a/arch/all/stdcocorico/roles.yml b/arch/all/stdcocorico/roles.yml
new file mode 100644
index 0000000..b4f9860
--- /dev/null
+++ b/arch/all/stdcocorico/roles.yml
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+include:
+ stdcocorico.h: Cocorico! Code in french.
diff --git a/arch/casiowin/fxlib-crt/README.md b/arch/casiowin/core-crt/README.md
index c4ce388..f03108b 100644
--- a/arch/casiowin/fxlib-crt/README.md
+++ b/arch/casiowin/core-crt/README.md
@@ -1,3 +1,3 @@
-# `casiowin/fxlib-crt` -- C runtime objects.
+# `casiowin/core-crt` -- C runtime objects.
These are the C runtime objects, such as `crt0.o`, that will be linked to the
-user programs.
+user programs for CASIOWIN.
diff --git a/arch/casiowin/fxlib-core/copyright.yml b/arch/casiowin/core-crt/copyright.yml
index b9cb33b..b9cb33b 100644
--- a/arch/casiowin/fxlib-core/copyright.yml
+++ b/arch/casiowin/core-crt/copyright.yml
diff --git a/arch/casiowin/fxlib-crt/info.yml b/arch/casiowin/core-crt/info.yml
index cbb5117..cbb5117 100644
--- a/arch/casiowin/fxlib-crt/info.yml
+++ b/arch/casiowin/core-crt/info.yml
diff --git a/arch/casiowin/core-crt/roles.yml b/arch/casiowin/core-crt/roles.yml
new file mode 100644
index 0000000..c8a6d06
--- /dev/null
+++ b/arch/casiowin/core-crt/roles.yml
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+src:
+ crt0.c: Main C runtime initialization.
diff --git a/arch/casiowin/fxlib-crt/src/crt0.c b/arch/casiowin/core-crt/src/crt0.c
index fd00ba7..fd00ba7 100644
--- a/arch/casiowin/fxlib-crt/src/crt0.c
+++ b/arch/casiowin/core-crt/src/crt0.c
diff --git a/arch/casiowin/fxlib-core/README.md b/arch/casiowin/core/README.md
index 982f3e5..3a42328 100644
--- a/arch/casiowin/fxlib-core/README.md
+++ b/arch/casiowin/core/README.md
@@ -1,3 +1,4 @@
-# `casiowin/fxlib-core` -- the adaptation of the core for the fx-9860G.
+# `casiowin/core` -- the adaptation of the core for the fx-9860G.
These are the bits and tricks that will be in libc, not fxlib.
+
See the `casiowin/fxlib` module for more details about what fxlib is.
diff --git a/arch/casiowin/fxlib-core/bits/time.h b/arch/casiowin/core/bits/time.h
index 35f441c..35f441c 100644
--- a/arch/casiowin/fxlib-core/bits/time.h
+++ b/arch/casiowin/core/bits/time.h
diff --git a/arch/casiowin/fxlib-crt/copyright.yml b/arch/casiowin/core/copyright.yml
index b9cb33b..b9cb33b 100644
--- a/arch/casiowin/fxlib-crt/copyright.yml
+++ b/arch/casiowin/core/copyright.yml
diff --git a/arch/casiowin/core/info.yml b/arch/casiowin/core/info.yml
new file mode 100644
index 0000000..c2a5d68
--- /dev/null
+++ b/arch/casiowin/core/info.yml
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+magic: potatosdk-1.0
+description: The CASIOWIN libc bits.
diff --git a/arch/casiowin/core/roles.yml b/arch/casiowin/core/roles.yml
new file mode 100644
index 0000000..d8f5224
--- /dev/null
+++ b/arch/casiowin/core/roles.yml
@@ -0,0 +1,13 @@
+%YAML 1.2
+---
+bits:
+ time.h: Standard time header internals.
+src:
+ alloc:
+ _syscalls.sx: Memory allocation related syscalls.
+ assert:
+ assert.c: Make an assertion failed pop-up.
+ _syscalls.sx: Assertion-related syscalls.
+ core:
+ _syscalls.sx: Syscalls for the C runtime initialization.
+ syscall.h: Syscall macro.
diff --git a/arch/casiowin/fxlib-core/src/alloc/_syscalls.sx b/arch/casiowin/core/src/alloc/_syscalls.sx
index 78c4c4e..78c4c4e 100644
--- a/arch/casiowin/fxlib-core/src/alloc/_syscalls.sx
+++ b/arch/casiowin/core/src/alloc/_syscalls.sx
diff --git a/arch/casiowin/fxlib-core/src/assert/_syscalls.sx b/arch/casiowin/core/src/assert/_syscalls.sx
index 9ff34d1..9ff34d1 100644
--- a/arch/casiowin/fxlib-core/src/assert/_syscalls.sx
+++ b/arch/casiowin/core/src/assert/_syscalls.sx
diff --git a/arch/casiowin/fxlib-core/src/assert/assert.c b/arch/casiowin/core/src/assert/assert.c
index 09ee165..09ee165 100644
--- a/arch/casiowin/fxlib-core/src/assert/assert.c
+++ b/arch/casiowin/core/src/assert/assert.c
diff --git a/arch/casiowin/fxlib-core/src/core/_syscalls.sx b/arch/casiowin/core/src/core/_syscalls.sx
index 0245115..0245115 100644
--- a/arch/casiowin/fxlib-core/src/core/_syscalls.sx
+++ b/arch/casiowin/core/src/core/_syscalls.sx
diff --git a/arch/casiowin/fxlib-core/src/syscall.h b/arch/casiowin/core/src/syscall.h
index 6b9d67f..6b9d67f 100644
--- a/arch/casiowin/fxlib-core/src/syscall.h
+++ b/arch/casiowin/core/src/syscall.h
diff --git a/arch/casiowin/easy-grayscales/include/draw.h b/arch/casiowin/easy-grayscales/include/draw.h
index aa5b39a..5357250 100644
--- a/arch/casiowin/easy-grayscales/include/draw.h
+++ b/arch/casiowin/easy-grayscales/include/draw.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Easy grayscale's draw utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/casiowin/easy-grayscales/include/gray.h b/arch/casiowin/easy-grayscales/include/gray.h
index d158da9..fc9696c 100644
--- a/arch/casiowin/easy-grayscales/include/gray.h
+++ b/arch/casiowin/easy-grayscales/include/gray.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Easy grayscale's gray drawing utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/casiowin/easy-grayscales/roles.yml b/arch/casiowin/easy-grayscales/roles.yml
new file mode 100644
index 0000000..80bfcd7
--- /dev/null
+++ b/arch/casiowin/easy-grayscales/roles.yml
@@ -0,0 +1,5 @@
+%YAML 1.2
+---
+include:
+ draw.h: Easy grayscale's draw utilities.
+ gray.h: Easy grayscale's gray drawing utilities.
diff --git a/arch/casiowin/easy-input/include/EasyInput.h b/arch/casiowin/easy-input/include/EasyInput.h
index cdfda4b..2862923 100644
--- a/arch/casiowin/easy-input/include/EasyInput.h
+++ b/arch/casiowin/easy-input/include/EasyInput.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* Easy input.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <fxlib.h>
diff --git a/arch/casiowin/easy-input/roles.yml b/arch/casiowin/easy-input/roles.yml
new file mode 100644
index 0000000..a3fb26d
--- /dev/null
+++ b/arch/casiowin/easy-input/roles.yml
@@ -0,0 +1,8 @@
+%YAML 1.2
+---
+include:
+ EasyInput.h: Easy input.
+src:
+ main.c: the easy input main file.
+ _syscalls.src: Easy Input syscalls for the Renesas SHC.
+ _syscalls.sx: Easy Input syscalls for GCC.
diff --git a/arch/casiowin/fxlib-core/info.yml b/arch/casiowin/fxlib-core/info.yml
deleted file mode 100644
index af64c1d..0000000
--- a/arch/casiowin/fxlib-core/info.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-%YAML 1.2
----
-magic: potatosdk-1.0
-description: The FX library libc bits.
diff --git a/arch/casiowin/fxlib/include/commbios.h b/arch/casiowin/fxlib/include/commbios.h
index f6bcac9..8ae8145 100644
--- a/arch/casiowin/fxlib/include/commbios.h
+++ b/arch/casiowin/fxlib/include/commbios.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's communication definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#if __USE_FXLIB_UNOFFICIAL
diff --git a/arch/casiowin/fxlib/include/dispbios.h b/arch/casiowin/fxlib/include/dispbios.h
index 75e4ed0..cafede2 100644
--- a/arch/casiowin/fxlib/include/dispbios.h
+++ b/arch/casiowin/fxlib/include/dispbios.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's display definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
__BEGIN_NAMESPACE_FXLIB
diff --git a/arch/casiowin/fxlib/include/filebios.h b/arch/casiowin/fxlib/include/filebios.h
index 893e0d4..9bbe1e6 100644
--- a/arch/casiowin/fxlib/include/filebios.h
+++ b/arch/casiowin/fxlib/include/filebios.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's file definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
diff --git a/arch/casiowin/fxlib/include/fxlib.h b/arch/casiowin/fxlib/include/fxlib.h
index 04ee60a..9ec8614 100644
--- a/arch/casiowin/fxlib/include/fxlib.h
+++ b/arch/casiowin/fxlib/include/fxlib.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* library for interacting with CASIO's fx calculators.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <stdlib.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/app.h b/arch/casiowin/fxlib/include/fxlib/app.h
index 5cd71b9..baebde8 100644
--- a/arch/casiowin/fxlib/include/fxlib/app.h
+++ b/arch/casiowin/fxlib/include/fxlib/app.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's app management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#if __USE_FXLIB_UNOFFICIAL
diff --git a/arch/casiowin/fxlib/include/fxlib/battery.h b/arch/casiowin/fxlib/include/fxlib/battery.h
index 7b796b6..3c54a2b 100644
--- a/arch/casiowin/fxlib/include/fxlib/battery.h
+++ b/arch/casiowin/fxlib/include/fxlib/battery.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's battery management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#if __USE_FXLIB_UNOFFICIAL
diff --git a/arch/casiowin/fxlib/include/fxlib/bcd.h b/arch/casiowin/fxlib/include/fxlib/bcd.h
index d42781a..4c45dbc 100644
--- a/arch/casiowin/fxlib/include/fxlib/bcd.h
+++ b/arch/casiowin/fxlib/include/fxlib/bcd.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's BCD numbers management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#if __USE_FXLIB_UNOFFICIAL
diff --git a/arch/casiowin/fxlib/include/fxlib/cdefs.h b/arch/casiowin/fxlib/include/fxlib/cdefs.h
index 93342ec..58824b8 100644
--- a/arch/casiowin/fxlib/include/fxlib/cdefs.h
+++ b/arch/casiowin/fxlib/include/fxlib/cdefs.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's C definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/clock.h b/arch/casiowin/fxlib/include/fxlib/clock.h
index 6a85678..f264c44 100644
--- a/arch/casiowin/fxlib/include/fxlib/clock.h
+++ b/arch/casiowin/fxlib/include/fxlib/clock.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's clock management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#if __USE_FXLIB_UNOFFICIAL
diff --git a/arch/casiowin/fxlib/include/fxlib/comm.h b/arch/casiowin/fxlib/include/fxlib/comm.h
index f28967a..b124ebb 100644
--- a/arch/casiowin/fxlib/include/fxlib/comm.h
+++ b/arch/casiowin/fxlib/include/fxlib/comm.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's communication management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <commbios.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/display.h b/arch/casiowin/fxlib/include/fxlib/display.h
index 794f5c1..7bf6a88 100644
--- a/arch/casiowin/fxlib/include/fxlib/display.h
+++ b/arch/casiowin/fxlib/include/fxlib/display.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's display management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <dispbios.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/file.h b/arch/casiowin/fxlib/include/fxlib/file.h
index c43cc6e..68285f6 100644
--- a/arch/casiowin/fxlib/include/fxlib/file.h
+++ b/arch/casiowin/fxlib/include/fxlib/file.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's file management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <filebios.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/keyboard.h b/arch/casiowin/fxlib/include/fxlib/keyboard.h
index 6c7ce51..fee390e 100644
--- a/arch/casiowin/fxlib/include/fxlib/keyboard.h
+++ b/arch/casiowin/fxlib/include/fxlib/keyboard.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's keyboard management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <keybios.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/serial.h b/arch/casiowin/fxlib/include/fxlib/serial.h
index eee22b2..66c6d5b 100644
--- a/arch/casiowin/fxlib/include/fxlib/serial.h
+++ b/arch/casiowin/fxlib/include/fxlib/serial.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's serial management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <fxlib/comm.h>
diff --git a/arch/casiowin/fxlib/include/fxlib/syscall.h b/arch/casiowin/fxlib/include/fxlib/syscall.h
index b7e0fb0..637aa76 100644
--- a/arch/casiowin/fxlib/include/fxlib/syscall.h
+++ b/arch/casiowin/fxlib/include/fxlib/syscall.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's syscall definition for ASM-C.
- * Copyright (c) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* Make a syscall. */
diff --git a/arch/casiowin/fxlib/include/fxlib/timer.h b/arch/casiowin/fxlib/include/fxlib/timer.h
index 2eb1057..8fdb9ff 100644
--- a/arch/casiowin/fxlib/include/fxlib/timer.h
+++ b/arch/casiowin/fxlib/include/fxlib/timer.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's timer management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
#include <timer.h>
diff --git a/arch/casiowin/fxlib/include/keybios.h b/arch/casiowin/fxlib/include/keybios.h
index 74a6097..a4c0167 100644
--- a/arch/casiowin/fxlib/include/keybios.h
+++ b/arch/casiowin/fxlib/include/keybios.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's keyboard definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
__BEGIN_NAMESPACE_FXLIB
diff --git a/arch/casiowin/fxlib/include/timer.h b/arch/casiowin/fxlib/include/timer.h
index 9105d56..2b66d22 100644
--- a/arch/casiowin/fxlib/include/timer.h
+++ b/arch/casiowin/fxlib/include/timer.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* fxlib's timer definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/cdefs.h>
__BEGIN_NAMESPACE_FXLIB
diff --git a/arch/casiowin/fxlib/roles.yml b/arch/casiowin/fxlib/roles.yml
new file mode 100644
index 0000000..a007fd8
--- /dev/null
+++ b/arch/casiowin/fxlib/roles.yml
@@ -0,0 +1,41 @@
+%YAML 1.2
+---
+include:
+ fxlib:
+ app.h: fxlib's app management.
+ battery.h: fxlib's battery management.
+ bcd.h: fxlib's BCD numbers management.
+ cdefs.h: fxlib's C definitions.
+ clock.h: fxlib's clock management.
+ comm.h: fxlib's communication management.
+ display.h: fxlib's display management.
+ file.h: fxlib's file management.
+ keyboard.h: fxlib's keyboard management.
+ serial.h: fxlib's serial management.
+ syscall.h: fxlib's syscall definition for ASM-C.
+ timer.h: fxlib's timer management.
+ commbios.h: fxlib's communication definitions.
+ dispbios.h: fxlib's display definitions.
+ filebios.h: fxlib's file definitions.
+ fxlib.h: library for interacting with CASIO's fx calculators.
+ keybios.h: fxlib's keyboard definitions.
+ timer.h: fxlib's timer definitions.
+src:
+ comm:
+ comm.sx: General communication-related syscalls.
+ serial.sx: Serial communication-related syscalls.
+ dirent:
+ dirent.h: dirent internals.
+ error.c: Standard error number from file-specific error.
+ open.c: Open a directory stream.
+ display:
+ syscalls.sx: Display-related syscalls.
+ file:
+ sdk.c: File related functions.
+ syscalls.sx: File related syscalls.
+ keyboard:
+ syscalls.sx: Main keyboard syscalls.
+ timer:
+ sdk.c: fxlib-compatible timer functions.
+ syscalls.sx: Timer-related syscalls.
+ syscall.h: Syscall macro for ASM-C files.
diff --git a/arch/casiowin/info.yml b/arch/casiowin/info.yml
index 3416f70..db5a438 100644
--- a/arch/casiowin/info.yml
+++ b/arch/casiowin/info.yml
@@ -9,6 +9,5 @@ arch:
- sh4a
default:
c:
- - casiowin/fxlib
- - casiowin/fxlib-core
- - casiowin/fxlib-crt
+ - casiowin/core
+ - casiowin/core-crt
diff --git a/arch/casiowin/libfxsys/include/app.h b/arch/casiowin/libfxsys/include/app.h
index 253f02e..7e0539e 100644
--- a/arch/casiowin/libfxsys/include/app.h
+++ b/arch/casiowin/libfxsys/include/app.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' app management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fxlib/app.h>
diff --git a/arch/casiowin/libfxsys/include/asm.h b/arch/casiowin/libfxsys/include/asm.h
index 4c2bebb..fc27ab7 100644
--- a/arch/casiowin/libfxsys/include/asm.h
+++ b/arch/casiowin/libfxsys/include/asm.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* libfxsys' assembly utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* Make the syscall entry */
diff --git a/arch/casiowin/libfxsys/include/disp.h b/arch/casiowin/libfxsys/include/disp.h
index d6d03c2..c773d88 100644
--- a/arch/casiowin/libfxsys/include/disp.h
+++ b/arch/casiowin/libfxsys/include/disp.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' display management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fx/display.h>
diff --git a/arch/casiowin/libfxsys/include/file.h b/arch/casiowin/libfxsys/include/file.h
index 37cd6e7..89d4331 100644
--- a/arch/casiowin/libfxsys/include/file.h
+++ b/arch/casiowin/libfxsys/include/file.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' file management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fx/file.h>
diff --git a/arch/casiowin/libfxsys/include/key.h b/arch/casiowin/libfxsys/include/key.h
index 51c18a1..f9a7006 100644
--- a/arch/casiowin/libfxsys/include/key.h
+++ b/arch/casiowin/libfxsys/include/key.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' keyboard management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fx/keyboard.h>
diff --git a/arch/casiowin/libfxsys/include/keycodes.h b/arch/casiowin/libfxsys/include/keycodes.h
index 18fbb2d..7f5c08a 100644
--- a/arch/casiowin/libfxsys/include/keycodes.h
+++ b/arch/casiowin/libfxsys/include/keycodes.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' keyboard definitions.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <keybios.h>
diff --git a/arch/casiowin/libfxsys/include/official.h b/arch/casiowin/libfxsys/include/official.h
index aa43daf..58f1eb1 100644
--- a/arch/casiowin/libfxsys/include/official.h
+++ b/arch/casiowin/libfxsys/include/official.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* libfxsys' official calls.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
/* Technically, this macro is supposed to tell the headers we include not
* to define any non-official system call/interaction, but you know...
diff --git a/arch/casiowin/libfxsys/include/print.h b/arch/casiowin/libfxsys/include/print.h
index b035625..c44aa2d 100644
--- a/arch/casiowin/libfxsys/include/print.h
+++ b/arch/casiowin/libfxsys/include/print.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' character display management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fx/display.h>
diff --git a/arch/casiowin/libfxsys/include/rtc.h b/arch/casiowin/libfxsys/include/rtc.h
index f84a1db..76fc59b 100644
--- a/arch/casiowin/libfxsys/include/rtc.h
+++ b/arch/casiowin/libfxsys/include/rtc.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' clock management.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <fx/clock.h>
diff --git a/arch/casiowin/libfxsys/include/syscall.h b/arch/casiowin/libfxsys/include/syscall.h
index 542ab8c..13b726f 100644
--- a/arch/casiowin/libfxsys/include/syscall.h
+++ b/arch/casiowin/libfxsys/include/syscall.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* libfxsys' assembly utilities.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <asm.h>
diff --git a/arch/casiowin/libfxsys/roles.yml b/arch/casiowin/libfxsys/roles.yml
new file mode 100644
index 0000000..ba5a4b8
--- /dev/null
+++ b/arch/casiowin/libfxsys/roles.yml
@@ -0,0 +1,13 @@
+%YAML 1.2
+---
+include:
+ app.h: libfxsys' app management.
+ asm.h: libfxsys' assembly utilities.
+ disp.h: libfxsys' display management.
+ file.h: libfxsys' file management.
+ key.h: libfxsys' keyboard management.
+ keycodes.h: libfxsys' keyboard definitions.
+ official.h: libfxsys' official calls.
+ print.h: libfxsys' character display management.
+ rtc.h: libfxsys' clock management.
+ syscall.h: libfxsys' assembly utilities.
diff --git a/arch/casiowin/monochromelib/include/MonochromeLib.h b/arch/casiowin/monochromelib/include/MonochromeLib.h
index 390787f..8bd65d7 100644
--- a/arch/casiowin/monochromelib/include/MonochromeLib.h
+++ b/arch/casiowin/monochromelib/include/MonochromeLib.h
@@ -1,5 +1,4 @@
/* ****************************************************************************
* MonochromeLib's main header alias.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <monochrome.h>
diff --git a/arch/casiowin/monochromelib/include/monochrome.h b/arch/casiowin/monochromelib/include/monochrome.h
index cd70a08..9f27e90 100644
--- a/arch/casiowin/monochromelib/include/monochrome.h
+++ b/arch/casiowin/monochromelib/include/monochrome.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* MonochromeLib's main header.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <stdlib.h>
diff --git a/arch/casiowin/monochromelib/roles.yml b/arch/casiowin/monochromelib/roles.yml
new file mode 100644
index 0000000..2940ea3
--- /dev/null
+++ b/arch/casiowin/monochromelib/roles.yml
@@ -0,0 +1,47 @@
+%YAML 1.2
+---
+include:
+ monochrome.h: MonochromeLib's main header.
+ MonochromeLib.h: MonochromeLib's main header alias.
+src:
+ bmp_8_and.c: Display a 8x8 BMP, using ANDs.
+ bmp_8_and_cl.c: Display a 8x8 BMP, using ANDs and clipping.
+ bmp_8_or.c: Display a 8x8 BMP, using ORs.
+ bmp_8_or_cl.c: Display a 8x8 BMP, using ORs and clipping.
+ bmp_8_xor.c: Display a 8x8 BMP, using XORs.
+ bmp_8_xor_cl.c: Display a 8x8 BMP, using XORs and clipping.
+ bmp_16_and.c: Display a 16x16 BMP, using ANDs.
+ bmp_16_and_cl.c: Display a 16x16 BMP, using ANDs and clipping.
+ bmp_16_or.c: Display a 16x16 BMP, using ORs.
+ bmp_16_or_cl.c: Display a 16x16 BMP, using ORs and clipping.
+ bmp_16_xor.c: Display a 16x16 BMP, using XORs.
+ bmp_16_xor_cl.c: Display a 16x16 BMP, using XORs and clipping.
+ bmp_and.c: Display a BMP, using ANDs.
+ bmp_and_cl.c: Display a BMP, using ANDs and clipping.
+ bmp_or.c: Display a BMP, using ORs.
+ bmp_or_cl.c: Display a BMP, using ORs and clipping.
+ bmp_xor.c: Display a BMP, using XORs.
+ bmp_xor_cl.c: Display a BMP, using XORs and clipping.
+ circle.c: Draw a circle.
+ clear_screen.c: Clear the screen.
+ clear_vram.c: Clear the VRAM.
+ display_vram.c: Update the screen content.
+ ellipse.c: Draw an ellipse.
+ ellipse_in_rect.c: Draw an ellipse in a rectangle.
+ filled_circle.c: Draw a filled circle.
+ filled_ellipse.c: Draw a filled ellipse.
+ filled_ellipse_in_rect.c: Draw a filled ellipse in a rectangle.
+ filled_polygon.c: Draw a filled polygon.
+ get_contrast.c: Get the screen contrast.
+ horizontal_line.c: Draw a horizontal line.
+ horizontal_scroll.c: Scroll the screen horizontally.
+ line.c: Draw a line.
+ pixel.c: Draw a pixel.
+ pixel_test.c: Get a pixel's value.
+ point.c: Draw a dot.
+ polygon.c: Draw a polygon.
+ rectangle.c: Draw a rectangle.
+ set_contrast.c: Set the screen contrast.
+ vertical_line.c: Draw a vertical line.
+ vertical_scroll.c: Draw a vertical scroll.
+ vram_adress.c: Get the VRAM address.
diff --git a/arch/casiowin/revolutionfx/include/revolution.h b/arch/casiowin/revolutionfx/include/revolution.h
index bf576b6..e53a1d0 100644
--- a/arch/casiowin/revolutionfx/include/revolution.h
+++ b/arch/casiowin/revolutionfx/include/revolution.h
@@ -1,6 +1,5 @@
/* ****************************************************************************
* RevolutionFX's main header.
- * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
#include <fx/display.h>
diff --git a/arch/casiowin/revolutionfx/roles.yml b/arch/casiowin/revolutionfx/roles.yml
new file mode 100644
index 0000000..77e0ff9
--- /dev/null
+++ b/arch/casiowin/revolutionfx/roles.yml
@@ -0,0 +1,4 @@
+%YAML 1.2
+---
+include:
+ revolution.h: RevolutionFX's main header.
diff --git a/copyright.yml b/copyright.yml
index 1ce09aa..71ba978 100644
--- a/copyright.yml
+++ b/copyright.yml
@@ -1,15 +1,15 @@
%YAML 1.2
---
files:
+- 'configure'
+- 'configure.bat'
+- 'copyright.yml'
+- 'make.bat'
+- 'Makefile'
+- 'arch'
- 'tools/*.py'
- 'tools/**/*.py'
- 'tools/Internals/locales/*.yml'
copyright:
- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
license: LGPL-3
----
-files:
-- 'arch/info.yml'
-- 'arch/*/*'
-copyright:
-- [2017, Thomas "Cakeisalie5" Touhey, thomas@touhey.fr]
diff --git a/tools/Internals/copyright.py b/tools/Internals/copyright.py
index f724dc7..685a241 100755
--- a/tools/Internals/copyright.py
+++ b/tools/Internals/copyright.py
@@ -104,6 +104,8 @@ def get_copyright(rules, path):
if not os.path.isfile(path):
raise NotAFileException
+ if os.path.basename(path) == 'copyright.yml':
+ raise IgnoredFileException
match = None
diff --git a/tools/Internals/exceptions.py b/tools/Internals/exceptions.py
index fb201dc..1a9ae98 100755
--- a/tools/Internals/exceptions.py
+++ b/tools/Internals/exceptions.py
@@ -84,6 +84,10 @@ class SilentException(PotatoException):
def __init__(self):
super(SilentException, self).__init__("")
+# ---
+# Check that the user configuration options are supported.
+# ---
+
class UnsupportedLanguageException(PotatoException):
""" One of the given languages were unsupported. """
@@ -98,6 +102,11 @@ class UnsupportedArchException(PotatoException):
ags = ('arch',)
msg = loc['exceptions']['UnsupportedArch']
+# ---
+# An information file was updated after the user configuration,
+# which means the user should reconfigure!
+# ---
+
class UpdatedModuleException(PotatoException):
""" The configuration of a module has been updated since the
last user configuration. """
@@ -121,6 +130,10 @@ class UpdatedGlobalException(PotatoException):
ret = 2
msg = loc['exceptions']['UpdatedGlobal']
+# ---
+# Dependency problems.
+# ---
+
class UnresolvedDependencyException(PotatoException):
""" A module dependency could not be resolved. """
@@ -131,6 +144,10 @@ class UnresolvedDependencyException(PotatoException):
def prepare(self, dependency, from_modules):
return (dependency, "', '".join(from_modules))
+# ---
+# Command exceptions for utilities.
+# ---
+
class InvalidCommandException(PotatoException):
""" The given command was unknown. """
@@ -138,6 +155,10 @@ class InvalidCommandException(PotatoException):
ags = ('command',)
msg = loc['exceptions']['InvalidCommand']
+# ---
+# Unsupported architectures or compilers.
+# ---
+
class UnsupportedArchForPlatformException(PotatoException):
""" A platform doesn't support an architecture. """
@@ -156,6 +177,17 @@ class UnsupportedCompilerForModuleException(PotatoWarning):
ags = ('module', 'compiler', 'compiler_maker')
msg = loc['exceptions']['UnsupportedCompilerForModule']
+# ---
+# Could not load global, a platform or module.
+# ---
+
+class GlobalNotFoundException(PotatoException):
+ """ The global source directory was invalid. """
+
+ ret = 2
+ ags = ('global',)
+ msg = loc['exceptions']['GlobalNotFound']
+
class PlatformNotFoundException(PotatoException):
""" The given platform was unsupported. """
@@ -170,6 +202,10 @@ class ModuleNotFoundException(PotatoException):
ags = ('module',)
msg = loc['exceptions']['ModuleNotFound']
+# ---
+# Utilities could not be found.
+# ---
+
class NoCCompilerException(PotatoException):
""" No appropriate C compiler was found. """
@@ -200,6 +236,10 @@ class NoPackerException(PotatoException):
ret = 2
msg = loc['exceptions']['NoPacker']
+# ---
+# Copyright definition problems.
+# ---
+
class NoCopyrightException(PotatoException):
""" No copyright was found for this file. """
diff --git a/tools/Internals/locales/en_US.yml b/tools/Internals/locales/en_US.yml
index 2bd2f7c..bcef4ca 100644
--- a/tools/Internals/locales/en_US.yml
+++ b/tools/Internals/locales/en_US.yml
@@ -46,6 +46,8 @@ exceptions:
UnsupportedCompilerForModule: >-
'{module}' additional module doesn't support
'{compiler}' compiler from '{compiler_maker}'!
+ GlobalNotFound: >-
+ Source folder '{global}' doesn't exist or is invalid!
PlatformNotFound: >-
Platform '{platform}' was not found or invalid!
ModuleNotFound: >-
diff --git a/tools/Internals/locales/fr_FR.yml b/tools/Internals/locales/fr_FR.yml
index bdc36ea..d886fb9 100644
--- a/tools/Internals/locales/fr_FR.yml
+++ b/tools/Internals/locales/fr_FR.yml
@@ -47,6 +47,8 @@ exceptions:
UnsupportedCompilerForModule: >-
Le module additionel '{module}' n'est pas supporté pour le
compilateur '{compiler}' de '{compiler_maker}' !
+ GlobalNotFound: >-
+ Le dossier de source global '{global}' n'existe pas ou est invalide !
PlatformNotFound: >-
La plateforme '{platform}' n'existe pas ou est invalide !
ModuleNotFound: >-
diff --git a/tools/Internals/module.py b/tools/Internals/module.py
index b754333..e44185f 100755
--- a/tools/Internals/module.py
+++ b/tools/Internals/module.py
@@ -13,50 +13,43 @@ import yaml
from time import time
from .exceptions import *
-#*****************************************************************************#
-# Objects #
-#*****************************************************************************#
class SourceModule:
""" The source module class.
Extracts data from the filesystem, and offer utilities to interact
with its elements easily.
"""
- def __init__(self, root, name, mtim = None):
+ def __init__(self, root, name, platform = None, mtim = None):
""" Initialize the class, gather the information from the platform
then the module configuration, and deduce module properties
out of it.
- `root` is the modules root (generally `./arch`).
- `name` is the module platform and name, e.g. `casiowin/fxlib`.
+ `root` is the module root (e.g. `./arch/casiowin/fxlib`).
+ `name` is the module name, e.g. `casiowin/fxlib`.
`mtim` is the reference modification time for the user config.
+ `platform` is the platform containing the module.
"""
- # Open the platform configuration, then the module configuration.
- namepts = name.split('/')
- pconfigpath = os.path.join(root, namepts[0], 'info.yml')
- mconfigpath = os.path.join(root, namepts[0], namepts[1], 'info.yml')
- try:
- pconfig = yaml.load(open(pconfigpath))
- except FileNotFoundError:
- Raise(PlatformNotFoundException(namepts[0]))
+ # Open the module configuration.
+ mconfigpath = os.path.join(root, 'info.yml')
try:
mconfig = yaml.load(open(mconfigpath))
- except FileNotFoundError:
+ except (NotADirectoryError, FileNotFoundError):
Raise(ModuleNotFoundException(name))
+ # Check the difference to the reference time.
if mtim != None:
- if os.path.getmtime(pconfigpath) > mtim:
- Raise(UpdatedPlatformException(namepts[0]))
if os.path.getmtime(mconfigpath) > mtim:
Raise(UpdatedModuleException(name))
+ # Check the magic.
+ if 'magic' in mconfig and mconfig['magic'] != 'potatosdk-1.0':
+ Raise(PlatformNotFoundException(name))
+
# Keep the arguments.
self.root = root
self.name = name
- self.__root = os.path.join(self.root, namepts[0], namepts[1])
- self.__objroot = os.path.normpath(os.path.join(self.root,
- '..', 'obj', namepts[0], namepts[1]))
+ self.__root = root
self.mtim = os.path.getmtime(mconfigpath)
# Get the usual things.
@@ -66,16 +59,37 @@ class SourceModule:
self.conflicts = mconfig['conflicts'] if 'conflicts' in mconfig else []
# Get the requirements.
- self.compiler = []
+ self.compilers = []
self.arch = []
if 'requires' in mconfig:
r = mconfig['requires']
if 'compiler' in r:
- self.compiler = r['compiler']
+ self.compilers = r['compiler']
if 'arch' in r:
self.arch = r['arch']
- if not self.arch and 'arch' in pconfig:
- self.arch = pconfig['arch']
+ if not self.arch and platform.arch:
+ self.arch = platform.arch
+
+ self.roles = {}
+ rpath = os.path.join(root, 'roles.yml')
+ try:
+ with open(rpath) as f:
+ raw = yaml.load(f.read())
+ self.roles = self.__go_through_dirs(raw)
+ except (IsADirectoryError, FileNotFoundError):
+ pass
+
+ def __go_through_dirs(self, roles, prefix=()):
+ """ Read a roles file. """
+
+ elements = {}
+ for key, element in roles.items():
+ key = prefix + (key,)
+ if type(element) == dict:
+ elements.update(self.__go_through_dirs(element, key))
+ else:
+ elements[key] = element
+ return elements
def getpath(self, *elements):
""" Get the complete path within a directory. """
@@ -89,24 +103,25 @@ class SourceModule:
# Join it all and send it back!
return os.path.join(rt, *elements)
- def getfiles(self, directory, extensions):
- ''' Get the files list. '''
+ def getfiles(self, *path, ext=[], full=False):
+ """ Get the list of files in a directory. """
# Get the root.
- root = self.getpath(directory)
+ root = os.path.join(self.getpath(*path), '')
# Get the source files.
files = []
for r, _, filenames in os.walk(root):
- for f in filenames:
- pos = f.find('.')
- if pos < 0 and not None in extensions:
+ if not full:
+ r = r[len(root):]
+
+ for name in filenames:
+ pos = name.find('.')
+ if pos < 0 and not None in ext:
continue
- elif pos >= 0 and not f[pos + 1:] in extensions:
+ elif pos >= 0 and not name[pos + 1:].lower() in ext:
continue
- name, ext = f, None
- if pos >= 0: ext = name[pos + 1:]
- files.append(os.path.join(r[len(root):], name))
+ files.append(os.path.join(r, name))
return files
@@ -116,20 +131,20 @@ class SourcePlatform:
with its element easily.
"""
- def __init__(self, root, name, mtim = None):
+ def __init__(self, root, name, glob = None, mtim = None):
""" Initialize the class, gather the information from the platform
configuration, and deduce properties out of it.
- `root` is the modules root (generally `./arch`).
+ `root` is the platform root (generally `./arch/casiowin`).
`name` is the platform name, e.g. `casiowin`.
`mtim` is the reference modification time for the user config.
"""
- # Open the platform configuration.
- pconfigpath = os.path.join(root, name, 'info.yml')
+ # Check that it is a platform, load the configuration.
+ pconfigpath = os.path.join(root, 'info.yml')
try:
pconfig = yaml.load(open(pconfigpath))
- except FileNotFoundError:
+ except (NotADirectoryError, FileNotFoundError):
Raise(PlatformNotFoundException(name))
# Check the difference to the reference time.
@@ -137,15 +152,18 @@ class SourcePlatform:
if os.path.getmtime(pconfigpath) > mtim:
Raise(UpdatedPlatformException(name))
+ # Check the magic.
+ if 'magic' in pconfig and pconfig['magic'] != 'potatosdk-1.0':
+ Raise(PlatformNotFoundException(name))
+
# Keep the arguments.
- self.root = root
- self.name = name
- self.__mroot = os.path.join(self.root, name)
- self.mtim = os.path.getmtime(mconfigpath)
+ self.__root = root
+ self.__name = name
+ self.__mtim = mtim
# Get the properties.
self.description = pconfig['description']
- self.defaults = pconfig['defaults'] if 'defaults' in pconfig else []
+ self.defaults = pconfig['default'] if 'default' in pconfig else []
self.arch = []
if 'requires' in pconfig:
r = pconfig['requires']
@@ -156,127 +174,207 @@ class SourcePlatform:
self.__loaded = {}
def getmodule(self, name):
- """ Load a submodule, e.g. "fxlib" for the "casiowin/fxlib"
- module. """
-
- # Check if the module isn't loaded yet.
- if not name in self.__loaded:
- self.__loaded[name] = SourceModule(self.__mroot, name, mtim, self)
-
- # Return the loaded module.
- return self.__loaded[name]
-
-#*****************************************************************************#
-# Main functions #
-#*****************************************************************************#
-# Gather a list of modules.
-def gather_modules(root, lst, mtim):
- ''' Gather a list of modules, given by the build configuration. '''
-
- modules = {}
- for name in lst:
- module = SourceModule(root, name)
- if module.mtim > mtim:
- Raise(UpdatedPlatformException(name))
- modules[name] = module
- return 0, modules
-
-# List modules.
-def list_modules(root, arch, compiler = ('GNU', 'GCC'), \
- languages = ['c', 'c++'], platform = None, additional_modules = []):
- """ Get the list of modules to make, based on the platform agnostic and
- platform-specific language defaults, the architecture, the platform,
- the dependencies, and the additional modules we want to add. """
-
- # The modules as a {identifier => module object} dictionary.
- modules = {}
-
- # First, get the additional modules, and check if one of them is of
- # an unsupported language.
- for name in set(additional_modules):
- module = SourceModule(root, name)
- if arch and module.arch and not arch in module.arch:
- Raise(UnsupportedArchForModuleException(name, arch))
- continue
- if module.compiler and not compiler in module.compiler:
- Raise(UnsupportedCompilerForModuleException(name, compiler))
- continue
- modules[name] = module
-
- # Now, we shall get the language defaults for the platform,
- # using the platform-specific configuration files.
- default = {}
- with open(os.path.join(root, 'all', 'info.yml')) as f:
- config = yaml.load(f.read())
- if 'default' in config:
- for key in config['default']:
- if not key in default: default[key] = []
- default[key] += config['default'][key]
- if platform:
+ """ Load a submodule, e.g. "fxlib" for the "casiowin/fxlib" module. """
+
+ if name in self.__loaded:
+ return self.__loaded[name]
+ module = SourceModule(os.path.join(self.__root, name),
+ '%s/%s'%(self.__name, name), self, self.__mtim)
+ self.__loaded[name] = module
+ return module
+
+ def getallmodules(self):
+ """ Load all of the submodules. """
+
+ modules = {}
+ for name in os.listdir(self.__root):
+ try: module = self.getmodule(name)
+ except ModuleNotFoundException: continue
+ modules[name] = module
+ return modules
+
+class SourceGlobal:
+ """ The global source class.
+ Extracts data from the filesystem. """
+
+ def __init__(self, root, mtim = None):
+ """ Initialize the class, gather the information about the source,
+ and deduce properties out of it.
+
+ `root` is the modules root (generally `./arch`).
+ `mtim` is the reference modification time for the user config.
+ """
+
+ # Open the global configuration.
+ gconfigpath = os.path.join(root, 'info.yml')
try:
- f = open(os.path.join(root, platform, 'info.yml'))
- config = yaml.load(f.read())
- if 'arch' in config and not arch in config['arch']:
- Raise(UnsupportedArchForPlatformException(arch, platform))
- if 'default' in config:
- for key in config['default']:
- if not key in default: default[key] = []
- default[key] += config['default'][key]
- except FileNotFoundError:
- Raise(PlatformNotFoundException(platform))
-
- # Add C dependencies to C++ dependencies.
- if not 'c++' in default:
- default['c++'] = []
- if 'c' in default and 'c++' in default:
- default['c++'] = default['c'] + default['c++']
-
- # Get the defaults using this.
- lmod = []
- for l in map(lambda x:default[x], languages):
- lmod += l
- for name in lmod:
- if name in modules:
- continue
- module = SourceModule(root, name)
- if arch and module.arch and not arch in module.arch:
- continue
- if module.compiler and not compiler in module.compiler:
- continue
- modules[name] = module
-
- # Gather the dependencies.
- newdeps = []
- blacklist = []
- while True:
- # Get the previous dependencies.
- for dep in newdeps:
- name = dep[0]
- try:
- module = SourceModule(root, name, time())
- except Exception:
- Raise(UnresolvedDependencyException(name, dep[1]))
- blacklist.append(name)
- continue
- if (not module.arch or arch in module.arch) \
- and (not module.compiler or compiler in module.compiler):
- modules[name] = module
- else:
- blacklist.append(name)
- newdeps = []
+ gconfig = yaml.load(open(gconfigpath))
+ except (NotADirectoryError, FileNotFoundError):
+ Raise(GlobalNotFoundException)
+
+ # Check the difference to the reference time.
+ if mtim != None:
+ if os.path.getmtime(gconfigpath) > mtim:
+ Raise(UpdatedGlobalException)
+
+ # Check the magic.
+ if 'magic' in gconfig and gconfig['magic'] != 'potatosdk-1.0':
+ Raise(GlobalNotFoundException)
+
+ # Keep the arguments.
+ self.__root = root
+ self.__mtim = mtim
+
+ # Get the properties.
+ self.version = gconfig['version']
+ self.description = gconfig['description']
+ self.arch = gconfig['arch']
+
+ # Loaded platforms.
+ self.__loaded = {}
+
+ def getplatform(self, name):
+ """ Get a platform using its name, e.g. "casiowin". """
+
+ if name in self.__loaded:
+ return self.__loaded[name]
+
+ platform = SourcePlatform(os.path.join(self.__root, name),
+ name, self, self.__mtim)
+ self.__loaded[name] = platform
+ return platform
- # Check the dependencies
- for name, module in modules.items():
- for dep in module.deps:
- if not dep in modules and not dep in blacklist:
- try: ndep = next(i for i in newdeps if i[0] == dep)
- except: newdeps.append([dep, [name]])
- else: ndep[1].append(name)
+ def getallplatforms(self):
+ """ Get all of the existing platforms. """
- if not newdeps:
- break
+ platforms = {}
+ for name in os.listdir(self.__root):
+ try: platform = self.getplatform(name)
+ except PlatformNotFoundException: continue
+ platforms[name] = platform
+ return platforms
+
+ def getmodule(self, name):
+ """ Get a module. """
+
+ platform_name, module_name = name.split('/')
+ platform = self.getplatform(platform_name)
+ return platform.getmodule(module_name)
+
+ def getmodules(self, names):
+ """ Get a list of modules. """
+
+ modules = {}
+ for name in names:
+ modules[name] = self.getmodule(name)
+ return modules
+
+ def getallmodules(self):
+ """ Get all of the existing modules. """
+
+ modules = {}
+ for platform_name, platform in self.getallplatforms().items():
+ for module_name, module in platform.getallmodules().items():
+ modules['%s/%s'%(platform_name, module_name)] = module
+ return modules
+
+ def findmodules(self, arch, platform = None,
+ compiler = ('GNU', 'GCC'), languages = ['c', 'c++'],
+ addition = []):
+ """ Find modules corresponding to a query, based on:
+ - `arch`: the architecture for which to build;
+ - `platform`: the platform for which to build;
+ - `compiler`: the C/C++ compiler with and for which to build;
+ - `languages`: the programming languages for which to
+ offer support;
+ - `addition`: the additional modules to include. """
+
+ modules = {}
+
+ # In 'hand-written' information files, the user ain't using the
+ # '!!python/tuple' trick, so we're just going to use a list instead
+ # of a tuple.
+ compiler = list(compiler)
+
+ # Get the language defaults for the platforms.
+ # 'dp' means 'default platforms', 'pn' means 'platform name'.
+ default = {'c': [], 'c++': []}
+ dp = ['all']
+ if platform:
+ dp.append(platform)
+ for pn in dp:
+ p = self.getplatform(pn)
+ if p.arch and not arch in p.arch:
+ Raise(UnsupportedArchForPlatformException(arch, pn))
+ if 'c' in p.defaults:
+ default['c'] += p.defaults['c']
+ default['c++'] += p.defaults['c']
+ if 'c++' in p.defaults:
+ default['c++'] += p.defaults['c++']
+
+ # Gather the additional modules.
+ for name in set(addition):
+ module = self.getmodule(name)
+ if module.arch and not arch in module.arch:
+ Raise(UnsupportedArchForModuleException(name, arch))
+ continue
+ if module.compiler and not compiler in module.compiler:
+ Raise(UnsupportedCompilerForModuleException(name, compiler))
+ continue
+ modules[name] = module
+
+ # Gather the defaults for the languages.
+ # 'dm' means 'default modules', 'ldm' means 'language default modules'.
+ dm = []
+ for ldm in map(lambda x:default[x], languages):
+ dm.extend(ldm)
+ for name in dm:
+ module = self.getmodule(name)
+ if module.arch and not arch in module.arch:
+ continue
+ if module.compilers and not compiler in module.compilers:
+ continue
+ modules[name] = module
+
+ # Gather the dependencies.
+ # 'newdeps' is a list of tuples, where the first element of each tuple
+ # is the name of the module to gather, and the second is modules from
+ # which the dependency comes from (for logging).
+ newdeps = []
+ blacklist = []
+ while True:
+ # Get the previous dependencies.
+ for dep in newdeps:
+ name = dep[0]
+ try:
+ module = self.getmodule(name)
+ except (PlatformNotFoundException, ModuleNotFoundException):
+ Raise(UnresolvedDependencyException(name, dep[1]))
+ blacklist.append(name)
+ continue
- # We're done
- return list(modules.keys())
+ if module.arch and not arch in module.arch:
+ blacklist.append(name)
+ elif module.compiler and not compiler in module.compiler:
+ blacklist.append(name)
+ else:
+ modules[name] = module
+ newdeps = []
+
+ # Check the dependencies.
+ for name, module in modules.items():
+ for dep in module.deps:
+ if not dep in modules and not dep in blacklist:
+ try: ndep = next(i for i in newdeps if i[0] == dep)
+ except: newdeps.append([dep, [name]])
+ else: ndep[1].append(name)
+
+ # No dependency? Good!
+ if not newdeps:
+ break
+
+ # TODO: check conflicts.
+ # We're done!
+ return modules
# End of file.
diff --git a/tools/Internals/tools/__init__.py b/tools/Internals/tools/__init__.py
index 119813d..c9c6498 100755
--- a/tools/Internals/tools/__init__.py
+++ b/tools/Internals/tools/__init__.py
@@ -96,22 +96,14 @@
import os, sys, functools as ft
from subprocess import call
+from ..exceptions import *
+
from .gnu_gcc import *
from .gnu_as import *
from .gnu_ar import *
from .renesas_shc import *
from .renesas_asmsh import *
from .renesas_optlnk import *
-
-#*****************************************************************************#
-# Super-preprocessor #
-#*****************************************************************************#
-def suph(incdir, incdirs, bitdirs):
- path = os.path.join(os.path.dirname(sys.argv[0]), 'makeinc.py')
- cl = ['python3', path, incdir, os.pathsep.join(incdirs),
- '--bits', os.pathsep.join(bitdirs)]
- return call(cl)
-
#*****************************************************************************#
# Main list #
#*****************************************************************************#
diff --git a/tools/Internals/tools/gnu_gcc.py b/tools/Internals/tools/gnu_gcc.py
index 743caca..6e793c1 100755
--- a/tools/Internals/tools/gnu_gcc.py
+++ b/tools/Internals/tools/gnu_gcc.py
@@ -29,7 +29,7 @@ def __get_gcc_bfd(path):
env['LANG'] = 'en_US'
out = check_output([path, '-dumpmachine'], env=env).decode()
- return get_bfd(out.strip())
+ return out.strip()
def __iter_gcc(arch):
""" Iterate through all of the `gcc` occurrences among the system. """
@@ -99,11 +99,7 @@ def __getparams(typ, arch, objfmt, std=[]):
# Get the utility.
path = None
for gcc in __iter_gcc(arch):
- bfd = __get_gcc_bfd(gcc)
-
- if not check_bfd_arch(arch, bfd[0]):
- continue
- if bfd[1] != objfmt:
+ if not bfd_are_equivalent(__get_gcc_bfd(gcc), arch, 'big', objfmt):
continue
if not __testcc(typ, gcc, cflags):
continue
diff --git a/tools/Internals/tools/utils/bfd.py b/tools/Internals/tools/utils/bfd.py
index 0e94c1a..419a12a 100755
--- a/tools/Internals/tools/utils/bfd.py
+++ b/tools/Internals/tools/utils/bfd.py
@@ -23,8 +23,8 @@ from ...exceptions import *
__bfd_archs = {
# Generic families.
- 'big': (None, None, 'big'),
- 'little': (None, None, 'little'),
+# 'big': (None, None, 'big'),
+# 'little': (None, None, 'little'),
# Intel x86_64 (8080).
'x86': ('x86', 'i386', 'little'),
@@ -62,7 +62,7 @@ __bfd_archs = {
__bfd_flavours = {
'elf': 'elf32',
'elf32': 'elf32',
- 'gnu': 'elf32',
+ 'gnu': 'coff',
'elf64': 'elf64',
'a.out': 'a.out',
@@ -82,11 +82,23 @@ __bfd_flavours = {
#*****************************************************************************#
# Main utilities #
#*****************************************************************************#
-def get_bfd(raw):
- """ Get the BFD target information.
- Returns a (family, arch, endianness, flavour) tuple. """
+def __get_bfd_arch(model = None, endian = None):
+ """ Get BFD architectures that correspond to the query. """
- # The BFD target usually has one of these formats:
+ l_arch = []
+ for bfd_arch_id, bfd_arch in __bfd_archs.items():
+ if model and bfd_arch[1] and bfd_arch[1] != model:
+ continue
+ if endian and bfd_arch[2] and bfd_arch[2] != endian:
+ continue
+ l_arch.append(bfd_arch_id)
+
+ return l_arch
+
+def bfd_are_equivalent(raw, model = None, endian = None, flavour = None):
+ """ Compare a BFD target to a libcarrot situation. """
+
+ # A BFD target usually has one of these formats:
# - <arch>-<flavour>
# - <arch>-<platform>-<flavour>
# - <arch>-pc-<platform>-<flavour>
@@ -102,14 +114,12 @@ def get_bfd(raw):
t_loc = tab[-2] if len(tab) >= 3 else None
t_typ = tab[-3] if len(tab) >= 4 else None
- try:
- arch_info = __bfd_archs[t_arch]
- flavour = __bfd_flavours[t_flv]
- except KeyError:
- raise UnknownBFDTargetException
+ if not t_arch in __get_bfd_arch(model, endian):
+ return False
+ # TODO: check the flavour!
- arch_info = __bfd_archs[arch]
- return (arch_info[0], arch_info[1], arch_info[2], t_flv)
+ # It corresponds!
+ return True
def get_ar_target(raw):
""" Get the GNU ar target information. """
diff --git a/tools/configure.py b/tools/configure.py
index f18a93c..b29d0cf 100755
--- a/tools/configure.py
+++ b/tools/configure.py
@@ -136,10 +136,12 @@ def main():
addm += arg.split(',')
args.modules = addm
+ # Get the global source.
+ g = SourceGlobal('arch')
+
# Check the main configuration.
- globalconfig = yaml.load(open(os.path.join('arch', 'info.yml')).read())
if args.version:
- print(globalconfig['version'])
+ print(g.version)
return
# Clean the repository.
@@ -151,19 +153,18 @@ def main():
mroot = os.path.join(root, 'arch')
# Get the rest.
- mroot = os.path.normpath(os.path.join('arch'))
- if 'arch' in globalconfig and not args.arch in globalconfig['arch']:
+ if not args.arch in g.arch:
raise UnsupportedArchException(args.arch)
exit(1)
- # List the modules.
- modules = list_modules(mroot, args.arch, tools.get('compiler'), args.lang,
- args.platform, args.modules)
-
# Find the tools.
found_tools = tools.find(args.lang, args.arch)
tools.setup(found_tools)
+ # List the modules.
+ modules = list(g.findmodules(args.arch, args.platform,
+ tools.get('compiler'), args.lang, args.modules).keys())
+
# Write the configuration.
with open(args.out, "w") as out:
print(yaml.dump({"magic": "potatosdk-1.0", "tools": found_tools,
diff --git a/tools/getcopyright.py b/tools/getcopyright.py
index 9001d3d..7c2a0e6 100755
--- a/tools/getcopyright.py
+++ b/tools/getcopyright.py
@@ -59,10 +59,8 @@ def main():
msg = str(e)
else:
msg = ''
- for author in authors:
- dates, name, mail = author
- start, end = dates
- ds = '%s-%s'%dates if start < end else '%s'%start
+ for (start, end), name, mail in authors:
+ ds = '%s-%s'%(start, end) if start < end else '%s'%start
msg += 'Copyright (C) %s %s <%s>\n'%(ds, name, mail)
# Put the information.
diff --git a/tools/update_license.py b/tools/update_license.py
new file mode 100755
index 0000000..9e877fe
--- /dev/null
+++ b/tools/update_license.py
@@ -0,0 +1,132 @@
+#!/usr/bin/env python3
+""" This tool updates the top-level comment on each source and include file
+ using the copyright.yml and roles.yml files.
+"""
+
+import os, textwrap
+from Internals import *
+
+__lgpl3_statement = """\
+This file is free software: you can redistribute it and/or modify \
+it under the terms of the GNU Lesser General Public License as published by \
+the Free Software Foundation, either version 3 of the License, or \
+(at your option) any later version.
+
+This file is distributed in the hope that it will be useful, \
+but WITHOUT ANY WARRANTY; without even the implied warranty of \
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \
+GNU Lesser General Lesser Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License \
+along with this file. If not, see <http://www.gnu.org/licenses/>."""
+
+def __get_license_statement(license):
+ if license != 'LGPL-3':
+ return 'This license is unknown.'
+ return __lgpl3_statement
+#*****************************************************************************#
+# Set up the arguments parser #
+#*****************************************************************************#
+argparser = CarrotArgumentParser()
+
+# No arguments for now.
+#*****************************************************************************#
+# Main function #
+#*****************************************************************************#
+__file_groups = [
+ ('include', ['h', 'hpp', None]),
+ ('src', ['c', 'cpp', 'cc', 'cp', 'cxx', 'c++'])
+]
+
+def __split_path(path):
+ """ Split a path. """
+
+ tree, leaf = os.path.split(path)
+ if not tree: return (leaf,)
+ return __split_path(tree) + (leaf,)
+
+def __get_role(*path, module=None):
+ """ Get a path role from a module. """
+
+ path = __split_path(os.path.join(*path))
+ if not path in module.roles:
+ return "(unknown role)"
+ return module.roles[path]
+
+def __repeat(element):
+ while True:
+ yield element
+
+def __get_files(name, module):
+ """ Returns the (name, path, role, copyrights, license) list. """
+
+ files = []
+ for directory, ext in __file_groups:
+ lst = module.getfiles(directory, ext=ext)
+
+ fp = map(lambda x: module.getpath(directory, x), lst)
+ names = map(lambda x: '/'.join(__split_path(x)), lst)
+ roles = map(lambda x: __get_role(directory, x, module=module), lst)
+ files.extend(zip(names, fp, roles, __repeat(name)))
+
+ return files
+
+def main():
+ """ Main function for the `update_license.py` program. """
+
+ # Parse the arguments.
+ args = argparser.parse_args()
+
+ # Get the project root.
+ root = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
+
+ # Get the copyright rules.
+ rules = get_copyright_rules(root)
+
+ # Print the list of all available modules.
+ g = SourceGlobal(os.path.join(root, 'arch'))
+ modules = g.getallmodules()
+
+ # Get all of the files in the available modules.
+ files = []
+ for key, module in modules.items():
+ files.extend(__get_files(key, module))
+
+ # Print the information.
+ first = True
+ for name, path, role, module_name in files:
+ authors, license = get_copyright(rules, path)
+
+ if first: first = False
+ else: print("")
+ print("%s:"%path)
+ print("")
+
+ print('/* ' + '*' * 76)
+ print(' * %s -- %s'%(name, role))
+
+ for (start, end), name, mail in authors:
+ ds = '%s-%s'%(start, end) if start < end else '%s'%start
+ print(" * Copyright (C) %s %s <%s>" \
+ % (ds, name, mail))
+
+ print(" *")
+ print(" * This file is part of the '%s' module,"%module_name)
+ print(" * in libcarrot, an experimental modular libc project.")
+
+ statement = __get_license_statement(license)
+ if statement:
+ print(" *")
+ for stline in statement.split('\n'):
+ par = textwrap.wrap(stline, 75, replace_whitespace=None)
+ if not par: par = ['']
+ for line in par:
+ if not line: print(' *')
+ else: print(' *', line)
+
+ print(' * ' + '*' * 73 + ' */')
+
+if __name__ == "__main__":
+ do_main(main)
+
+# End of file.