mirror of https://gitlab.com/rnger/amath
Cleaned up definitions
This commit is contained in:
parent
c80e7c0101
commit
d7f8c6cbd3
|
@ -187,7 +187,6 @@
|
|||
<ClInclude Include="app\system\task_amiga.h" />
|
||||
<ClInclude Include="app\system\task_stdc.h" />
|
||||
<ClInclude Include="app\system\window_amiga.h" />
|
||||
<ClInclude Include="lib\ansicon.h" />
|
||||
<ClInclude Include="lib\clib.h" />
|
||||
<ClInclude Include="lib\complex.h" />
|
||||
<ClInclude Include="lib\cplex\prim.h" />
|
||||
|
@ -199,7 +198,6 @@
|
|||
<ClInclude Include="lib\mem.h" />
|
||||
<ClInclude Include="lib\platform.h" />
|
||||
<ClInclude Include="lib\real\prim.h" />
|
||||
<ClInclude Include="lib\text.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{21BD69A9-7F52-48D9-9846-6943E90A87A9}</ProjectGuid>
|
||||
|
|
|
@ -560,9 +560,6 @@
|
|||
<ClInclude Include="app\system\base\thread.h">
|
||||
<Filter>app\system\io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lib\ansicon.h">
|
||||
<Filter>lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lib\clib.h">
|
||||
<Filter>lib</Filter>
|
||||
</ClInclude>
|
||||
|
@ -584,9 +581,6 @@
|
|||
<ClInclude Include="lib\platform.h">
|
||||
<Filter>lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lib\text.h">
|
||||
<Filter>lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lib\dconv\dmath.h">
|
||||
<Filter>lib\dconv</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "lib/charbuf.h"
|
||||
#include "lib/aengine.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "clib.h"
|
||||
#include "math.h"
|
||||
#include "text.h"
|
||||
#include "dprint.h"
|
||||
#include "complex.h"
|
||||
#include "lib/real.h"
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "localize/lex.h"
|
||||
|
||||
#define symzero Symbol(0)
|
||||
|
|
|
@ -81,19 +81,6 @@
|
|||
//#define TXTCPU EMPTYSTRING
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(AROS)
|
||||
# define TXTSYSNAME SPACE "AROS"
|
||||
#endif
|
||||
#if defined(MORPHOS)
|
||||
# define TXTSYSNAME SPACE "MorphOS"
|
||||
#endif
|
||||
#if defined(AOS3) || defined(AOS4)
|
||||
# define TXTSYSNAME SPACE "AmigaOS"
|
||||
#endif
|
||||
#ifndef TXTSYSNAME
|
||||
# define TXTSYSNAME EMPTYSTRING
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef WITHTEST
|
||||
# define TXTTEST SPACE "TEST"
|
||||
#else
|
||||
|
@ -109,7 +96,6 @@
|
|||
#define TXTTITLE "amath version 1.6.0"
|
||||
#define TXTDOSVERSION "\0$VER: amath 1.60 (01-04-2015)"
|
||||
#define TXTCOPYRIGHT "(c) 2015 Carsten Sonne Larsen"
|
||||
#define TXTARCH TXTCPU TXTFPU TXTSYSNAME TXTTEST
|
||||
#define TXTSTARTMSG TXTTITLE SPACE TXTARCH SPACE TXTCOPYRIGHT
|
||||
#define TXTSTARTMSG TXTTITLE SPACE TXTCPU TXTFPU TXTTEST SPACE TXTCOPYRIGHT
|
||||
/******************************************************************************/
|
||||
#endif
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#ifndef AMATH_TEXT_TAGS_H
|
||||
#define AMATH_TEXT_TAGS_H
|
||||
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "clib.h"
|
||||
#include "localize/start.h"
|
||||
|
||||
static const texttag texttags[] = {
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
|
||||
#define INTROMSG Program->Language->GetText(0)
|
||||
#define TXTLISTDIRHEADER Program->Language->GetText(1)
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "lib/numb.h"
|
||||
#include "main/values.h"
|
||||
#include "main/functions.h"
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "lib/numb.h"
|
||||
#include "lib/charbuf.h"
|
||||
#include "main/nodes.h"
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "lib/numb.h"
|
||||
#include "lib/charbuf.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "mem.h"
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "lib/real.h"
|
||||
#include "lib/charbuf.h"
|
||||
#include "localize/help.h"
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include "mem.h"
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "localize/start.h"
|
||||
#include "system/program.h"
|
||||
#include "system/program_stdc.h"
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "localize/text.h"
|
||||
#include "system/console.h"
|
||||
#include "system/base/io.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "lib/charbuf.h"
|
||||
#include "localize/text.h"
|
||||
#include "system/program.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "lib/charbuf.h"
|
||||
#include "localize/text.h"
|
||||
#include "system/program.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "localize/tags.h"
|
||||
#include "system/language.h"
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "lib/numb.h"
|
||||
#include "lib/real.h"
|
||||
#include "lib/ntext.h"
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
#include "localize/lex.h"
|
||||
|
||||
#define symzero Symbol(0)
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
|
||||
#define %i Program->Language->GetText(%d)
|
||||
|
||||
|
|
29
lib/clib.h
29
lib/clib.h
|
@ -31,41 +31,26 @@
|
|||
* @file clib.h
|
||||
* @brief C functions for manipulating strings and memory.
|
||||
*
|
||||
* This file contains classless C functions. Similar functions can
|
||||
* be found in standard C libraries.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "text.h"
|
||||
#include "platform.h"
|
||||
|
||||
/**
|
||||
* @brief NULL pointer for non allocated memory.
|
||||
*
|
||||
* Use the NOMEM to avoid unnecessary dependency to stdio NULL.
|
||||
*/
|
||||
#define NOMEM 0
|
||||
|
||||
// Defintions used i CLib functions
|
||||
#define LONG_BIT 32
|
||||
#define wsize sizeof(unsigned int)
|
||||
#define wmask (wsize - 1)
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef int bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
const char *tag;
|
||||
const char *text;
|
||||
} texttag;
|
||||
|
||||
int StrLen(const char *string);
|
||||
bool StrIsEqual(const char *s1, const char *s2);
|
||||
void MemSet(void *destination, int c0, unsigned int length);
|
||||
void MemCopy(void *destination, const void *source, unsigned int length);
|
||||
unsigned int AllocAndCopy(char **destination, const char *source);
|
||||
void Untag(char *destination, const char *source,
|
||||
texttag tags[], unsigned int tagcount);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "clib.h"
|
||||
#include "text.h"
|
||||
#include "ansicon.h"
|
||||
|
||||
void Untag(char *destination, const char *source, texttag tags[], unsigned int tagcount)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,20 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
#define EMPTYSTRING ""
|
||||
#define SPACE " "
|
||||
#define NEWLINE "\n"
|
||||
#define NOMEM 0
|
||||
#define LONG_BIT 32
|
||||
#define wsize sizeof(unsigned int)
|
||||
#define wmask (wsize - 1)
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef int bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
#ifdef __AMIGA__
|
||||
# ifndef AOS3
|
||||
# define AOS3
|
||||
|
@ -112,4 +126,40 @@ typedef u_int64_t uint64_t;
|
|||
# define IPTR LONG*
|
||||
#endif
|
||||
|
||||
#if defined(ANSICONSOLE)
|
||||
#define HEADLINE "\x1B[1m"
|
||||
#define SYNTAXHIGHLIGHT "\x1B[3m\x1B[32m"
|
||||
#define NORMALTEXT "\x1B[0m"
|
||||
#define BOLD "\x1B[1m"
|
||||
#define ITALICS "\x1B[3m"
|
||||
#define UNDERLINE "\x1B[4m"
|
||||
#define COLOR01 "\x1B[31m"
|
||||
#define COLOR02 "\x1B[32m"
|
||||
#define COLOR03 "\x1B[33m"
|
||||
#define CURSORFORWARD "\x1B[1C"
|
||||
#define CURSORBACKWARD "\x1B[1D"
|
||||
#define ERASEINLINE "\x1B[K"
|
||||
#define INSERT1CHAR "\x1B[1@"
|
||||
#define DELETE1CHAR "\x1B[1P"
|
||||
#define DELETELINE "\x0D\x1B[K"
|
||||
#define CLEARWINDOW "\x1B[1;1H\x1B[J"
|
||||
#else
|
||||
#define HEADLINE EMPTYSTRING
|
||||
#define SYNTAXHIGHLIGHT EMPTYSTRING
|
||||
#define NORMALTEXT EMPTYSTRING
|
||||
#define BOLD EMPTYSTRING
|
||||
#define ITALICS EMPTYSTRING
|
||||
#define UNDERLINE EMPTYSTRING
|
||||
#define COLOR01 EMPTYSTRING
|
||||
#define COLOR02 EMPTYSTRING
|
||||
#define COLOR03 EMPTYSTRING
|
||||
#define CURSORFORWARD EMPTYSTRING
|
||||
#define CURSORBACKWARD EMPTYSTRING
|
||||
#define ERASEINLINE EMPTYSTRING
|
||||
#define INSERT1CHAR EMPTYSTRING
|
||||
#define DELETE1CHAR EMPTYSTRING
|
||||
#define DELETELINE EMPTYSTRING
|
||||
#define CLEARWINDOW EMPTYSTRING
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue