mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-19 21:49:22 +00:00
115 lines
4.2 KiB
C
115 lines
4.2 KiB
C
/*
|
|
* Copyright (c) 2015 Carsten Larsen
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
*/
|
|
|
|
#ifndef _AMIGA_TZ_H
|
|
#define _AMIGA_TZ_H
|
|
|
|
// --------------------------------------------------------------------------- //
|
|
#include <exec/io.h>
|
|
#include <exec/types.h>
|
|
#include <exec/memory.h>
|
|
#include <exec/devices.h>
|
|
#include <devices/timer.h>
|
|
#include <intuition/intuition.h>
|
|
#include <intuition/gadgetclass.h>
|
|
#include <libraries/gadtools.h>
|
|
#include <proto/timer.h>
|
|
#include <proto/battclock.h>
|
|
#include <clib/dos_protos.h>
|
|
#include <clib/alib_protos.h>
|
|
#include <clib/exec_protos.h>
|
|
#include <clib/timer_protos.h>
|
|
#include <clib/locale_protos.h>
|
|
#include <clib/utility_protos.h>
|
|
#include <clib/gadtools_protos.h>
|
|
#include <clib/intuition_protos.h>
|
|
#include <clib/battclock_protos.h>
|
|
#include <resources/battclock.h>
|
|
// --------------------------------------------------------------------------- //
|
|
#if defined(AOS3) || defined(AOS4)
|
|
# define ARGPTR STRPTR
|
|
# define ARGS_FORMAT ARGSFORMAT
|
|
#endif
|
|
#if defined(AROS) || defined(MORPHOS)
|
|
# define ARGPTR CONST_STRPTR
|
|
# define ARGS_FORMAT (CONST_STRPTR)ARGSFORMAT
|
|
#endif
|
|
#ifndef ARGPTR
|
|
# error Platform must be defined
|
|
#endif
|
|
// --------------------------------------------------------------------------- //
|
|
#define OPEN_ERROR "Cannot open %s.\n"
|
|
#define OPEN_VER_ERROR "Cannot open %s v%s.\n"
|
|
#define REQ_ERROR "Requires Kickstart 2.04 (37.175) or later.\n"
|
|
#define INTUILIB_NAME "intuition.library"
|
|
#define INTUILIB_REV 37L
|
|
#define GADTOOLLIB_NAME "gadtools.library"
|
|
#define GADTOOLLIB_REV 37L
|
|
#define UTILLIB_NAME "utility.library"
|
|
#define UTILLIB_REV 37L
|
|
#define LOCALELIB_NAME "locale.library"
|
|
#define LOCALELIB_REV 37L
|
|
#define DOSLIB_NAME "dos.library"
|
|
#define DOSLIB_REV 37L
|
|
#define TIMER_NAME TIMERNAME
|
|
#define BATTCLOCK_NAME BATTCLOCKNAME
|
|
#define PUBSCREEN_NAME "PubScreen"
|
|
// --------------------------------------------------------------------------- //
|
|
#ifndef ULONG
|
|
#define ULONG long unsigned int
|
|
#endif
|
|
#ifndef LLONG_MAX
|
|
#define LLONG_MAX ((long long)(~0ULL>>1))
|
|
#endif
|
|
#ifndef LLONG_MIN
|
|
#define LLONG_MIN (-LLONG_MAX - 1)
|
|
#endif
|
|
// --------------------------------------------------------------------------- //
|
|
// 2922 is the number of days between 1.1.1970 and 1.1.1978 (2 leap years and 6 normal)
|
|
#ifndef AMIGAOFFSET
|
|
#define AMIGAOFFSET 2922 * 24 * 60 * 60
|
|
#endif
|
|
#define ENVSIZE 100
|
|
// --------------------------------------------------------------------------- //
|
|
int get_gmtoffset();
|
|
int gettime(struct timeval *tv);
|
|
int settime(struct timeval *tv);
|
|
void underscore_add(char *string);
|
|
void underscore_remove(char *string);
|
|
// --------------------------------------------------------------------------- //
|
|
long long int strtoll(const char *nptr, char **endptr, int base);
|
|
int isalnum(int c);
|
|
int isalpha(int c);
|
|
int isdigit(int c);
|
|
int ispunct(int c);
|
|
int isspace(int c);
|
|
int isupper(int c);
|
|
// --------------------------------------------------------------------------- //
|
|
void syslog(int, const char *, ...);
|
|
// --------------------------------------------------------------------------- //
|
|
|
|
#endif
|