forked from KolibriOS/kolibrios
uPDF: menuetlibc -> newlibc
git-svn-id: svn://kolibrios.org@8436 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0524045ec1
commit
a4c9cb975a
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
ok=`tput setaf 2`
|
||||
error=`tput setaf 1`
|
||||
reset=`tput sgr0`
|
||||
|
||||
clear
|
||||
rm build/kos_main.o
|
||||
rm build/mupdf
|
||||
make
|
||||
if [ ! -f build/mupdf ]; then
|
||||
echo "${error} Compilation error ${reset}"
|
||||
$SHELL
|
||||
fi
|
||||
echo "${ok} OK ${reset}"
|
||||
objcopy -O binary build/mupdf
|
||||
rm updf
|
||||
cp build/mupdf updf
|
||||
ncftpput -u xxxx -p xxxx kolibri-n.org /public_ftp ~/Desktop/updf/updf
|
||||
if [ $? -ne 0 ]; then echo \"Upload failed\"; fi
|
||||
|
||||
|
||||
|
||||
|
@ -1,114 +0,0 @@
|
||||
# GNU Makefile
|
||||
|
||||
OUT := build
|
||||
GEN := generated
|
||||
|
||||
# --- Variables, Commands, etc... ---
|
||||
|
||||
default: all
|
||||
LDFLAGS = -Tinclude/scripts/menuetos_app_v01.ld -nostdlib -L include/lib
|
||||
CFLAGS += -Ifitz -Ipdf -Iscripts -fno-stack-protector -nostdinc -fno-builtin -m32 -I include -fno-pic -w
|
||||
LIBS += -lfreetype2 -lpng -ljbig2dec -ljpeg -lopenjpeg -lz -lm -lc
|
||||
|
||||
THIRD_LIBS := $(FREETYPE_LIB) $(JBIG2DEC_LIB) $(JPEG_LIB) $(OPENJPEG_LIB) $(ZLIB_LIB)
|
||||
|
||||
ifeq "$(verbose)" ""
|
||||
QUIET_AR = @ echo ' ' ' ' AR $@ ;
|
||||
QUIET_CC = @ echo ' ' ' ' CC $@ ;
|
||||
QUIET_GEN = @ echo ' ' ' ' GEN $@ ;
|
||||
QUIET_LINK = @ echo ' ' ' ' LINK $@ ;
|
||||
QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ;
|
||||
endif
|
||||
|
||||
CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $<
|
||||
AR_CMD = $(QUIET_AR) $(AR) cru $@ $^
|
||||
LINK_CMD = $(QUIET_LINK) ld $(LDFLAGS) -o $@ include/stub/crt0.o $^ build/snprintf.o $(LIBS)
|
||||
MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@
|
||||
|
||||
# --- Rules ---
|
||||
|
||||
$(OUT) $(GEN) :
|
||||
$(MKDIR_CMD)
|
||||
|
||||
$(OUT)/%.a :
|
||||
$(AR_CMD)
|
||||
|
||||
$(OUT)/% : $(OUT)/%.o
|
||||
$(LINK_CMD)
|
||||
|
||||
$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : scripts/%.c | $(OUT)
|
||||
$(CC_CMD)
|
||||
|
||||
# --- Fitz and MuPDF libraries ---
|
||||
|
||||
FITZ_LIB := $(OUT)/libfitz.a
|
||||
MUPDF_LIB := $(OUT)/libmupdf.a
|
||||
|
||||
FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c))
|
||||
MUPDF_SRC := $(notdir $(wildcard pdf/*.c))
|
||||
|
||||
$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o))
|
||||
$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o))
|
||||
|
||||
libs: $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
|
||||
|
||||
# --- Generated CMAP and FONT files ---
|
||||
|
||||
CMAPDUMP := scripts/cmapdump
|
||||
|
||||
CMAP_CNS_SRC := $(wildcard cmaps/cns/*)
|
||||
CMAP_GB_SRC := $(wildcard cmaps/gb/*)
|
||||
CMAP_JAPAN_SRC := $(wildcard cmaps/japan/*)
|
||||
CMAP_KOREA_SRC := $(wildcard cmaps/korea/*)
|
||||
FONT_BASE14_SRC := $(wildcard fonts/*.cff)
|
||||
FONT_DROID_SRC := fonts/droid/DroidSans.ttf fonts/droid/DroidSansMono.ttf
|
||||
FONT_CJK_SRC := fonts/droid/DroidSansFallback.ttf
|
||||
|
||||
$(GEN)/cmap_cns.h : $(CMAP_CNS_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_CNS_SRC)
|
||||
$(GEN)/cmap_gb.h : $(CMAP_GB_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_GB_SRC)
|
||||
$(GEN)/cmap_japan.h : $(CMAP_JAPAN_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_JAPAN_SRC)
|
||||
$(GEN)/cmap_korea.h : $(CMAP_KOREA_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_KOREA_SRC)
|
||||
|
||||
$(GEN)/font_base14.h : $(FONT_BASE14_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_BASE14_SRC)
|
||||
$(GEN)/font_droid.h : $(FONT_DROID_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_DROID_SRC)
|
||||
$(GEN)/font_cjk.h : $(FONT_CJK_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_CJK_SRC)
|
||||
|
||||
CMAP_HDR := $(addprefix $(GEN)/, cmap_cns.h cmap_gb.h cmap_japan.h cmap_korea.h)
|
||||
FONT_HDR := $(GEN)/font_base14.h $(GEN)/font_droid.h $(GEN)/font_cjk.h
|
||||
|
||||
ifeq "$(CROSSCOMPILE)" ""
|
||||
$(CMAP_HDR) : $(CMAPDUMP) | $(GEN)
|
||||
$(FONT_HDR) : $(FONTDUMP) | $(GEN)
|
||||
endif
|
||||
|
||||
generate: $(CMAP_HDR) $(FONT_HDR)
|
||||
|
||||
$(OUT)/pdf_cmap_table.o : $(CMAP_HDR)
|
||||
$(OUT)/pdf_fontfile.o : $(FONT_HDR)
|
||||
$(OUT)/cmapdump.o : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c
|
||||
|
||||
# --- Tools and Apps ---
|
||||
|
||||
MUPDF := $(OUT)/mupdf
|
||||
$(MUPDF) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
|
||||
ifeq "$(NOX11)" ""
|
||||
$(MUPDF) : $(addprefix $(OUT)/, kos_main.o pdfapp.o)
|
||||
$(LINK_CMD)
|
||||
endif
|
||||
|
||||
all: $(THIRD_LIBS) $(FITZ_LIB) $(PDF_APPS) $(MUPDF)
|
@ -1,114 +0,0 @@
|
||||
# GNU Makefile
|
||||
|
||||
OUT := build
|
||||
GEN := generated
|
||||
|
||||
# --- Variables, Commands, etc... ---
|
||||
|
||||
default: all
|
||||
LDFLAGS = -Tinclude/scripts/menuetos_app_v01.ld -nostdlib -L include/lib
|
||||
CFLAGS += -Ifitz -Ipdf -Iscripts -fno-stack-protector -nostdinc -fno-builtin -m32 -I include -fno-pic -w
|
||||
LIBS += -lfreetype2 -lpng -ljbig2dec -ljpeg -lopenjpeg -lz -lm -lc
|
||||
|
||||
THIRD_LIBS := $(FREETYPE_LIB) $(JBIG2DEC_LIB) $(JPEG_LIB) $(OPENJPEG_LIB) $(ZLIB_LIB)
|
||||
|
||||
ifeq "$(verbose)" ""
|
||||
QUIET_AR = @ echo ' ' ' ' AR $@ ;
|
||||
QUIET_CC = @ echo ' ' ' ' CC $@ ;
|
||||
QUIET_GEN = @ echo ' ' ' ' GEN $@ ;
|
||||
QUIET_LINK = @ echo ' ' ' ' LINK $@ ;
|
||||
QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ;
|
||||
endif
|
||||
|
||||
CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $<
|
||||
AR_CMD = $(QUIET_AR) $(AR) cru $@ $^
|
||||
LINK_CMD = $(QUIET_LINK) LD/ld.bfd $(LDFLAGS) -o $@ include/stub/crt0.o $^ build/snprintf.o $(LIBS)
|
||||
MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@
|
||||
|
||||
# --- Rules ---
|
||||
|
||||
$(OUT) $(GEN) :
|
||||
$(MKDIR_CMD)
|
||||
|
||||
$(OUT)/%.a :
|
||||
$(AR_CMD)
|
||||
|
||||
$(OUT)/% : $(OUT)/%.o
|
||||
$(LINK_CMD)
|
||||
|
||||
$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
|
||||
$(CC_CMD)
|
||||
$(OUT)/%.o : scripts/%.c | $(OUT)
|
||||
$(CC_CMD)
|
||||
|
||||
# --- Fitz and MuPDF libraries ---
|
||||
|
||||
FITZ_LIB := $(OUT)/libfitz.a
|
||||
MUPDF_LIB := $(OUT)/libmupdf.a
|
||||
|
||||
FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c))
|
||||
MUPDF_SRC := $(notdir $(wildcard pdf/*.c))
|
||||
|
||||
$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o))
|
||||
$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o))
|
||||
|
||||
libs: $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
|
||||
|
||||
# --- Generated CMAP and FONT files ---
|
||||
|
||||
CMAPDUMP := scripts/cmapdump
|
||||
|
||||
CMAP_CNS_SRC := $(wildcard cmaps/cns/*)
|
||||
CMAP_GB_SRC := $(wildcard cmaps/gb/*)
|
||||
CMAP_JAPAN_SRC := $(wildcard cmaps/japan/*)
|
||||
CMAP_KOREA_SRC := $(wildcard cmaps/korea/*)
|
||||
FONT_BASE14_SRC := $(wildcard fonts/*.cff)
|
||||
FONT_DROID_SRC := fonts/droid/DroidSans.ttf fonts/droid/DroidSansMono.ttf
|
||||
FONT_CJK_SRC := fonts/droid/DroidSansFallback.ttf
|
||||
|
||||
$(GEN)/cmap_cns.h : $(CMAP_CNS_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_CNS_SRC)
|
||||
$(GEN)/cmap_gb.h : $(CMAP_GB_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_GB_SRC)
|
||||
$(GEN)/cmap_japan.h : $(CMAP_JAPAN_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_JAPAN_SRC)
|
||||
$(GEN)/cmap_korea.h : $(CMAP_KOREA_SRC)
|
||||
$(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_KOREA_SRC)
|
||||
|
||||
$(GEN)/font_base14.h : $(FONT_BASE14_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_BASE14_SRC)
|
||||
$(GEN)/font_droid.h : $(FONT_DROID_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_DROID_SRC)
|
||||
$(GEN)/font_cjk.h : $(FONT_CJK_SRC)
|
||||
$(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_CJK_SRC)
|
||||
|
||||
CMAP_HDR := $(addprefix $(GEN)/, cmap_cns.h cmap_gb.h cmap_japan.h cmap_korea.h)
|
||||
FONT_HDR := $(GEN)/font_base14.h $(GEN)/font_droid.h $(GEN)/font_cjk.h
|
||||
|
||||
ifeq "$(CROSSCOMPILE)" ""
|
||||
$(CMAP_HDR) : $(CMAPDUMP) | $(GEN)
|
||||
$(FONT_HDR) : $(FONTDUMP) | $(GEN)
|
||||
endif
|
||||
|
||||
generate: $(CMAP_HDR) $(FONT_HDR)
|
||||
|
||||
$(OUT)/pdf_cmap_table.o : $(CMAP_HDR)
|
||||
$(OUT)/pdf_fontfile.o : $(FONT_HDR)
|
||||
$(OUT)/cmapdump.o : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c
|
||||
|
||||
# --- Tools and Apps ---
|
||||
|
||||
MUPDF := $(OUT)/mupdf
|
||||
$(MUPDF) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
|
||||
ifeq "$(NOX11)" ""
|
||||
$(MUPDF) : $(addprefix $(OUT)/, kos_main.o pdfapp.o)
|
||||
$(LINK_CMD)
|
||||
endif
|
||||
|
||||
all: $(THIRD_LIBS) $(FITZ_LIB) $(PDF_APPS) $(MUPDF)
|
22
contrib/media/updf/SYSCALL/src/Makefile
Executable file
22
contrib/media/updf/SYSCALL/src/Makefile
Executable file
@ -0,0 +1,22 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
|
||||
SDK_DIR = $(abspath ../../../../sdk)
|
||||
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
||||
|
||||
INCLUDES = -I ../include -I $(SDK_DIR)/sources/newlib/libc/include
|
||||
|
||||
SYSCALL_SRC := $(notdir $(wildcard *.c))
|
||||
OBJECTS = $(patsubst %.c, %.o, $(SYSCALL_SRC))
|
||||
|
||||
default: $(patsubst %.c,%.o,$(SYSCALL_SRC))
|
||||
ar rcs libsyscall.a *.o
|
||||
rm *.o
|
||||
mv libsyscall.a ../../lib
|
||||
|
||||
%.o : %.c Makefile $(SYSCALL_SRC)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm *.o
|
26
contrib/media/updf/SYSCALL/src/backgr.c
Executable file
26
contrib/media/updf/SYSCALL/src/backgr.c
Executable file
@ -0,0 +1,26 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__set_background_size(__u32 xsz,__u32 ysz)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(15),"b"(1),"c"(xsz),"d"(ysz));
|
||||
}
|
||||
|
||||
void __menuet__write_background_mem(__u32 pos,__u32 color)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(15),"b"(2),"c"(pos),"d"(color));
|
||||
}
|
||||
|
||||
void __menuet__draw_background(void)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(15),"b"(3));
|
||||
}
|
||||
|
||||
void __menuet__set_background_draw_type(int type)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(15),"b"(3),"c"(type));
|
||||
}
|
||||
|
||||
void __menuet__background_blockmove(char * src_ptr,__u32 bgr_dst,__u32 count)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(15),"b"(3),"c"(src_ptr),"d"(bgr_dst),"S"(count));
|
||||
}
|
9
contrib/media/updf/SYSCALL/src/bar.c
Executable file
9
contrib/media/updf/SYSCALL/src/bar.c
Executable file
@ -0,0 +1,9 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__bar(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,__u32 color)
|
||||
{
|
||||
__u32 a,b;
|
||||
a=(x1<<16)|xsize;
|
||||
b=(y1<<16)|ysize;
|
||||
__asm__ __volatile__("int $0x40"::"a"(13),"b"(a),"c"(b),"d"(color));
|
||||
}
|
17
contrib/media/updf/SYSCALL/src/button.c
Executable file
17
contrib/media/updf/SYSCALL/src/button.c
Executable file
@ -0,0 +1,17 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__make_button(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,
|
||||
int id,__u32 color)
|
||||
{
|
||||
__u32 a,b;
|
||||
a=(x1<<16)|xsize;
|
||||
b=(y1<<16)|ysize;
|
||||
__asm__ __volatile__("int $0x40"::"a"(8),"b"(a),"c"(b),"d"(id),"S"(color));
|
||||
}
|
||||
|
||||
int __menuet__get_button_id(void)
|
||||
{
|
||||
__u16 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(17));
|
||||
if((__ret & 0xFF)==0) return (__ret>>8)&0xFF; else return -1;
|
||||
}
|
8
contrib/media/updf/SYSCALL/src/clock.c
Executable file
8
contrib/media/updf/SYSCALL/src/clock.c
Executable file
@ -0,0 +1,8 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
__u32 __menuet__getsystemclock(void)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(3));
|
||||
return __ret;
|
||||
}
|
15
contrib/media/updf/SYSCALL/src/cofflib.c
Executable file
15
contrib/media/updf/SYSCALL/src/cofflib.c
Executable file
@ -0,0 +1,15 @@
|
||||
#include <menuet/os.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
IMP_TABLE __kolibri__cofflib_load(const char* name){
|
||||
__asm__ __volatile__("int $0x40"::"a"(68L),"b"(19L),"c"((__u32)name));
|
||||
}
|
||||
|
||||
__u32 __kolibri__cofflib_getproc(IMP_TABLE lib, const char* name){
|
||||
if(!name || !name[0]) return 0;
|
||||
int i;
|
||||
for(i = 0; lib[i].name && strcmp(name, lib[i].name); i++);
|
||||
if(lib[i].name) return (__u32)lib[i].pointer;
|
||||
else return 0;
|
||||
}
|
8
contrib/media/updf/SYSCALL/src/date.c
Executable file
8
contrib/media/updf/SYSCALL/src/date.c
Executable file
@ -0,0 +1,8 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
__u32 __menuet__get_date(void)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(29));
|
||||
return __ret;
|
||||
}
|
5
contrib/media/updf/SYSCALL/src/debug.c
Executable file
5
contrib/media/updf/SYSCALL/src/debug.c
Executable file
@ -0,0 +1,5 @@
|
||||
#include <menuet/os.h>
|
||||
void __menuet__debug_out(const char* str){
|
||||
while(*str)
|
||||
__menuet__debug_out_byte(*str++);
|
||||
}
|
11
contrib/media/updf/SYSCALL/src/delay.c
Executable file
11
contrib/media/updf/SYSCALL/src/delay.c
Executable file
@ -0,0 +1,11 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__delay100(int m)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(5),"b"(m));
|
||||
}
|
||||
|
||||
void __menuet__idle(void)
|
||||
{
|
||||
__menuet__delay100(10);
|
||||
}
|
19
contrib/media/updf/SYSCALL/src/dga.c
Executable file
19
contrib/media/updf/SYSCALL/src/dga.c
Executable file
@ -0,0 +1,19 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__dga_get_caps(int * xres,int * yres,int * bpp,int * bpscan)
|
||||
{
|
||||
int p;
|
||||
__asm__ __volatile__("int $0x40":"=a"(p):"0"(61),"b"(1));
|
||||
if(xres) *xres=(p>>16)&0xFFFF;
|
||||
if(yres) *yres=p & 0xFFFF;
|
||||
if(bpp)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40":"=a"(p):"0"(61),"b"(2));
|
||||
*bpp=p;
|
||||
}
|
||||
if(bpscan)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40":"=a"(p):"0"(61),"b"(3));
|
||||
*bpscan=p;
|
||||
}
|
||||
}
|
20
contrib/media/updf/SYSCALL/src/event.c
Executable file
20
contrib/media/updf/SYSCALL/src/event.c
Executable file
@ -0,0 +1,20 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
int __menuet__wait_for_event(void)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(10));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
int __menuet__check_for_event(void)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(11));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
void __menuet__set_bitfield_for_wanted_events(__u32 ev)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(40),"b"(ev));
|
||||
}
|
6
contrib/media/updf/SYSCALL/src/exit.c
Executable file
6
contrib/media/updf/SYSCALL/src/exit.c
Executable file
@ -0,0 +1,6 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__sys_exit(void)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(0xFFFFFFFF));
|
||||
}
|
45
contrib/media/updf/SYSCALL/src/file.c
Executable file
45
contrib/media/updf/SYSCALL/src/file.c
Executable file
@ -0,0 +1,45 @@
|
||||
#include<menuet/os.h>
|
||||
#include<stdio.h>
|
||||
#include<stdarg.h>
|
||||
#include<string.h>
|
||||
|
||||
__u32 __menuet__open(char * name,char * data)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(6),"b"((__u32)name),"c"(0),"d"(0xFFFFFFFF),"S"((__u32)data));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
void __menuet__save(char * name,char * data,__u32 count)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(33),"b"((__u32)name),"c"((__u32)data),"d"(count),"S"(0));
|
||||
}
|
||||
|
||||
void __menuet__exec_ramdisk(char * filename,char * args,...)
|
||||
{
|
||||
va_list argz;
|
||||
char buffer[1024];
|
||||
memset(buffer,0,1024);
|
||||
if(args)
|
||||
{
|
||||
va_start(argz,args);
|
||||
vsprintf(buffer,args,argz);
|
||||
}
|
||||
va_end(argz);
|
||||
__asm__ __volatile__("int $0x40"::"a"(19),"b"(filename),"c"((args ? buffer : NULL)));
|
||||
}
|
||||
|
||||
void __menuet__exec_hd(char * filename,char * args,...)
|
||||
{
|
||||
va_list argz;
|
||||
char buffer[1024];
|
||||
char work_area[0xFFFF];
|
||||
memset(buffer,0,1024);
|
||||
if(args)
|
||||
{
|
||||
va_start(argz,args);
|
||||
vsprintf(buffer,args,argz);
|
||||
}
|
||||
va_end(argz);
|
||||
__asm__ __volatile__("int $0x40"::"a"(19),"b"(filename),"c"(args ? buffer : NULL),"d"(work_area));
|
||||
}
|
9
contrib/media/updf/SYSCALL/src/image.c
Executable file
9
contrib/media/updf/SYSCALL/src/image.c
Executable file
@ -0,0 +1,9 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__putimage(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,char * image)
|
||||
{
|
||||
__u32 a,b;
|
||||
a=(xsize<<16)|ysize;
|
||||
b=(x1<<16)|y1;
|
||||
__asm__ __volatile__("int $0x40"::"a"(7),"b"(image),"c"(a),"d"(b));
|
||||
}
|
11
contrib/media/updf/SYSCALL/src/ipc.c
Executable file
11
contrib/media/updf/SYSCALL/src/ipc.c
Executable file
@ -0,0 +1,11 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void send_message(int pid,void * msg_ptr,int message_size)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(60),"b"(2),"c"(pid),"d"(msg_ptr),"S"(message_size));
|
||||
}
|
||||
|
||||
void define_receive_area(msgrcva_t * rcva_ptr,int size)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(60),"b"(1),"c"(rcva_ptr),"d"(size));
|
||||
}
|
62
contrib/media/updf/SYSCALL/src/irq.c
Executable file
62
contrib/media/updf/SYSCALL/src/irq.c
Executable file
@ -0,0 +1,62 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
__u32 __menuet__get_irq_owner(__u32 irq)
|
||||
{
|
||||
__u32 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(41),"b"(irq));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
int __menuet__get_data_read_by_irq(__u32 irq,__u32 * num_bytes_in_buf,__u8 * data)
|
||||
{
|
||||
__u32 a,b,c;
|
||||
__asm__ __volatile__("int $0x40":"=a"(a),"=b"(b),"=c"(c):"0"(42),"1"(irq));
|
||||
if(num_bytes_in_buf) *num_bytes_in_buf=a;
|
||||
if(data) *data=b & 0xFF;
|
||||
return c;
|
||||
}
|
||||
|
||||
int __menuet__send_data_to_device(__u16 port,__u8 val)
|
||||
{
|
||||
int __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(43),"b"(port),"c"(val));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
void __menuet__program_irq(void * intr_table,__u32 irq_num)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(44),"b"(intr_table),"c"(irq_num));
|
||||
}
|
||||
|
||||
int __menuet__reserve_irq(int irqno)
|
||||
{
|
||||
int __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(45),"b"(0),"c"(irqno));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
int __menuet__free_irq(int irqno)
|
||||
{
|
||||
int __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(45),"b"(1),"c"(irqno));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
int __menuet__reserve_port_area(__u32 start,__u32 end)
|
||||
{
|
||||
int __ret;
|
||||
__asm__("int $0x40":"=a"(__ret):"a"(45),"b"(0),"c"(start),"d"(end));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
int __menuet__free_port_area(__u32 start,__u32 end)
|
||||
{
|
||||
int __ret;
|
||||
__asm__("int $0x40":"=a"(__ret):"a"(45),"b"(1),"c"(start),"d"(end));
|
||||
return __ret;
|
||||
}
|
||||
|
||||
void __menuet__define_app_internal_intrs(void * intr_table)
|
||||
{
|
||||
__asm__("int $0x40"::"a"(49),"b"(0),"c"(intr_table));
|
||||
}
|
8
contrib/media/updf/SYSCALL/src/keyb.c
Executable file
8
contrib/media/updf/SYSCALL/src/keyb.c
Executable file
@ -0,0 +1,8 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
int __menuet__getkey(void)
|
||||
{
|
||||
__u16 __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(2));
|
||||
if(!(__ret & 0xFF)) return (__ret>>8)&0xFF; else return 0;
|
||||
}
|
9
contrib/media/updf/SYSCALL/src/line.c
Executable file
9
contrib/media/updf/SYSCALL/src/line.c
Executable file
@ -0,0 +1,9 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__line(__u16 x1,__u16 y1,__u16 x2,__u16 y2,__u32 color)
|
||||
{
|
||||
__u32 b,c;
|
||||
b=(x1<<16)|x1;
|
||||
c=(y1<<16)|y2;
|
||||
__asm__ __volatile__("int $0x40"::"a"(38),"b"(b),"c"(c),"d"(color));
|
||||
}
|
11
contrib/media/updf/SYSCALL/src/mpu401.c
Executable file
11
contrib/media/updf/SYSCALL/src/mpu401.c
Executable file
@ -0,0 +1,11 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__reset_mpu401(void)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(20),"b"(1));
|
||||
}
|
||||
|
||||
void __menuet__write_mpu401(__u8 d)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(20),"b"(2),"c"(d));
|
||||
}
|
7
contrib/media/updf/SYSCALL/src/param.c
Executable file
7
contrib/media/updf/SYSCALL/src/param.c
Executable file
@ -0,0 +1,7 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
#define APP_PARAM_SZ (1024)
|
||||
#define APP_PATH_SZ (1024)
|
||||
|
||||
char __menuet__app_param_area[APP_PARAM_SZ];
|
||||
char __menuet__app_path_area[APP_PATH_SZ];
|
50
contrib/media/updf/SYSCALL/src/pci.c
Executable file
50
contrib/media/updf/SYSCALL/src/pci.c
Executable file
@ -0,0 +1,50 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
#define PCI_FN 62
|
||||
|
||||
void get_pci_version(__u8 * major,__u8 * minor)
|
||||
{
|
||||
int r;
|
||||
__asm__ __volatile__("int $0x40":"=a"(r):"0"(PCI_FN),"b"(0));
|
||||
*minor=r&0xFF;
|
||||
*major=(r>>8)&0xFF;
|
||||
}
|
||||
|
||||
void pci_get_last_bus(__u8 * last_bus)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40":"=a"(*last_bus):"0"(PCI_FN),"b"(1));
|
||||
}
|
||||
|
||||
void get_pci_access_mechanism(__u8 * mechanism)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40":"=a"(*mechanism):"0"(PCI_FN),"b"(2));
|
||||
}
|
||||
|
||||
#define read_config(x,c,bits) \
|
||||
__u##bits pci_read_config_##x (__u8 bus,__u8 dev,__u8 fn,__u8 reg) \
|
||||
{ \
|
||||
__u##bits __ret; \
|
||||
__u16 cx; \
|
||||
__u16 bx; \
|
||||
cx=(((fn&7)|(((dev)&~7)<<3))<<8)|reg; \
|
||||
bx=(bus<<8)|(c); \
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(PCI_FN),"b"(bx),"c"(cx)); \
|
||||
return __ret; \
|
||||
}
|
||||
|
||||
#define write_config(x,c,bits) \
|
||||
void pci_write_config_##x (__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u##bits val) \
|
||||
{ \
|
||||
__u16 cx,bx; \
|
||||
cx=(((fn&7)|(((dev)&~7)<<3))<<8)|reg; \
|
||||
bx=(bus<<8)|(c); \
|
||||
__asm__ __volatile__("int $0x40"::"a"(PCI_FN),"b"(bx),"c"(cx),"d"(val)); \
|
||||
}
|
||||
|
||||
#define rw_config(x,c,bits) \
|
||||
read_config(x,4+c,bits) \
|
||||
write_config(x,7+c,bits)
|
||||
|
||||
rw_config(byte,0,8)
|
||||
rw_config(word,1,16)
|
||||
rw_config(dword,2,32)
|
6
contrib/media/updf/SYSCALL/src/pixel.c
Executable file
6
contrib/media/updf/SYSCALL/src/pixel.c
Executable file
@ -0,0 +1,6 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__putpixel(__u32 x,__u32 y,__u32 color)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(1),"b"(x),"c"(y),"d"(color));
|
||||
}
|
8
contrib/media/updf/SYSCALL/src/process.c
Executable file
8
contrib/media/updf/SYSCALL/src/process.c
Executable file
@ -0,0 +1,8 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
int __menuet__get_process_table(struct process_table_entry * proctab,int pid)
|
||||
{
|
||||
int __ret;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(9),"b"((__u32)proctab),"c"(pid));
|
||||
return __ret;
|
||||
}
|
9
contrib/media/updf/SYSCALL/src/screen.c
Executable file
9
contrib/media/updf/SYSCALL/src/screen.c
Executable file
@ -0,0 +1,9 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__get_screen_max(__u16 * x,__u16 * y)
|
||||
{
|
||||
__u32 v;
|
||||
__asm__ __volatile__("int $0x40":"=a"(v):"0"(14));
|
||||
if(x) *x=v>>16;
|
||||
if(y) *y=v & 0xFFFF;
|
||||
}
|
11
contrib/media/updf/SYSCALL/src/sound.c
Executable file
11
contrib/media/updf/SYSCALL/src/sound.c
Executable file
@ -0,0 +1,11 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__sound_load_block(char * blockptr)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(55),"b"(0),"c"(blockptr));
|
||||
}
|
||||
|
||||
void __menuet__sound_play_block(void)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(55),"b"(1));
|
||||
}
|
16
contrib/media/updf/SYSCALL/src/systree.c
Executable file
16
contrib/media/updf/SYSCALL/src/systree.c
Executable file
@ -0,0 +1,16 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
int __kolibri__system_tree_access(struct systree_info * info)
|
||||
{
|
||||
int __ret;
|
||||
int d0;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret),"=&b"(d0):"0"(70),"1"((__u32)info));
|
||||
return __ret;
|
||||
}
|
||||
int __kolibri__system_tree_access2(struct systree_info2 * info)
|
||||
{
|
||||
int __ret;
|
||||
int d0;
|
||||
__asm__ __volatile__("int $0x40":"=a"(__ret),"=&b"(d0):"0"(70),"1"((__u32)info));
|
||||
return __ret;
|
||||
}
|
6
contrib/media/updf/SYSCALL/src/text.c
Executable file
6
contrib/media/updf/SYSCALL/src/text.c
Executable file
@ -0,0 +1,6 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__write_text(__u16 x,__u16 y,__u32 color,char * text,int len)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(4),"b"((x<<16)|y),"c"(color),"d"((__u32)text),"S"(len));
|
||||
}
|
12
contrib/media/updf/SYSCALL/src/thread.c
Executable file
12
contrib/media/updf/SYSCALL/src/thread.c
Executable file
@ -0,0 +1,12 @@
|
||||
#include<menuet/os.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
void * __menuet__exec_thread(void (* func_ptr)(void),__u32 stack_size,int * retp)
|
||||
{
|
||||
void * __stk, * __ret;
|
||||
__ret=__stk=malloc(stack_size);
|
||||
__stk+=stack_size-1;
|
||||
__asm__ __volatile__("int $0x40":"=a"(*retp):"0"(51L),"b"(1L),"c"((__u32)func_ptr),"d"((__u32)__stk));
|
||||
return __ret;
|
||||
}
|
16
contrib/media/updf/SYSCALL/src/window.c
Executable file
16
contrib/media/updf/SYSCALL/src/window.c
Executable file
@ -0,0 +1,16 @@
|
||||
#include<menuet/os.h>
|
||||
|
||||
void __menuet__define_window(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,
|
||||
__u32 body_color,__u32 grab_color,__u32 frame_color)
|
||||
{
|
||||
__u32 a,b;
|
||||
a=(x1<<16)|xsize;
|
||||
b=(y1<<16)|ysize;
|
||||
__asm__ __volatile__("int $0x40"::"a"(0),"b"(a),"c"(b),"d"(body_color),"S"(grab_color),
|
||||
"D"(frame_color));
|
||||
}
|
||||
|
||||
void __menuet__window_redraw(int status)
|
||||
{
|
||||
__asm__ __volatile__("int $0x40"::"a"(12),"b"(status));
|
||||
}
|
25
contrib/media/updf/apps/Makefile
Executable file
25
contrib/media/updf/apps/Makefile
Executable file
@ -0,0 +1,25 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
|
||||
SDK_DIR = $(abspath ../../../sdk)
|
||||
LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0
|
||||
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
||||
|
||||
INCLUDES = -I ../SYSCALL/include -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include -I $(SDK_DIR)/sources/zlib -I ../fitz -I ../pdf
|
||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib -L ../lib
|
||||
|
||||
APPS_SRC := $(notdir $(wildcard *.c))
|
||||
|
||||
default: $(patsubst %.c,%.o,$(APPS_SRC))
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o updf kolibri.o pdfapp.o kos_main.o -lmupdf -lfreetype -lfitz -lgcc -lfitz -ldraw -ljpeg -ljbig2dec -lfreetype -lc.dll -lopenjpeg -lz -lc -lsyscall --subsystem native
|
||||
# yet not work
|
||||
# $(LD) $(LDFLAGS) $(LIBPATH) -o pdfdraw kolibri.o pdfapp.o pdfdraw.o -lmupdf -lfreetype -lfitz -lgcc -lfitz -ldraw -ljpeg -ljbig2dec -lfreetype -lc.dll -lopenjpeg -lz -lc -lsyscall --subsystem native
|
||||
objcopy updf -O binary
|
||||
|
||||
|
||||
%.o : %.c Makefile $(APPS_SRC)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm *.o
|
@ -1,5 +1,6 @@
|
||||
#include "kolibri.h"
|
||||
#include "string.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
extern char KOL_PATH[256];
|
||||
@ -469,7 +470,7 @@ struct blit_call
|
||||
void kos_blit(int dstx, int dsty, int w, int h, int srcx,
|
||||
int srcy,int srcw, int srch, int stride, char *d)
|
||||
{
|
||||
struct blit_call image;
|
||||
volatile struct blit_call image;
|
||||
image.dstx=dstx;
|
||||
image.dsty=dsty;
|
||||
image.w=w;
|
||||
@ -480,6 +481,7 @@ void kos_blit(int dstx, int dsty, int w, int h, int srcx,
|
||||
image.srch=srch;
|
||||
image.stride=stride;
|
||||
image.d=d;
|
||||
asm ("int $0x40"::"a"(73),"b"(0),"c"(&image));
|
||||
asm("int $0x40"::"a"(73),"b"(0),"c"(&image));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
#define SHM_OPEN 0
|
||||
#define SHM_OPEN_ALWAYS 0x04
|
||||
@ -46,7 +48,7 @@ typedef struct
|
||||
{
|
||||
unsigned p00;
|
||||
unsigned p04;
|
||||
unsigned p08;
|
||||
char *p08;
|
||||
unsigned p12;
|
||||
unsigned p16;
|
||||
char p20;
|
||||
@ -143,3 +145,6 @@ int kol_clip_num();
|
||||
char* kol_clip_get(int n);
|
||||
int kol_clip_set(int n, char buffer[]);
|
||||
|
||||
void kos_blit(int dstx, int dsty, int w, int h, int srcx,
|
||||
int srcy,int srcw, int srch, int stride, char *d);
|
||||
int kos_random(int num);
|
||||
|
@ -1,10 +1,12 @@
|
||||
// getrusage
|
||||
#include "resource.h"
|
||||
|
||||
#include <menuet/os.h>
|
||||
#define _WIN32
|
||||
#include "fitz.h"
|
||||
#include "mupdf.h"
|
||||
#include "pdfapp.h"
|
||||
#include "icons/allbtns.h"
|
||||
#include "kolibri.c"
|
||||
#include "kolibri.h"
|
||||
|
||||
void run_app()
|
||||
{
|
||||
@ -53,6 +55,13 @@ const char *help[] = {
|
||||
};
|
||||
|
||||
/*==== CODE ====*/
|
||||
// Prototypes //
|
||||
void RunApp(char app[], char param[]);
|
||||
void winblit(pdfapp_t *app);
|
||||
void DrawPagination(void);
|
||||
void HandleNewPageNumber(unsigned char key);
|
||||
void ApplyNewPageNumber(void);
|
||||
void DrawWindow(void);
|
||||
|
||||
|
||||
// not implemented yet
|
||||
@ -101,12 +110,14 @@ void winreloadfile(pdfapp_t *app)
|
||||
void winclose(pdfapp_t *app)
|
||||
{
|
||||
pdfapp_close(&gapp);
|
||||
__menuet__sys_exit();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void RunOpenApp()
|
||||
void RunOpenApp(char name[])
|
||||
{
|
||||
RunApp("/sys/lod", "*pdf* /kolibrios/media/updf");
|
||||
char cmd[250] = "*pdf* ";
|
||||
strcat(cmd, name);
|
||||
RunApp("/sys/lod", cmd);
|
||||
}
|
||||
|
||||
|
||||
@ -353,18 +364,17 @@ void PageRotateRight(void)
|
||||
DrawPageSides();
|
||||
}
|
||||
|
||||
int main (void)
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
char ii, mouse_wheels_state;
|
||||
char* original_command_line = *(char**)0x1C;
|
||||
|
||||
if (*original_command_line == 0) {
|
||||
if (argc == 1) {
|
||||
kol_board_puts("uPDF: no param set, showing OpenDialog");
|
||||
RunOpenApp();
|
||||
__menuet__sys_exit();
|
||||
RunOpenApp(argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
kol_board_puts(original_command_line);
|
||||
kol_board_puts(argv[1]);
|
||||
kol_board_puts("\n");
|
||||
|
||||
char buf[128];
|
||||
@ -378,7 +388,7 @@ int main (void)
|
||||
gapp.resolution = resolution;
|
||||
gapp.pageno = pageno;
|
||||
kol_board_puts("PDF Open\n");
|
||||
pdfapp_open(&gapp, original_command_line, 0, 0);
|
||||
pdfapp_open(&gapp, argv[1], 0, 0);
|
||||
kol_board_puts("PDF Opened\n");
|
||||
wintitle(&gapp, 0);
|
||||
|
||||
@ -388,78 +398,77 @@ int main (void)
|
||||
__menuet__get_screen_max(&screen_max_x, &screen_max_y);
|
||||
__menuet__set_bitfield_for_wanted_events(EVENT_REDRAW+EVENT_KEY+EVENT_BUTTON+EVENT_MOUSE_CHANGE);
|
||||
|
||||
for(;;)
|
||||
{
|
||||
|
||||
switch(__menuet__wait_for_event())
|
||||
for(;;)
|
||||
{
|
||||
case evReDraw:
|
||||
// gapp.shrinkwrap = 2;
|
||||
__menuet__window_redraw(1);
|
||||
__menuet__define_window(screen_max_x / 2 - 350-50+kos_random(50),
|
||||
screen_max_y / 2 - 300-50+kos_random(50),
|
||||
700, 600, 0x73000000, 0x800000FF, Title);
|
||||
__menuet__window_redraw(2);
|
||||
__menuet__get_process_table(&Form, PID_WHOAMI);
|
||||
if (Form.window_state > 2) continue; //fix rolled up
|
||||
Form.client_width++; //fix for Menuet kernel bug
|
||||
Form.client_height++; //fix for Menuet kernel bug
|
||||
DrawWindow();
|
||||
break;
|
||||
|
||||
case evKey:
|
||||
key = __menuet__getkey();
|
||||
if (key_mode_enter_page_number)
|
||||
{
|
||||
HandleNewPageNumber(key);
|
||||
switch(__menuet__wait_for_event())
|
||||
{
|
||||
case evReDraw:
|
||||
// gapp.shrinkwrap = 2;
|
||||
__menuet__window_redraw(1);
|
||||
__menuet__define_window(screen_max_x / 2 - 350-50+kos_random(50),
|
||||
screen_max_y / 2 - 300-50+kos_random(50),
|
||||
700, 600, 0x73000000, 0x800000FF, Title);
|
||||
__menuet__window_redraw(2);
|
||||
__menuet__get_process_table(&Form, PID_WHOAMI);
|
||||
if (Form.window_state > 2) continue; //fix rolled up
|
||||
Form.client_width++; //fix for Menuet kernel bug
|
||||
Form.client_height++; //fix for Menuet kernel bug
|
||||
DrawWindow();
|
||||
break;
|
||||
}
|
||||
if (key==ASCII_KEY_ESC) DrawWindow(); //close help
|
||||
if (key==ASCII_KEY_PGDN) pdfapp_onkey(&gapp, ']');
|
||||
if (key==ASCII_KEY_PGUP) pdfapp_onkey(&gapp, '[');
|
||||
if (key==ASCII_KEY_HOME) pdfapp_onkey(&gapp, 'g');
|
||||
if (key==ASCII_KEY_END ) pdfapp_onkey(&gapp, 'G');
|
||||
if (key=='g' ) pdfapp_onkey(&gapp, 'c');
|
||||
if ((key=='[' ) || (key=='l')) PageRotateLeft();
|
||||
if ((key==']' ) || (key=='r')) PageRotateRight();
|
||||
if (key==ASCII_KEY_DOWN ) PageScrollDown();
|
||||
if (key==ASCII_KEY_UP ) PageScrollUp();
|
||||
if (key=='-') PageZoomOut();
|
||||
if ((key=='=') || (key=='+')) PageZoomIn();
|
||||
break;
|
||||
|
||||
case evButton:
|
||||
butt = __menuet__get_button_id();
|
||||
if(butt==1) __menuet__sys_exit();
|
||||
if(butt==10) RunOpenApp();
|
||||
if(butt==11) PageZoomOut(); //magnify -
|
||||
if(butt==12) PageZoomIn(); //magnify +
|
||||
if(butt==13) //show help
|
||||
{
|
||||
kol_paint_bar(0, TOOLBAR_HEIGHT, Form.client_width, Form.client_height - TOOLBAR_HEIGHT, 0xF2F2F2);
|
||||
__menuet__write_text(20, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0);
|
||||
__menuet__write_text(21, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0);
|
||||
for (ii=0; help[ii]!=0; ii++) {
|
||||
__menuet__write_text(20, TOOLBAR_HEIGHT + 60 + ii * 15, 0x80000000, help[ii], 0);
|
||||
case evKey:
|
||||
key = __menuet__getkey();
|
||||
if (key_mode_enter_page_number)
|
||||
{
|
||||
HandleNewPageNumber(key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(butt==14) pdfapp_onkey(&gapp, '['); //previous page
|
||||
if(butt==15) pdfapp_onkey(&gapp, ']'); //next page
|
||||
if(butt==16) PageRotateLeft();
|
||||
if(butt==17) PageRotateRight();
|
||||
if(butt==20) GetNewPageNumber();
|
||||
break;
|
||||
if (key==ASCII_KEY_ESC) DrawWindow(); //close help
|
||||
if (key==ASCII_KEY_PGDN) pdfapp_onkey(&gapp, ']');
|
||||
if (key==ASCII_KEY_PGUP) pdfapp_onkey(&gapp, '[');
|
||||
if (key==ASCII_KEY_HOME) pdfapp_onkey(&gapp, 'g');
|
||||
if (key==ASCII_KEY_END ) pdfapp_onkey(&gapp, 'G');
|
||||
if (key=='g' ) pdfapp_onkey(&gapp, 'c');
|
||||
if ((key=='[' ) || (key=='l')) PageRotateLeft();
|
||||
if ((key==']' ) || (key=='r')) PageRotateRight();
|
||||
if (key==ASCII_KEY_DOWN ) PageScrollDown();
|
||||
if (key==ASCII_KEY_UP ) PageScrollUp();
|
||||
if (key=='-') PageZoomOut();
|
||||
if ((key=='=') || (key=='+')) PageZoomIn();
|
||||
break;
|
||||
|
||||
case evMouse:
|
||||
if (mouse_wheels_state = kos_get_mouse_wheels())
|
||||
{
|
||||
if (mouse_wheels_state==1) { PageScrollDown(); PageScrollDown(); }
|
||||
if (mouse_wheels_state==-1) { PageScrollUp(); PageScrollUp(); }
|
||||
}
|
||||
//sprintf (debugstr, "mouse_wheels_state: %d \n", mouse_wheels_state);
|
||||
//kol_board_puts(debugstr);
|
||||
//pdfapp_onmouse(&gapp, int x, int y, int btn, int modifiers, int state)
|
||||
break;
|
||||
case evButton:
|
||||
butt = __menuet__get_button_id();
|
||||
if(butt==1) exit(0);
|
||||
if(butt==10) RunOpenApp(argv[0]);
|
||||
if(butt==11) PageZoomOut(); //magnify -
|
||||
if(butt==12) PageZoomIn(); //magnify +
|
||||
if(butt==13) //show help
|
||||
{
|
||||
kol_paint_bar(0, TOOLBAR_HEIGHT, Form.client_width, Form.client_height - TOOLBAR_HEIGHT, 0xF2F2F2);
|
||||
__menuet__write_text(20, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0);
|
||||
__menuet__write_text(21, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0);
|
||||
for (ii=0; help[ii]!=0; ii++) {
|
||||
__menuet__write_text(20, TOOLBAR_HEIGHT + 60 + ii * 15, 0x80000000, help[ii], 0);
|
||||
}
|
||||
}
|
||||
if(butt==14) pdfapp_onkey(&gapp, '['); //previous page
|
||||
if(butt==15) pdfapp_onkey(&gapp, ']'); //next page
|
||||
if(butt==16) PageRotateLeft();
|
||||
if(butt==17) PageRotateRight();
|
||||
if(butt==20) GetNewPageNumber();
|
||||
break;
|
||||
|
||||
case evMouse:
|
||||
if (mouse_wheels_state = kos_get_mouse_wheels())
|
||||
{
|
||||
if (mouse_wheels_state==1) { PageScrollDown(); PageScrollDown(); }
|
||||
if (mouse_wheels_state==-1) { PageScrollUp(); PageScrollUp(); }
|
||||
}
|
||||
//sprintf (debugstr, "mouse_wheels_state: %d \n", mouse_wheels_state);
|
||||
//kol_board_puts(debugstr);
|
||||
//pdfapp_onmouse(&gapp, int x, int y, int btn, int modifiers, int state)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "fitz.h"
|
||||
#include "mupdf.h"
|
||||
#include "pdfapp.h"
|
||||
#include "kolibri.h"
|
||||
|
||||
#include <ctype.h> /* for tolower() */
|
||||
|
||||
@ -109,12 +110,12 @@ static void pdfapp_open_pdf(pdfapp_t *app, char *filename, int fd)
|
||||
/*
|
||||
* Open PDF and load xref table
|
||||
*/
|
||||
__menuet__debug_out("FZ OPEN\n");
|
||||
kol_board_puts("FZ OPEN\n");
|
||||
//file = fz_open_fd(fd);
|
||||
__menuet__debug_out("FZ ready\n");
|
||||
kol_board_puts("FZ ready\n");
|
||||
error = pdf_open_xref(&app->xref, filename, NULL);
|
||||
if (error){
|
||||
__menuet__debug_out("FZ can't open\n");
|
||||
kol_board_puts("FZ can't open\n");
|
||||
pdfapp_error(app, fz_rethrow(error, "cannot open document '%s'", filename));}
|
||||
fz_close(file);
|
||||
|
||||
@ -160,16 +161,16 @@ __menuet__debug_out("FZ OPEN\n");
|
||||
/*
|
||||
* Start at first page
|
||||
*/
|
||||
__menuet__debug_out("Start at first page\n");
|
||||
kol_board_puts("Start at first page\n");
|
||||
|
||||
error = pdf_load_page_tree(app->xref);
|
||||
if (error) {
|
||||
__menuet__debug_out("Can't load tree\n");
|
||||
kol_board_puts("Can't load tree\n");
|
||||
pdfapp_error(app, fz_rethrow(error, "cannot load page tree"));}
|
||||
|
||||
__menuet__debug_out("Page counter\n");
|
||||
kol_board_puts("Page counter\n");
|
||||
app->pagecount = pdf_count_pages(app->xref);
|
||||
__menuet__debug_out("All is set!\n");
|
||||
kol_board_puts("All is set!\n");
|
||||
}
|
||||
|
||||
void pdfapp_open(pdfapp_t *app, char *filename, int fd, int reload)
|
||||
@ -375,7 +376,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai
|
||||
|
||||
if (app->shrinkwrap)
|
||||
{
|
||||
__menuet__debug_out ("SHRINK\n");
|
||||
kol_board_puts ("SHRINK\n");
|
||||
int w = app->image->w;
|
||||
int h = app->image->h;
|
||||
if (app->winw == w)
|
||||
|
23
contrib/media/updf/apps/resource.h
Executable file
23
contrib/media/updf/apps/resource.h
Executable file
@ -0,0 +1,23 @@
|
||||
#include <time.h>
|
||||
|
||||
struct rusage {
|
||||
struct timeval ru_utime; /* user time used */
|
||||
struct timeval ru_stime; /* system time used */
|
||||
long ru_maxrss; /* integral max resident set size */
|
||||
long ru_ixrss; /* integral shared text memory size */
|
||||
long ru_idrss; /* integral unshared data size */
|
||||
long ru_isrss; /* integral unshared stack size */
|
||||
long ru_minflt; /* page reclaims */
|
||||
long ru_majflt; /* page faults */
|
||||
long ru_nswap; /* swaps */
|
||||
long ru_inblock; /* block input operations */
|
||||
long ru_oublock; /* block output operations */
|
||||
long ru_msgsnd; /* messages sent */
|
||||
long ru_msgrcv; /* messages received */
|
||||
long ru_nsignals; /* signals received */
|
||||
long ru_nvcsw; /* voluntary context switches */
|
||||
long ru_nivcsw; /* involuntary context switches */
|
||||
};
|
||||
|
||||
/// STUB ///
|
||||
int getrusage(int _who, struct rusage *_rusage) {};
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
rm mupdf
|
||||
rm -rf build
|
||||
make -f Makefile_2
|
||||
mv build/mupdf ./
|
||||
objcopy mupdf -O binary
|
||||
sleep 10
|
29
contrib/media/updf/build_libs.sh
Executable file
29
contrib/media/updf/build_libs.sh
Executable file
@ -0,0 +1,29 @@
|
||||
# BUILD ONLY LIBRARIES
|
||||
|
||||
mkdir lib
|
||||
|
||||
cd SYSCALL/src
|
||||
make
|
||||
cd ../..
|
||||
|
||||
cd fitz
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd pdf
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd libopenjpeg
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd libjbig2dec
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd draw
|
||||
make
|
||||
cd ..
|
||||
|
||||
sleep 100
|
19
contrib/media/updf/draw/Makefile
Executable file
19
contrib/media/updf/draw/Makefile
Executable file
@ -0,0 +1,19 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
|
||||
SDK_DIR = $(abspath ../../../sdk)
|
||||
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I ../fitz
|
||||
|
||||
DRAW_SRC := $(notdir $(wildcard *.c))
|
||||
OBJECTS = $(patsubst %.c, %.o, $(DRAW_SRC))
|
||||
|
||||
default: $(patsubst %.c,%.o,$(DRAW_SRC))
|
||||
ar rcs libdraw.a $(OBJECTS)
|
||||
rm *.o
|
||||
mv libdraw.a ../lib
|
||||
|
||||
%.o : %.c Makefile $(DRAW_SRC)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
19
contrib/media/updf/fitz/Makefile
Executable file
19
contrib/media/updf/fitz/Makefile
Executable file
@ -0,0 +1,19 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
|
||||
SDK_DIR = $(abspath ../../../sdk)
|
||||
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include -I $(SDK_DIR)/sources/libjpeg -I $(SDK_DIR)/sources/zlib -I ../libopenjpeg -I ../libjbig2dec
|
||||
|
||||
FITZ_SRC := $(notdir $(wildcard *.c))
|
||||
OBJECTS = $(patsubst %.c, %.o, $(FITZ_SRC))
|
||||
|
||||
default: $(patsubst %.c,%.o,$(FITZ_SRC))
|
||||
ar rcs libfitz.a *.o
|
||||
rm *.o
|
||||
mv libfitz.a ../lib
|
||||
|
||||
%.o : %.c Makefile $(FITZ_SRC)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
@ -1,5 +1,5 @@
|
||||
#include <math.h>
|
||||
|
||||
/*
|
||||
long long int lrintf(float x) {
|
||||
return floor(x);
|
||||
}
|
||||
}*/
|
||||
|
@ -1,23 +0,0 @@
|
||||
#ifndef __GPL_stuff_h__
|
||||
#define __GPL_stuff_h__
|
||||
|
||||
#define GPL_base_text \
|
||||
"Yacas is Free Software--Free as in Freedom--so you can redistribute Yacas or\n" \
|
||||
"modify it under certain conditions. Yacas comes with ABSOLUTELY NO WARRANTY.\n" \
|
||||
"See the GNU General Public License (GPL) for the full conditions.\n"
|
||||
|
||||
#define Yacas_Web_info \
|
||||
"See http://yacas.sf.net for more information and documentation on Yacas.\n"
|
||||
|
||||
#define Yacas_help_info \
|
||||
"Type ?license or ?licence to see the GPL; type ?warranty for warranty info.\n"
|
||||
|
||||
// This is the full text for systems where the online help (?blah) is available
|
||||
#define GPL_blurb GPL_base_text Yacas_help_info Yacas_Web_info "\n"
|
||||
|
||||
// This is for systems where online help (?blah) is normally not available
|
||||
#define GPL_blurb_nohelp GPL_base_text Yacas_Web_info "\n"
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,17 +0,0 @@
|
||||
#ifndef _ALGORITHM_INCLUDED
|
||||
#define _ALGORITHM_INCLUDED
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
namespace std
|
||||
{
|
||||
static bool (*__cmpfn)(const void* elem1, const void* elem2);
|
||||
static int __compare(const void* elem1, const void* elem2)
|
||||
{return __cmpfn(elem1,elem2)?-1:1;}
|
||||
template<class T, class Pred>
|
||||
void sort(T* first, T* last, Pred pr)
|
||||
{
|
||||
__cmpfn=(bool(*)(const void*,const void*))pr;
|
||||
qsort(first,last-first,sizeof(*first),&__compare);
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
|
||||
/// ===========================================================
|
||||
|
||||
#include "kolibri.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
|
||||
#include "globals.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include "console.c"
|
||||
|
||||
#include "cmd_about.c"
|
||||
#include "cmd_help.c"
|
||||
#include "cmd_ver.c"
|
||||
#include "cmd_pwd.c"
|
||||
#include "cmd_ls.c"
|
||||
#include "cmd_ps.c"
|
||||
#include "cmd_kill.c"
|
||||
#include "cmd_echo.c"
|
||||
#include "cmd_date.c"
|
||||
#include "cmd_exit.c"
|
||||
#include "cmd_cd.c"
|
||||
#include "cmd_free.c"
|
||||
#include "cmd_reboot.c"
|
||||
#include "cmd_mkdir.c"
|
||||
#include "cmd_rmdir.c"
|
||||
#include "cmd_rm.c"
|
||||
#include "cmd_touch.c"
|
||||
#include "cmd_alias.c"
|
||||
#include "cmd_more.c"
|
||||
#include "cmd_clear.c"
|
||||
|
||||
#include "module_command.c"
|
||||
#include "module_program.c"
|
||||
#include "module_script.c"
|
||||
#include "module_executable.c"
|
||||
#include "module_alias.c"
|
||||
|
||||
/// ===========================================================
|
@ -1,251 +0,0 @@
|
||||
/* ANSI and traditional C compatability macros
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
PTR `void *' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
VOLATILE `volatile' `'
|
||||
SIGNED `signed' `'
|
||||
PTRCONST `void *const' `char *'
|
||||
ANSI_PROTOTYPES 1 not defined
|
||||
|
||||
CONST is also defined, but is obsolete. Just use const.
|
||||
|
||||
obsolete -- DEFUN (name, arglist, args)
|
||||
|
||||
Defines function NAME.
|
||||
|
||||
ARGLIST lists the arguments, separated by commas and enclosed in
|
||||
parentheses. ARGLIST becomes the argument list in traditional C.
|
||||
|
||||
ARGS list the arguments with their types. It becomes a prototype in
|
||||
ANSI C, and the type declarations in traditional C. Arguments should
|
||||
be separated with `AND'. For functions with a variable number of
|
||||
arguments, the last thing listed should be `DOTS'.
|
||||
|
||||
obsolete -- DEFUN_VOID (name)
|
||||
|
||||
Defines a function NAME, which takes no arguments.
|
||||
|
||||
obsolete -- EXFUN (name, (prototype)) -- obsolete.
|
||||
|
||||
Replaced by PARAMS. Do not use; will disappear someday soon.
|
||||
Was used in external function declarations.
|
||||
In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
|
||||
parentheses). In traditional C it is `NAME()'.
|
||||
For a function that takes no arguments, PROTOTYPE should be `(void)'.
|
||||
|
||||
obsolete -- PROTO (type, name, (prototype) -- obsolete.
|
||||
|
||||
This one has also been replaced by PARAMS. Do not use.
|
||||
|
||||
PARAMS ((args))
|
||||
|
||||
We could use the EXFUN macro to handle prototype declarations, but
|
||||
the name is misleading and the result is ugly. So we just define a
|
||||
simple macro to handle the parameter lists, as in:
|
||||
|
||||
static int foo PARAMS ((int, char));
|
||||
|
||||
This produces: `static int foo();' or `static int foo (int, char);'
|
||||
|
||||
EXFUN would have done it like this:
|
||||
|
||||
static int EXFUN (foo, (int, char));
|
||||
|
||||
but the function is not external...and it's hard to visually parse
|
||||
the function name out of the mess. EXFUN should be considered
|
||||
obsolete; new code should be written to use PARAMS.
|
||||
|
||||
DOTS is also obsolete.
|
||||
|
||||
Examples:
|
||||
|
||||
extern int printf PARAMS ((const char *format, ...));
|
||||
*/
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
||||
/* All known AIX compilers implement these things (but don't always
|
||||
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||
in SVR4 mode, but does not define __STDC__. */
|
||||
|
||||
#define PTR void *
|
||||
#define PTRCONST void *CONST
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define AND ,
|
||||
#define NOARGS void
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#define PARAMS(paramlist) paramlist
|
||||
#define ANSI_PROTOTYPES 1
|
||||
|
||||
#define VPARAMS(ARGS) ARGS
|
||||
#define VA_START(va_list,var) va_start(va_list,var)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST const
|
||||
#define DOTS , ...
|
||||
#define PROTO(type, name, arglist) type name arglist
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(void)
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define AND ;
|
||||
#define NOARGS
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
#endif /* !IN_GCC */
|
||||
|
||||
#ifndef const /* some systems define it in header files for non-ansi mode */
|
||||
#define const
|
||||
#endif
|
||||
|
||||
#define PARAMS(paramlist) ()
|
||||
|
||||
#define VPARAMS(ARGS) (va_alist) va_dcl
|
||||
#define VA_START(va_list,var) va_start(va_list)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST
|
||||
#define DOTS
|
||||
#define PROTO(type, name, arglist) type name ()
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||
older preprocessors. Thus we can't define something like this:
|
||||
|
||||
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||
|
||||
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||
|
||||
So instead we use the macro below and test it against specific values. */
|
||||
|
||||
/* This macro simplifies testing whether we are using gcc, and if it
|
||||
is of a particular minimum version. (Both major & minor numbers are
|
||||
significant.) This macro will evaluate to 0 if we are not using
|
||||
gcc at all. */
|
||||
#ifndef GCC_VERSION
|
||||
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
/* Define macros for some gcc attributes. This permits us to use the
|
||||
macros freely, and know that they will come into play for the
|
||||
version of gcc in which they are supported. */
|
||||
|
||||
#if (GCC_VERSION < 2007)
|
||||
# define __attribute__(x)
|
||||
#endif
|
||||
|
||||
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# if (GCC_VERSION >= 2096)
|
||||
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC
|
||||
# endif /* GNUC >= 2.96 */
|
||||
#endif /* ATTRIBUTE_MALLOC */
|
||||
|
||||
/* Attributes on labels were valid as of gcc 2.93. */
|
||||
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||
# if (GCC_VERSION >= 2093)
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif /* GNUC >= 2.93 */
|
||||
#endif /* ATTRIBUTE_UNUSED_LABEL */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif /* ATTRIBUTE_NORETURN */
|
||||
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_PRINTF */
|
||||
|
||||
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||
about GCC extensions. This feature didn't work properly before
|
||||
gcc 2.8. */
|
||||
#if GCC_VERSION < 2008
|
||||
#define __extension__
|
||||
#endif
|
||||
|
||||
/* Bootstrap support: Autoconf will possibly define the `inline' or
|
||||
`const' keywords as macros, however this is only valid for the
|
||||
stage1 compiler. If we detect a modern version of gcc,
|
||||
unconditionally reset the values. This makes sure the right thing
|
||||
happens in stage2 and later. We need to do this very early;
|
||||
i.e. before any header files that might use these keywords.
|
||||
Otherwise conflicts might occur. */
|
||||
|
||||
#if (GCC_VERSION >= 2007)
|
||||
# ifdef __STDC__
|
||||
# undef const
|
||||
# endif
|
||||
# undef inline
|
||||
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
||||
# ifndef HAVE_LONG_DOUBLE
|
||||
# define HAVE_LONG_DOUBLE 1
|
||||
# endif
|
||||
#endif /* GCC >= 2.7 */
|
||||
|
||||
#endif /* ansidecl.h */
|
@ -1,102 +0,0 @@
|
||||
|
||||
#ifndef __anumber_h__
|
||||
#define __anumber_h__
|
||||
|
||||
#include "grower.h"
|
||||
#include "yacasbase.h"
|
||||
#include "lispassert.h"
|
||||
#include "lispstring.h"
|
||||
|
||||
|
||||
|
||||
/* Quantities derived from the platform-dependent types for doing
|
||||
* arithmetic.
|
||||
*/
|
||||
|
||||
#define WordBits (8*sizeof(PlatWord))
|
||||
#define WordBase (((PlatDoubleWord)1)<<WordBits)
|
||||
#define WordMask (WordBase-1)
|
||||
|
||||
// The default is 8, but it is suspected mose numbers will be short integers that fit into
|
||||
// one or two words. For these numbers memory allocation will be a lot more friendly.
|
||||
class ANumberOps : public ArrOpsPOD<PlatWord>
|
||||
{
|
||||
public:
|
||||
ANumberOps() {}
|
||||
inline int granularity() const { return 2; }
|
||||
};
|
||||
|
||||
|
||||
/* Class ANumber represents an arbitrary precision number. it is
|
||||
* basically an array of PlatWord objects, with the first element
|
||||
* being the least significant. iExp <= 0 for integers.
|
||||
*/
|
||||
class ANumber : public CArrayGrower<PlatWord,ANumberOps>
|
||||
{
|
||||
public:
|
||||
typedef CArrayGrower<PlatWord,ANumberOps> ASuper;
|
||||
public:
|
||||
ANumber(const LispChar * aString,LispInt aPrecision,LispInt aBase=10);
|
||||
ANumber(LispInt aPrecision);
|
||||
ANumber(PlatWord *aArray, LispInt aSize, LispInt aPrecision);
|
||||
//TODO the properties of this object are set in the member initialization list, but then immediately overwritten by the CopyFrom. We can make this slightly cleaner by only initializing once.
|
||||
inline ANumber(ANumber& aOther) : ASuper(),iExp(0),iNegative(LispFalse),iPrecision(0),iTensExp(0)
|
||||
{
|
||||
CopyFrom(aOther);
|
||||
}
|
||||
~ANumber();
|
||||
void CopyFrom(const ANumber& aOther);
|
||||
LispBoolean ExactlyEqual(const ANumber& aOther);
|
||||
void SetTo(const LispChar * aString,LispInt aBase=10);
|
||||
inline void SetPrecision(LispInt aPrecision) {iPrecision = aPrecision;}
|
||||
void ChangePrecision(LispInt aPrecision);
|
||||
void RoundBits(void);
|
||||
void DropTrailZeroes();
|
||||
|
||||
public:
|
||||
LispInt iExp;
|
||||
LispInt iNegative;
|
||||
LispInt iPrecision;
|
||||
LispInt iTensExp;
|
||||
};
|
||||
|
||||
inline LispBoolean IsPositive(ANumber& a) { return !a.iNegative; }
|
||||
inline LispBoolean IsNegative(ANumber& a) { return a.iNegative; }
|
||||
inline LispBoolean IsEven(ANumber& a) { return ((a[0]&1) == 0); }
|
||||
inline LispBoolean IsOdd(ANumber& a) { return ((a[0]&1) == 1); }
|
||||
inline LispInt Precision(ANumber& a) { return !a.iPrecision; }
|
||||
|
||||
LispBoolean BaseLessThan(ANumber& a1, ANumber& a2);
|
||||
void BaseDivide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2);
|
||||
|
||||
void IntegerDivide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2);
|
||||
|
||||
LispBoolean Significant(ANumber& a);
|
||||
|
||||
LispInt WordDigits(LispInt aPrecision, LispInt aBase);
|
||||
|
||||
// Operations on ANumber.
|
||||
void Negate(ANumber& aNumber);
|
||||
void ANumberToString(LispString& aResult, ANumber& aNumber, LispInt aBase, LispBoolean aForceFloat=0);
|
||||
void Add(ANumber& aResult, ANumber& a1, ANumber& a2);
|
||||
void Subtract(ANumber& aResult, ANumber& a1, ANumber& a2);
|
||||
void Multiply(ANumber& aResult, ANumber& a1, ANumber& a2);
|
||||
void Divide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2);
|
||||
LispBoolean GreaterThan(ANumber& a1, ANumber& a2);
|
||||
LispBoolean LessThan(ANumber& a1, ANumber& a2);
|
||||
void BaseShiftRight(ANumber& a, LispInt aNrBits);
|
||||
void BaseShiftLeft(ANumber& a, LispInt aNrBits);
|
||||
void BaseGcd(ANumber& aResult, ANumber& a1, ANumber& a2);
|
||||
void Sqrt(ANumber& aResult, ANumber& N);
|
||||
|
||||
void PrintNumber(char* prefix,ANumber& aNumber);
|
||||
|
||||
#define CORRECT_DIVISION
|
||||
void NormalizeFloat(ANumber& a2, LispInt digitsNeeded);
|
||||
|
||||
|
||||
#include "anumber.inl"
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,20 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#ifndef _AR_H_
|
||||
#define _AR_H_
|
||||
|
||||
#define ARMAG "!<arch>\n"
|
||||
#define SARMAG 8
|
||||
|
||||
#define ARFMAG "`\n"
|
||||
|
||||
struct ar_hdr {
|
||||
char ar_name[16];
|
||||
char ar_date[12];
|
||||
char ar_uid[6];
|
||||
char ar_gid[6];
|
||||
char ar_mode[8];
|
||||
char ar_size[10];
|
||||
char ar_fmag[2];
|
||||
};
|
||||
|
||||
#endif
|
@ -1,16 +0,0 @@
|
||||
|
||||
#ifndef __archiver_h__
|
||||
#define __archiver_h__
|
||||
|
||||
#include "yacasbase.h"
|
||||
#include "compressedfiles.h"
|
||||
|
||||
class CCompressedArchive : public YacasBase
|
||||
{
|
||||
public:
|
||||
CCompressedArchive(unsigned char * aBuffer, LispInt aFullSize, LispInt aCompressed);
|
||||
CompressedFiles iFiles;
|
||||
};
|
||||
|
||||
#endif // __archiver_h__
|
||||
|
@ -1,47 +0,0 @@
|
||||
|
||||
#ifndef __arggetter_h__
|
||||
#define __arggetter_h__
|
||||
|
||||
#include "yacasbase.h"
|
||||
|
||||
|
||||
|
||||
/// Get an argument that should be a (long) integer
|
||||
LispString * GetIntegerArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
/// Get a string (atom)
|
||||
LispString * GetStringArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
/// Get the atomic string of the argument
|
||||
LispString * GetAtomArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
/// Get an argument that should be a short integer
|
||||
LispInt GetShortIntegerArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
/// Get a list argument
|
||||
void GetListArgument(LispPtr& aResult, LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
/// Get a void* pointer to a struct encapsulated in a generic class
|
||||
void* GetVoidStruct(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr, LispChar * aTypeString);
|
||||
|
||||
|
||||
#define ListArgument(_list,_argnr) LispPtr _list; GetListArgument(_list, aEnvironment,aStackTop,_argnr)
|
||||
#define IntegerArgument(_i,_argnr) LispString * _i = GetIntegerArgument(aEnvironment,aStackTop,_argnr)
|
||||
#define ShortIntegerArgument(_i,_argnr) LispInt _i = GetShortIntegerArgument(aEnvironment,aStackTop,_argnr)
|
||||
#define InpStringArgument(_i,_argnr) LispChar * _i = GetStringArgument(aEnvironment,aStackTop,_argnr)->c_str()
|
||||
|
||||
#define DoubleFloatArgument(_i,_argnr) double _i = GetDoubleFloatArgument(aEnvironment,aStackTop,_argnr)
|
||||
#define VoidStructArgument(_typ,_i,_argnr,_name) _typ _i = (_typ)GetVoidStruct(aEnvironment,aStackTop,_argnr,_name)
|
||||
|
||||
|
||||
void ReturnShortInteger(LispEnvironment& aEnvironment,
|
||||
LispPtr& aResult, LispInt r);
|
||||
void SetShortIntegerConstant(LispEnvironment& aEnvironment,
|
||||
LispChar * aName,
|
||||
LispInt aValue);
|
||||
double GetDoubleFloatArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr);
|
||||
void ReturnDoubleFloat(LispEnvironment& aEnvironment,LispPtr& aResult, double r);
|
||||
void ReturnVoidStruct(LispEnvironment& aEnvironment,
|
||||
LispPtr& aResult,
|
||||
LispChar * aName,
|
||||
void* aData,
|
||||
void (*aFree)(void*));
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1993
|
||||
* The Regents of the University of California. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
|
||||
*
|
||||
* @(#)ftp.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_FTP_H
|
||||
#define _ARPA_FTP_H
|
||||
|
||||
/* Definitions for FTP; see RFC-765. */
|
||||
|
||||
/*
|
||||
* Reply codes.
|
||||
*/
|
||||
#define PRELIM 1 /* positive preliminary */
|
||||
#define COMPLETE 2 /* positive completion */
|
||||
#define CONTINUE 3 /* positive intermediate */
|
||||
#define TRANSIENT 4 /* transient negative completion */
|
||||
#define ERROR 5 /* permanent negative completion */
|
||||
|
||||
/*
|
||||
* Type codes
|
||||
*/
|
||||
#define TYPE_A 1 /* ASCII */
|
||||
#define TYPE_E 2 /* EBCDIC */
|
||||
#define TYPE_I 3 /* image */
|
||||
#define TYPE_L 4 /* local byte size */
|
||||
|
||||
#ifdef FTP_NAMES
|
||||
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Form codes
|
||||
*/
|
||||
#define FORM_N 1 /* non-print */
|
||||
#define FORM_T 2 /* telnet format effectors */
|
||||
#define FORM_C 3 /* carriage control (ASA) */
|
||||
#ifdef FTP_NAMES
|
||||
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structure codes
|
||||
*/
|
||||
#define STRU_F 1 /* file (no record structure) */
|
||||
#define STRU_R 2 /* record structure */
|
||||
#define STRU_P 3 /* page structure */
|
||||
#ifdef FTP_NAMES
|
||||
char *strunames[] = {"0", "File", "Record", "Page" };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mode types
|
||||
*/
|
||||
#define MODE_S 1 /* stream */
|
||||
#define MODE_B 2 /* block */
|
||||
#define MODE_C 3 /* compressed */
|
||||
#ifdef FTP_NAMES
|
||||
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Record Tokens
|
||||
*/
|
||||
#define REC_ESC '\377' /* Record-mode Escape */
|
||||
#define REC_EOR '\001' /* Record-mode End-of-Record */
|
||||
#define REC_EOF '\002' /* Record-mode End-of-File */
|
||||
|
||||
/*
|
||||
* Block Header
|
||||
*/
|
||||
#define BLK_EOR 0x80 /* Block is End-of-Record */
|
||||
#define BLK_EOF 0x40 /* Block is End-of-File */
|
||||
#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
|
||||
#define BLK_RESTART 0x10 /* Block is Restart Marker */
|
||||
|
||||
#define BLK_BYTECOUNT 2 /* Bytes in this block */
|
||||
|
||||
#endif /* !_ARPA_FTP_H */
|
@ -1,24 +0,0 @@
|
||||
#ifndef _ARPA_INET_H
|
||||
#define _ARPA_INET_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int inet_aton(const char* cp, struct in_addr* inp) ;
|
||||
unsigned long int inet_addr(const char* cp) ;
|
||||
unsigned long int inet_network(const char* cp) ;
|
||||
char* inet_ntoa(struct in_addr in) ;
|
||||
char* inet_ntoa_r(struct in_addr in,char* buf) ;
|
||||
struct in_addr inet_makeaddr(int net, int host) ;
|
||||
unsigned long int inet_lnaof(struct in_addr in) ;
|
||||
unsigned long int inet_netof(struct in_addr in) ;
|
||||
|
||||
int inet_pton (int AF, const char* CP, void* BUF) ;
|
||||
const char* inet_ntop (int AF, const void* CP, char* BUF, size_t LEN) ;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1,258 +0,0 @@
|
||||
#ifndef _ARPA_NAMESER_H
|
||||
#define _ARPA_NAMESER_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <endian.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define NS_PACKETSZ 512 /* maximum packet size */
|
||||
#define NS_MAXDNAME 1025 /* maximum domain name */
|
||||
#define NS_MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define NS_MAXLABEL 63 /* maximum length of domain label */
|
||||
#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||
#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||
#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
|
||||
#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
|
||||
#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
|
||||
#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
|
||||
#define NS_INADDRSZ 4 /* IPv4 T_A */
|
||||
#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
|
||||
#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
|
||||
#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
|
||||
|
||||
/*
|
||||
* Currently defined type values for resources and queries.
|
||||
*/
|
||||
typedef enum __ns_type {
|
||||
ns_t_invalid = 0, /* Cookie. */
|
||||
ns_t_a = 1, /* Host address. */
|
||||
ns_t_ns = 2, /* Authoritative server. */
|
||||
ns_t_md = 3, /* Mail destination. */
|
||||
ns_t_mf = 4, /* Mail forwarder. */
|
||||
ns_t_cname = 5, /* Canonical name. */
|
||||
ns_t_soa = 6, /* Start of authority zone. */
|
||||
ns_t_mb = 7, /* Mailbox domain name. */
|
||||
ns_t_mg = 8, /* Mail group member. */
|
||||
ns_t_mr = 9, /* Mail rename name. */
|
||||
ns_t_null = 10, /* Null resource record. */
|
||||
ns_t_wks = 11, /* Well known service. */
|
||||
ns_t_ptr = 12, /* Domain name pointer. */
|
||||
ns_t_hinfo = 13, /* Host information. */
|
||||
ns_t_minfo = 14, /* Mailbox information. */
|
||||
ns_t_mx = 15, /* Mail routing information. */
|
||||
ns_t_txt = 16, /* Text strings. */
|
||||
ns_t_rp = 17, /* Responsible person. */
|
||||
ns_t_afsdb = 18, /* AFS cell database. */
|
||||
ns_t_x25 = 19, /* X_25 calling address. */
|
||||
ns_t_isdn = 20, /* ISDN calling address. */
|
||||
ns_t_rt = 21, /* Router. */
|
||||
ns_t_nsap = 22, /* NSAP address. */
|
||||
ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
|
||||
ns_t_sig = 24, /* Security signature. */
|
||||
ns_t_key = 25, /* Security key. */
|
||||
ns_t_px = 26, /* X.400 mail mapping. */
|
||||
ns_t_gpos = 27, /* Geographical position (withdrawn). */
|
||||
ns_t_aaaa = 28, /* Ip6 Address. */
|
||||
ns_t_loc = 29, /* Location Information. */
|
||||
ns_t_nxt = 30, /* Next domain (security). */
|
||||
ns_t_eid = 31, /* Endpoint identifier. */
|
||||
ns_t_nimloc = 32, /* Nimrod Locator. */
|
||||
ns_t_srv = 33, /* Server Selection. */
|
||||
ns_t_atma = 34, /* ATM Address */
|
||||
ns_t_naptr = 35, /* Naming Authority PoinTeR */
|
||||
ns_t_kx = 36, /* Key Exchange */
|
||||
ns_t_cert = 37, /* Certification record */
|
||||
ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
|
||||
ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
|
||||
ns_t_sink = 40, /* Kitchen sink (experimentatl) */
|
||||
ns_t_opt = 41, /* EDNS0 option (meta-RR) */
|
||||
ns_t_tsig = 250, /* Transaction signature. */
|
||||
ns_t_ixfr = 251, /* Incremental zone transfer. */
|
||||
ns_t_axfr = 252, /* Transfer zone of authority. */
|
||||
ns_t_mailb = 253, /* Transfer mailbox records. */
|
||||
ns_t_maila = 254, /* Transfer mail agent records. */
|
||||
ns_t_any = 255, /* Wildcard match. */
|
||||
ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
|
||||
ns_t_max = 65536
|
||||
} ns_type;
|
||||
|
||||
/*
|
||||
* Values for class field
|
||||
*/
|
||||
typedef enum __ns_class {
|
||||
ns_c_invalid = 0, /* Cookie. */
|
||||
ns_c_in = 1, /* Internet. */
|
||||
ns_c_2 = 2, /* unallocated/unsupported. */
|
||||
ns_c_chaos = 3, /* MIT Chaos-net. */
|
||||
ns_c_hs = 4, /* MIT Hesiod. */
|
||||
/* Query class values which do not appear in resource records */
|
||||
ns_c_none = 254, /* for prereq. sections in update requests */
|
||||
ns_c_any = 255, /* Wildcard match. */
|
||||
ns_c_max = 65536
|
||||
} ns_class;
|
||||
|
||||
/*
|
||||
* Currently defined opcodes.
|
||||
*/
|
||||
typedef enum __ns_opcode {
|
||||
ns_o_query = 0, /* Standard query. */
|
||||
ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
|
||||
ns_o_status = 2, /* Name server status query (unsupported). */
|
||||
/* Opcode 3 is undefined/reserved. */
|
||||
ns_o_notify = 4, /* Zone change notification. */
|
||||
ns_o_update = 5, /* Zone update message. */
|
||||
ns_o_max = 6
|
||||
} ns_opcode;
|
||||
|
||||
/*
|
||||
* Currently defined response codes.
|
||||
*/
|
||||
typedef enum __ns_rcode {
|
||||
ns_r_noerror = 0, /* No error occurred. */
|
||||
ns_r_formerr = 1, /* Format error. */
|
||||
ns_r_servfail = 2, /* Server failure. */
|
||||
ns_r_nxdomain = 3, /* Name error. */
|
||||
ns_r_notimpl = 4, /* Unimplemented. */
|
||||
ns_r_refused = 5, /* Operation refused. */
|
||||
/* these are for BIND_UPDATE */
|
||||
ns_r_yxdomain = 6, /* Name exists */
|
||||
ns_r_yxrrset = 7, /* RRset exists */
|
||||
ns_r_nxrrset = 8, /* RRset does not exist */
|
||||
ns_r_notauth = 9, /* Not authoritative for zone */
|
||||
ns_r_notzone = 10, /* Zone of record different from zone section */
|
||||
ns_r_max = 11,
|
||||
/* The following are TSIG extended errors */
|
||||
ns_r_badsig = 16,
|
||||
ns_r_badkey = 17,
|
||||
ns_r_badtime = 18
|
||||
} ns_rcode;
|
||||
|
||||
typedef struct {
|
||||
unsigned id :16; /* query identification number */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned qr: 1; /* response flag */
|
||||
unsigned opcode: 4; /* purpose of message */
|
||||
unsigned aa: 1; /* authoritive answer */
|
||||
unsigned tc: 1; /* truncated message */
|
||||
unsigned rd: 1; /* recursion desired */
|
||||
/* fields in fourth byte */
|
||||
unsigned ra: 1; /* recursion available */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned cd: 1; /* checking disabled by resolver */
|
||||
unsigned rcode :4; /* response code */
|
||||
#endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned rd :1; /* recursion desired */
|
||||
unsigned tc :1; /* truncated message */
|
||||
unsigned aa :1; /* authoritive answer */
|
||||
unsigned opcode :4; /* purpose of message */
|
||||
unsigned qr :1; /* response flag */
|
||||
/* fields in fourth byte */
|
||||
unsigned rcode :4; /* response code */
|
||||
unsigned cd: 1; /* checking disabled by resolver */
|
||||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ra :1; /* recursion available */
|
||||
#endif
|
||||
/* remaining bytes */
|
||||
unsigned qdcount :16; /* number of question entries */
|
||||
unsigned ancount :16; /* number of answer entries */
|
||||
unsigned nscount :16; /* number of authority entries */
|
||||
unsigned arcount :16; /* number of resource entries */
|
||||
} HEADER;
|
||||
|
||||
#define PACKETSZ NS_PACKETSZ
|
||||
#define MAXDNAME NS_MAXDNAME
|
||||
#define MAXCDNAME NS_MAXCDNAME
|
||||
#define MAXLABEL NS_MAXLABEL
|
||||
#define HFIXEDSZ NS_HFIXEDSZ
|
||||
#define QFIXEDSZ NS_QFIXEDSZ
|
||||
#define RRFIXEDSZ NS_RRFIXEDSZ
|
||||
#define INT32SZ NS_INT32SZ
|
||||
#define INT16SZ NS_INT16SZ
|
||||
#define INADDRSZ NS_INADDRSZ
|
||||
#define IN6ADDRSZ NS_IN6ADDRSZ
|
||||
#define INDIR_MASK NS_CMPRSFLGS
|
||||
#define NAMESERVER_PORT NS_DEFAULTPORT
|
||||
|
||||
#define S_ZONE ns_s_zn
|
||||
#define S_PREREQ ns_s_pr
|
||||
#define S_UPDATE ns_s_ud
|
||||
#define S_ADDT ns_s_ar
|
||||
|
||||
#define QUERY ns_o_query
|
||||
#define IQUERY ns_o_iquery
|
||||
#define STATUS ns_o_status
|
||||
#define NS_NOTIFY_OP ns_o_notify
|
||||
#define NS_UPDATE_OP ns_o_update
|
||||
|
||||
#define NOERROR ns_r_noerror
|
||||
#define FORMERR ns_r_formerr
|
||||
#define SERVFAIL ns_r_servfail
|
||||
#define NXDOMAIN ns_r_nxdomain
|
||||
#define NOTIMP ns_r_notimpl
|
||||
#define REFUSED ns_r_refused
|
||||
#define YXDOMAIN ns_r_yxdomain
|
||||
#define YXRRSET ns_r_yxrrset
|
||||
#define NXRRSET ns_r_nxrrset
|
||||
#define NOTAUTH ns_r_notauth
|
||||
#define NOTZONE ns_r_notzone
|
||||
|
||||
#define DELETE ns_uop_delete
|
||||
#define ADD ns_uop_add
|
||||
|
||||
#define T_A ns_t_a
|
||||
#define T_NS ns_t_ns
|
||||
#define T_MD ns_t_md
|
||||
#define T_MF ns_t_mf
|
||||
#define T_CNAME ns_t_cname
|
||||
#define T_SOA ns_t_soa
|
||||
#define T_MB ns_t_mb
|
||||
#define T_MG ns_t_mg
|
||||
#define T_MR ns_t_mr
|
||||
#define T_NULL ns_t_null
|
||||
#define T_WKS ns_t_wks
|
||||
#define T_PTR ns_t_ptr
|
||||
#define T_HINFO ns_t_hinfo
|
||||
#define T_MINFO ns_t_minfo
|
||||
#define T_MX ns_t_mx
|
||||
#define T_TXT ns_t_txt
|
||||
#define T_RP ns_t_rp
|
||||
#define T_AFSDB ns_t_afsdb
|
||||
#define T_X25 ns_t_x25
|
||||
#define T_ISDN ns_t_isdn
|
||||
#define T_RT ns_t_rt
|
||||
#define T_NSAP ns_t_nsap
|
||||
#define T_NSAP_PTR ns_t_nsap_ptr
|
||||
#define T_SIG ns_t_sig
|
||||
#define T_KEY ns_t_key
|
||||
#define T_PX ns_t_px
|
||||
#define T_GPOS ns_t_gpos
|
||||
#define T_AAAA ns_t_aaaa
|
||||
#define T_LOC ns_t_loc
|
||||
#define T_NXT ns_t_nxt
|
||||
#define T_EID ns_t_eid
|
||||
#define T_NIMLOC ns_t_nimloc
|
||||
#define T_SRV ns_t_srv
|
||||
#define T_ATMA ns_t_atma
|
||||
#define T_NAPTR ns_t_naptr
|
||||
#define T_TSIG ns_t_tsig
|
||||
#define T_IXFR ns_t_ixfr
|
||||
#define T_AXFR ns_t_axfr
|
||||
#define T_MAILB ns_t_mailb
|
||||
#define T_MAILA ns_t_maila
|
||||
#define T_ANY ns_t_any
|
||||
|
||||
#define C_IN ns_c_in
|
||||
#define C_CHAOS ns_c_chaos
|
||||
#define C_HS ns_c_hs
|
||||
#define C_NONE ns_c_none
|
||||
#define C_ANY ns_c_any
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1,319 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
|
||||
*
|
||||
* @(#)telnet.h 8.2 (Berkeley) 12/15/93
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_TELNET_H
|
||||
#define _ARPA_TELNET_H
|
||||
|
||||
/*
|
||||
* Definitions for the TELNET protocol.
|
||||
*/
|
||||
#define IAC 255 /* interpret as command: */
|
||||
#define DONT 254 /* you are not to use option */
|
||||
#define DO 253 /* please, you use option */
|
||||
#define WONT 252 /* I won't use option */
|
||||
#define WILL 251 /* I will use option */
|
||||
#define SB 250 /* interpret as subnegotiation */
|
||||
#define GA 249 /* you may reverse the line */
|
||||
#define EL 248 /* erase the current line */
|
||||
#define EC 247 /* erase the current character */
|
||||
#define AYT 246 /* are you there */
|
||||
#define AO 245 /* abort output--but let prog finish */
|
||||
#define IP 244 /* interrupt process--permanently */
|
||||
#define BREAK 243 /* break */
|
||||
#define DM 242 /* data mark--for connect. cleaning */
|
||||
#define NOP 241 /* nop */
|
||||
#define SE 240 /* end sub negotiation */
|
||||
#define EOR 239 /* end of record (transparent mode) */
|
||||
#define ABORT 238 /* Abort process */
|
||||
#define SUSP 237 /* Suspend process */
|
||||
#define xEOF 236 /* End of file: EOF is already used... */
|
||||
|
||||
#define SYNCH 242 /* for telfunc calls */
|
||||
|
||||
#ifdef TELCMDS
|
||||
char *telcmds[] = {
|
||||
"EOF", "SUSP", "ABORT", "EOR",
|
||||
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
|
||||
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
|
||||
};
|
||||
#else
|
||||
extern char *telcmds[];
|
||||
#endif
|
||||
|
||||
#define TELCMD_FIRST xEOF
|
||||
#define TELCMD_LAST IAC
|
||||
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
|
||||
(unsigned int)(x) >= TELCMD_FIRST)
|
||||
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
|
||||
|
||||
/* telnet options */
|
||||
#define TELOPT_BINARY 0 /* 8-bit data path */
|
||||
#define TELOPT_ECHO 1 /* echo */
|
||||
#define TELOPT_RCP 2 /* prepare to reconnect */
|
||||
#define TELOPT_SGA 3 /* suppress go ahead */
|
||||
#define TELOPT_NAMS 4 /* approximate message size */
|
||||
#define TELOPT_STATUS 5 /* give status */
|
||||
#define TELOPT_TM 6 /* timing mark */
|
||||
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
|
||||
#define TELOPT_NAOL 8 /* negotiate about output line width */
|
||||
#define TELOPT_NAOP 9 /* negotiate about output page size */
|
||||
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
|
||||
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
|
||||
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
|
||||
#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
|
||||
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
|
||||
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
|
||||
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
|
||||
#define TELOPT_XASCII 17 /* extended ascic character set */
|
||||
#define TELOPT_LOGOUT 18 /* force logout */
|
||||
#define TELOPT_BM 19 /* byte macro */
|
||||
#define TELOPT_DET 20 /* data entry terminal */
|
||||
#define TELOPT_SUPDUP 21 /* supdup protocol */
|
||||
#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
|
||||
#define TELOPT_SNDLOC 23 /* send location */
|
||||
#define TELOPT_TTYPE 24 /* terminal type */
|
||||
#define TELOPT_EOR 25 /* end or record */
|
||||
#define TELOPT_TUID 26 /* TACACS user identification */
|
||||
#define TELOPT_OUTMRK 27 /* output marking */
|
||||
#define TELOPT_TTYLOC 28 /* terminal location number */
|
||||
#define TELOPT_3270REGIME 29 /* 3270 regime */
|
||||
#define TELOPT_X3PAD 30 /* X.3 PAD */
|
||||
#define TELOPT_NAWS 31 /* window size */
|
||||
#define TELOPT_TSPEED 32 /* terminal speed */
|
||||
#define TELOPT_LFLOW 33 /* remote flow control */
|
||||
#define TELOPT_LINEMODE 34 /* Linemode option */
|
||||
#define TELOPT_XDISPLOC 35 /* X Display Location */
|
||||
#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
|
||||
#define TELOPT_AUTHENTICATION 37/* Authenticate */
|
||||
#define TELOPT_ENCRYPT 38 /* Encryption option */
|
||||
#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
|
||||
#define TELOPT_EXOPL 255 /* extended-options-list */
|
||||
|
||||
|
||||
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
|
||||
#ifdef TELOPTS
|
||||
char *telopts[NTELOPTS+1] = {
|
||||
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
|
||||
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
|
||||
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
|
||||
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
|
||||
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
|
||||
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
|
||||
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
|
||||
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
|
||||
"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
|
||||
"ENCRYPT", "NEW-ENVIRON",
|
||||
0,
|
||||
};
|
||||
#define TELOPT_FIRST TELOPT_BINARY
|
||||
#define TELOPT_LAST TELOPT_NEW_ENVIRON
|
||||
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
|
||||
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
|
||||
#endif
|
||||
|
||||
/* sub-option qualifiers */
|
||||
#define TELQUAL_IS 0 /* option is... */
|
||||
#define TELQUAL_SEND 1 /* send option */
|
||||
#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
|
||||
#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
|
||||
#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
|
||||
|
||||
#define LFLOW_OFF 0 /* Disable remote flow control */
|
||||
#define LFLOW_ON 1 /* Enable remote flow control */
|
||||
#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
|
||||
#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
|
||||
|
||||
/*
|
||||
* LINEMODE suboptions
|
||||
*/
|
||||
|
||||
#define LM_MODE 1
|
||||
#define LM_FORWARDMASK 2
|
||||
#define LM_SLC 3
|
||||
|
||||
#define MODE_EDIT 0x01
|
||||
#define MODE_TRAPSIG 0x02
|
||||
#define MODE_ACK 0x04
|
||||
#define MODE_SOFT_TAB 0x08
|
||||
#define MODE_LIT_ECHO 0x10
|
||||
|
||||
#define MODE_MASK 0x1f
|
||||
|
||||
/* Not part of protocol, but needed to simplify things... */
|
||||
#define MODE_FLOW 0x0100
|
||||
#define MODE_ECHO 0x0200
|
||||
#define MODE_INBIN 0x0400
|
||||
#define MODE_OUTBIN 0x0800
|
||||
#define MODE_FORCE 0x1000
|
||||
|
||||
#define SLC_SYNCH 1
|
||||
#define SLC_BRK 2
|
||||
#define SLC_IP 3
|
||||
#define SLC_AO 4
|
||||
#define SLC_AYT 5
|
||||
#define SLC_EOR 6
|
||||
#define SLC_ABORT 7
|
||||
#define SLC_EOF 8
|
||||
#define SLC_SUSP 9
|
||||
#define SLC_EC 10
|
||||
#define SLC_EL 11
|
||||
#define SLC_EW 12
|
||||
#define SLC_RP 13
|
||||
#define SLC_LNEXT 14
|
||||
#define SLC_XON 15
|
||||
#define SLC_XOFF 16
|
||||
#define SLC_FORW1 17
|
||||
#define SLC_FORW2 18
|
||||
|
||||
#define NSLC 18
|
||||
|
||||
/*
|
||||
* For backwards compatability, we define SLC_NAMES to be the
|
||||
* list of names if SLC_NAMES is not defined.
|
||||
*/
|
||||
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
|
||||
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
|
||||
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
|
||||
#ifdef SLC_NAMES
|
||||
char *slc_names[] = {
|
||||
SLC_NAMELIST
|
||||
};
|
||||
#else
|
||||
extern char *slc_names[];
|
||||
#define SLC_NAMES SLC_NAMELIST
|
||||
#endif
|
||||
|
||||
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
|
||||
#define SLC_NAME(x) slc_names[x]
|
||||
|
||||
#define SLC_NOSUPPORT 0
|
||||
#define SLC_CANTCHANGE 1
|
||||
#define SLC_VARIABLE 2
|
||||
#define SLC_DEFAULT 3
|
||||
#define SLC_LEVELBITS 0x03
|
||||
|
||||
#define SLC_FUNC 0
|
||||
#define SLC_FLAGS 1
|
||||
#define SLC_VALUE 2
|
||||
|
||||
#define SLC_ACK 0x80
|
||||
#define SLC_FLUSHIN 0x40
|
||||
#define SLC_FLUSHOUT 0x20
|
||||
|
||||
#define OLD_ENV_VAR 1
|
||||
#define OLD_ENV_VALUE 0
|
||||
#define NEW_ENV_VAR 0
|
||||
#define NEW_ENV_VALUE 1
|
||||
#define ENV_ESC 2
|
||||
#define ENV_USERVAR 3
|
||||
|
||||
/*
|
||||
* AUTHENTICATION suboptions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Who is authenticating who ...
|
||||
*/
|
||||
#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
|
||||
#define AUTH_WHO_SERVER 1 /* Server authenticating client */
|
||||
#define AUTH_WHO_MASK 1
|
||||
|
||||
/*
|
||||
* amount of authentication done
|
||||
*/
|
||||
#define AUTH_HOW_ONE_WAY 0
|
||||
#define AUTH_HOW_MUTUAL 2
|
||||
#define AUTH_HOW_MASK 2
|
||||
|
||||
#define AUTHTYPE_NULL 0
|
||||
#define AUTHTYPE_KERBEROS_V4 1
|
||||
#define AUTHTYPE_KERBEROS_V5 2
|
||||
#define AUTHTYPE_SPX 3
|
||||
#define AUTHTYPE_MINK 4
|
||||
#define AUTHTYPE_CNT 5
|
||||
|
||||
#define AUTHTYPE_TEST 99
|
||||
|
||||
#ifdef AUTH_NAMES
|
||||
char *authtype_names[] = {
|
||||
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
|
||||
};
|
||||
#else
|
||||
extern char *authtype_names[];
|
||||
#endif
|
||||
|
||||
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
|
||||
#define AUTHTYPE_NAME(x) authtype_names[x]
|
||||
|
||||
/*
|
||||
* ENCRYPTion suboptions
|
||||
*/
|
||||
#define ENCRYPT_IS 0 /* I pick encryption type ... */
|
||||
#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
|
||||
#define ENCRYPT_REPLY 2 /* Initial setup response */
|
||||
#define ENCRYPT_START 3 /* Am starting to send encrypted */
|
||||
#define ENCRYPT_END 4 /* Am ending encrypted */
|
||||
#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
|
||||
#define ENCRYPT_REQEND 6 /* Request you send encrypting */
|
||||
#define ENCRYPT_ENC_KEYID 7
|
||||
#define ENCRYPT_DEC_KEYID 8
|
||||
#define ENCRYPT_CNT 9
|
||||
|
||||
#define ENCTYPE_ANY 0
|
||||
#define ENCTYPE_DES_CFB64 1
|
||||
#define ENCTYPE_DES_OFB64 2
|
||||
#define ENCTYPE_CNT 3
|
||||
|
||||
#ifdef ENCRYPT_NAMES
|
||||
char *encrypt_names[] = {
|
||||
"IS", "SUPPORT", "REPLY", "START", "END",
|
||||
"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
|
||||
0,
|
||||
};
|
||||
char *enctype_names[] = {
|
||||
"ANY", "DES_CFB64", "DES_OFB64", 0,
|
||||
};
|
||||
#else
|
||||
extern char *encrypt_names[];
|
||||
extern char *enctype_names[];
|
||||
#endif
|
||||
|
||||
|
||||
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
|
||||
#define ENCRYPT_NAME(x) encrypt_names[x]
|
||||
|
||||
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
|
||||
#define ENCTYPE_NAME(x) enctype_names[x]
|
||||
#endif /* _ARPA_TELNET_H */
|
@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
|
||||
*
|
||||
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_TFTP_H
|
||||
#define _ARPA_TFTP_H
|
||||
|
||||
/*
|
||||
* Trivial File Transfer Protocol (IEN-133)
|
||||
*/
|
||||
#define SEGSIZE 512 /* data segment size */
|
||||
|
||||
/*
|
||||
* Packet types.
|
||||
*/
|
||||
#define RRQ 01 /* read request */
|
||||
#define WRQ 02 /* write request */
|
||||
#define DATA 03 /* data packet */
|
||||
#define ACK 04 /* acknowledgement */
|
||||
#define ERROR 05 /* error code */
|
||||
|
||||
struct tftphdr {
|
||||
short th_opcode; /* packet type */
|
||||
union {
|
||||
short tu_block; /* block # */
|
||||
short tu_code; /* error code */
|
||||
char tu_stuff[1]; /* request packet stuff */
|
||||
} th_u;
|
||||
char th_data[1]; /* data or error string */
|
||||
};
|
||||
|
||||
#define th_block th_u.tu_block
|
||||
#define th_code th_u.tu_code
|
||||
#define th_stuff th_u.tu_stuff
|
||||
#define th_msg th_data
|
||||
|
||||
/*
|
||||
* Error codes.
|
||||
*/
|
||||
#define EUNDEF 0 /* not defined */
|
||||
#define ENOTFOUND 1 /* file not found */
|
||||
#define EACCESS 2 /* access violation */
|
||||
#define ENOSPACE 3 /* disk full or allocation exceeded */
|
||||
#define EBADOP 4 /* illegal TFTP operation */
|
||||
#define EBADID 5 /* unknown transfer ID */
|
||||
#define EEXISTS 6 /* file already exists */
|
||||
#define ENOUSER 7 /* no such user */
|
||||
|
||||
#endif /* _ARPA_TFTP_H */
|
@ -1,27 +0,0 @@
|
||||
|
||||
#ifndef __arrayclass_h__
|
||||
#define __arrayclass_h__
|
||||
|
||||
#include "yacasbase.h"
|
||||
#include "lispobject.h"
|
||||
#include "genericobject.h"
|
||||
|
||||
class ArrayClass : public GenericClass
|
||||
{
|
||||
public: //required
|
||||
ArrayClass(LispInt aSize,LispObject* aInitialItem);
|
||||
virtual ~ArrayClass();
|
||||
virtual LispChar * Send(LispArgList& aArgList);
|
||||
virtual LispChar * TypeName();
|
||||
public: //array-specific
|
||||
inline LispInt Size();
|
||||
inline LispObject* GetElement(LispInt aItem); // TODO: 1-based, ...
|
||||
inline void SetElement(LispInt aItem,LispObject* aObject);
|
||||
|
||||
private:
|
||||
LispPtrArray iArray;
|
||||
};
|
||||
|
||||
#include "arrayclass.inl"
|
||||
#endif
|
||||
|
@ -1,43 +0,0 @@
|
||||
#ifndef _I386_BYTEORDER_H
|
||||
#define _I386_BYTEORDER_H
|
||||
|
||||
#include <asm/types.h>
|
||||
#include __DEV_CONFIG_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
|
||||
{
|
||||
#ifdef CONFIG_X86_BSWAP
|
||||
__asm__("bswap %0" : "=r" (x) : "0" (x));
|
||||
#else
|
||||
__asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */
|
||||
"rorl $16,%0\n\t" /* swap words */
|
||||
"xchgb %b0,%h0" /* swap higher bytes */
|
||||
:"=q" (x)
|
||||
: "0" (x));
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0" /* swap bytes */ \
|
||||
: "=q" (x) \
|
||||
: "0" (x)); \
|
||||
return x;
|
||||
}
|
||||
|
||||
#define __arch__swab32(x) ___arch__swab32(x)
|
||||
#define __arch__swab16(x) ___arch__swab16(x)
|
||||
|
||||
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
|
||||
# define __BYTEORDER_HAS_U64__
|
||||
# define __SWAB_64_THRU_32__
|
||||
#endif
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#include <linux/byteorder/little_endian.h>
|
||||
|
||||
#endif /* _I386_BYTEORDER_H */
|
@ -1,4 +0,0 @@
|
||||
#ifndef _I386_TYPES_H
|
||||
#define _I386_TYPES_H
|
||||
|
||||
#endif
|
@ -1,31 +0,0 @@
|
||||
/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
|
||||
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
|
||||
|
||||
#undef assert
|
||||
#undef unimpl
|
||||
|
||||
#define assert(test) ((void)((test)||(__dj_assert(#test,__FILE__,__LINE__),0)))
|
||||
#define unimpl() __dj_unimp("Called unimplemented function in file \"" __FILE__ "\"\n")
|
||||
|
||||
#ifndef __dj_include_assert_h_
|
||||
#define __dj_include_assert_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
void __declspec(noreturn) __dj_assert(const char *,const char *,int);
|
||||
void __declspec(noreturn) __dj_unimp(const char *fn);
|
||||
#else
|
||||
void __dj_assert(const char *,const char *,int) __attribute__((__noreturn__));
|
||||
void __dj_unimp(const char *fn) __attribute__((__noreturn__));
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__dj_include_assert_h_ */
|
||||
|
||||
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
|
@ -1,112 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_ALGO_H
|
||||
#define _CPP_BACKWARD_ALGO_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include "tempbuf.h"
|
||||
#include "iterator.h"
|
||||
#include <bits/stl_algo.h>
|
||||
#include <bits/stl_numeric.h>
|
||||
|
||||
// Names from <stl_algo.h>
|
||||
using std::for_each;
|
||||
using std::find;
|
||||
using std::find_if;
|
||||
using std::adjacent_find;
|
||||
using std::count;
|
||||
using std::count_if;
|
||||
using std::search;
|
||||
using std::search_n;
|
||||
using std::swap_ranges;
|
||||
using std::transform;
|
||||
using std::replace;
|
||||
using std::replace_if;
|
||||
using std::replace_copy;
|
||||
using std::replace_copy_if;
|
||||
using std::generate;
|
||||
using std::generate_n;
|
||||
using std::remove;
|
||||
using std::remove_if;
|
||||
using std::remove_copy;
|
||||
using std::remove_copy_if;
|
||||
using std::unique;
|
||||
using std::unique_copy;
|
||||
using std::reverse;
|
||||
using std::reverse_copy;
|
||||
using std::rotate;
|
||||
using std::rotate_copy;
|
||||
using std::random_shuffle;
|
||||
using std::random_sample;
|
||||
using std::random_sample_n;
|
||||
using std::partition;
|
||||
using std::stable_partition;
|
||||
using std::sort;
|
||||
using std::stable_sort;
|
||||
using std::partial_sort;
|
||||
using std::partial_sort_copy;
|
||||
using std::nth_element;
|
||||
using std::lower_bound;
|
||||
using std::upper_bound;
|
||||
using std::equal_range;
|
||||
using std::binary_search;
|
||||
using std::merge;
|
||||
using std::inplace_merge;
|
||||
using std::includes;
|
||||
using std::set_union;
|
||||
using std::set_intersection;
|
||||
using std::set_difference;
|
||||
using std::set_symmetric_difference;
|
||||
using std::min_element;
|
||||
using std::max_element;
|
||||
using std::next_permutation;
|
||||
using std::prev_permutation;
|
||||
using std::find_first_of;
|
||||
using std::find_end;
|
||||
using std::is_sorted;
|
||||
using std::is_heap;
|
||||
|
||||
// Names from stl_heap.h
|
||||
using std::push_heap;
|
||||
using std::pop_heap;
|
||||
using std::make_heap;
|
||||
using std::sort_heap;
|
||||
|
||||
// Names from stl_numeric.h
|
||||
using std::accumulate;
|
||||
using std::inner_product;
|
||||
using std::partial_sum;
|
||||
using std::adjacent_difference;
|
||||
using std::power;
|
||||
using std::iota;
|
||||
|
||||
#endif /* _CPP_BACKWARD_ALGO_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_ALGOBASE_H
|
||||
#define _CPP_BACKWARD_ALGOBASE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "pair.h"
|
||||
#include "iterator.h"
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <bits/stl_uninitialized.h>
|
||||
|
||||
// Names from stl_algobase.h
|
||||
using std::iter_swap;
|
||||
using std::swap;
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::copy;
|
||||
using std::copy_backward;
|
||||
using std::copy_n;
|
||||
using std::fill;
|
||||
using std::fill_n;
|
||||
using std::mismatch;
|
||||
using std::equal;
|
||||
using std::lexicographical_compare;
|
||||
using std::lexicographical_compare_3way;
|
||||
|
||||
// Names from stl_uninitialized.h
|
||||
using std::uninitialized_copy;
|
||||
using std::uninitialized_copy_n;
|
||||
using std::uninitialized_fill;
|
||||
using std::uninitialized_fill_n;
|
||||
|
||||
#endif /* _CPP_BACKWARD_ALGOBASE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996-1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_ALLOC_H
|
||||
#define _CPP_BACKWARD_ALLOC_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/stl_alloc.h>
|
||||
|
||||
using std::__malloc_alloc_template;
|
||||
using std::malloc_alloc;
|
||||
using std::simple_alloc;
|
||||
using std::debug_alloc;
|
||||
#ifndef __USE_MALLOC
|
||||
using std::__default_alloc_template;
|
||||
#endif
|
||||
using std::alloc;
|
||||
using std::single_client_alloc;
|
||||
using std::allocator;
|
||||
|
||||
#endif /* _CPP_BACKWARD_ALLOC_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_BACKWARD_WARNING_H
|
||||
#define _CPP_BACKWARD_BACKWARD_WARNING_H 1
|
||||
|
||||
#ifdef __DEPRECATED
|
||||
#warning This file includes at least one deprecated or antiquated header. \
|
||||
Please use the <X> header instead of <X.h> header for 'C++' includes \
|
||||
and use the <cX> header instead of <X.h> header for 'C' includes. \
|
||||
To disable this warning use -Wno-deprecated.
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef __SGI_STL_BVECTOR_H
|
||||
#define __SGI_STL_BVECTOR_H
|
||||
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_vector.h>
|
||||
|
||||
using std::bit_vector;
|
||||
|
||||
#endif /* __SGI_STL_BVECTOR_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_COMPLEX_H
|
||||
#define _CPP_BACKWARD_COMPLEX_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_complex.h>
|
||||
|
||||
using std::complex;
|
||||
typedef complex<float> float_complex;
|
||||
typedef complex<double> double_complex;
|
||||
typedef complex<long double> long_double_complex;
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,88 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
// Inclusion of this file is DEPRECATED. This is the original HP
|
||||
// default allocator. It is provided only for backward compatibility.
|
||||
// This file WILL BE REMOVED in a future release.
|
||||
//
|
||||
// DO NOT USE THIS FILE unless you have an old container implementation
|
||||
// that requires an allocator with the HP-style interface.
|
||||
//
|
||||
// Standard-conforming allocators have a very different interface. The
|
||||
// standard default allocator is declared in the header <memory>.
|
||||
|
||||
#ifndef _CPP_BACKWARD_DEFALLOC_H
|
||||
#define _CPP_BACKWARD_DEFALLOC_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "new.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include "iostream.h"
|
||||
#include "algobase.h"
|
||||
|
||||
|
||||
template <class _Tp>
|
||||
inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
|
||||
set_new_handler(0);
|
||||
_Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
|
||||
if (__tmp == 0) {
|
||||
cerr << "out of memory" << endl;
|
||||
exit(1);
|
||||
}
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
|
||||
template <class _Tp>
|
||||
inline void deallocate(_Tp* __buffer) {
|
||||
::operator delete(__buffer);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
class allocator {
|
||||
public:
|
||||
typedef _Tp value_type;
|
||||
typedef _Tp* pointer;
|
||||
typedef const _Tp* const_pointer;
|
||||
typedef _Tp& reference;
|
||||
typedef const _Tp& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
pointer allocate(size_type __n) {
|
||||
return ::allocate((difference_type)__n, (pointer)0);
|
||||
}
|
||||
void deallocate(pointer __p) { ::deallocate(__p); }
|
||||
pointer address(reference __x) { return (pointer)&__x; }
|
||||
const_pointer const_address(const_reference __x) {
|
||||
return (const_pointer)&__x;
|
||||
}
|
||||
size_type init_page_size() {
|
||||
return max(size_type(1), size_type(4096/sizeof(_Tp)));
|
||||
}
|
||||
size_type max_size() const {
|
||||
return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
|
||||
}
|
||||
};
|
||||
|
||||
class allocator<void> {
|
||||
public:
|
||||
typedef void* pointer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* _CPP_BACKWARD_DEFALLOC_H */
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_DEQUE_H
|
||||
#define _CPP_BACKWARD_DEQUE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include <bits/std_deque.h>
|
||||
|
||||
using std::deque;
|
||||
|
||||
#endif /* _CPP_BACKWARD_DEQUE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,52 +0,0 @@
|
||||
// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_FSTREAM_H
|
||||
#define _CPP_BACKWARD_FSTREAM_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_fstream.h>
|
||||
|
||||
using std::filebuf;
|
||||
using std::ifstream;
|
||||
using std::ofstream;
|
||||
using std::fstream;
|
||||
using std::streampos;
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
using std::wfilebuf;
|
||||
using std::wifstream;
|
||||
using std::wofstream;
|
||||
using std::wfstream;
|
||||
using std::wstreampos;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_FUNCTION_H
|
||||
#define _CPP_BACKWARD_FUNCTION_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/c++config.h>
|
||||
#include <stddef.h>
|
||||
#include <bits/stl_function.h>
|
||||
|
||||
// Names from stl_function.h
|
||||
using std::unary_function;
|
||||
using std::binary_function;
|
||||
using std::plus;
|
||||
using std::minus;
|
||||
using std::multiplies;
|
||||
using std::divides;
|
||||
using std::identity_element;
|
||||
using std::modulus;
|
||||
using std::negate;
|
||||
using std::equal_to;
|
||||
using std::not_equal_to;
|
||||
using std::greater;
|
||||
using std::less;
|
||||
using std::greater_equal;
|
||||
using std::less_equal;
|
||||
using std::logical_and;
|
||||
using std::logical_or;
|
||||
using std::logical_not;
|
||||
using std::unary_negate;
|
||||
using std::binary_negate;
|
||||
using std::not1;
|
||||
using std::not2;
|
||||
using std::binder1st;
|
||||
using std::binder2nd;
|
||||
using std::bind1st;
|
||||
using std::bind2nd;
|
||||
using std::unary_compose;
|
||||
using std::binary_compose;
|
||||
using std::compose1;
|
||||
using std::compose2;
|
||||
using std::pointer_to_unary_function;
|
||||
using std::pointer_to_binary_function;
|
||||
using std::ptr_fun;
|
||||
using std::identity;
|
||||
using std::select1st;
|
||||
using std::select2nd;
|
||||
using std::project1st;
|
||||
using std::project2nd;
|
||||
using std::constant_void_fun;
|
||||
using std::constant_unary_fun;
|
||||
using std::constant_binary_fun;
|
||||
using std::constant0;
|
||||
using std::constant1;
|
||||
using std::constant2;
|
||||
using std::subtractive_rng;
|
||||
using std::mem_fun_t;
|
||||
using std::const_mem_fun_t;
|
||||
using std::mem_fun_ref_t;
|
||||
using std::const_mem_fun_ref_t;
|
||||
using std::mem_fun1_t;
|
||||
using std::const_mem_fun1_t;
|
||||
using std::mem_fun1_ref_t;
|
||||
using std::const_mem_fun1_ref_t;
|
||||
using std::mem_fun;
|
||||
using std::mem_fun_ref;
|
||||
using std::mem_fun1;
|
||||
using std::mem_fun1_ref;
|
||||
|
||||
#endif /* _CPP_BACKWARD_FUNCTION_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_HASH_MAP_H
|
||||
#define _CPP_BACKWARD_HASH_MAP_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include <ext/hash_map>
|
||||
|
||||
using std::hash;
|
||||
using std::hashtable;
|
||||
using std::hash_map;
|
||||
using std::hash_multimap;
|
||||
|
||||
#endif /* _CPP_BACKWARD_HASH_MAP_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_HASH_SET_H
|
||||
#define _CPP_BACKWARD_HASH_SET_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include <ext/hash_set>
|
||||
|
||||
using std::hash;
|
||||
using std::hashtable;
|
||||
using std::hash_set;
|
||||
using std::hash_multiset;
|
||||
|
||||
#endif /* _CPP_BACKWARD_HASH_SET_H */
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/* NOTE: This is an internal header file, included by other STL headers.
|
||||
* You should not attempt to use it directly.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_HASHTABLE_H
|
||||
#define _CPP_BACKWARD_HASHTABLE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <ext/stl_hashtable.h>
|
||||
#include "algo.h"
|
||||
#include "alloc.h"
|
||||
#include "vector.h"
|
||||
|
||||
using std::hash;
|
||||
using std::hashtable;
|
||||
|
||||
#endif /* _CPP_BACKWARD_HASHTABLE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* Copyright (c) 1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_HEAP_H
|
||||
#define _CPP_BACKWARD_HEAP_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/stl_heap.h>
|
||||
|
||||
using std::push_heap;
|
||||
using std::pop_heap;
|
||||
using std::make_heap;
|
||||
using std::sort_heap;
|
||||
|
||||
#endif /* _CPP_BACKWARD_HEAP_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,70 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_IOMANIP_H
|
||||
#define _CPP_BACKWARD_IOMANIP_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "iostream.h"
|
||||
#include <bits/std_iomanip.h>
|
||||
|
||||
// These are from <ios> as per [27.4].
|
||||
using std::boolalpha;
|
||||
using std::noboolalpha;
|
||||
using std::showbase;
|
||||
using std::noshowbase;
|
||||
using std::showpoint;
|
||||
using std::noshowpoint;
|
||||
using std::showpos;
|
||||
using std::noshowpos;
|
||||
using std::skipws;
|
||||
using std::noskipws;
|
||||
using std::uppercase;
|
||||
using std::nouppercase;
|
||||
using std::internal;
|
||||
using std::left;
|
||||
using std::right;
|
||||
using std::dec;
|
||||
using std::hex;
|
||||
using std::oct;
|
||||
using std::fixed;
|
||||
using std::scientific;
|
||||
|
||||
// These are from <iomanip> as per [27.6]. Manipulators from <istream>
|
||||
// and <ostream> (e.g., endl) are made available via <iostream.h>.
|
||||
using std::resetiosflags;
|
||||
using std::setiosflags;
|
||||
using std::setbase;
|
||||
using std::setfill;
|
||||
using std::setprecision;
|
||||
using std::setw;
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,60 +0,0 @@
|
||||
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_IOSTREAM_H
|
||||
#define _CPP_BACKWARD_IOSTREAM_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_iostream.h>
|
||||
|
||||
using std::iostream;
|
||||
using std::ostream;
|
||||
using std::istream;
|
||||
using std::ios;
|
||||
using std::streambuf;
|
||||
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::clog;
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
using std::wcout;
|
||||
using std::wcin;
|
||||
using std::wcerr;
|
||||
using std::wclog;
|
||||
#endif
|
||||
|
||||
using std::ws;
|
||||
using std::endl;
|
||||
using std::ends;
|
||||
using std::flush;
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,43 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_ISTREAM_H
|
||||
#define _CPP_BACKWARD_ISTREAM_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "iostream.h"
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,88 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_ITERATOR_H
|
||||
#define _CPP_BACKWARD_ITERATOR_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "function.h"
|
||||
#include <stddef.h>
|
||||
#include "iostream.h"
|
||||
#include "iterator.h"
|
||||
|
||||
#include <bits/stl_construct.h>
|
||||
#include <bits/stl_raw_storage_iter.h>
|
||||
|
||||
// Names from stl_iterator.h
|
||||
using std::input_iterator_tag;
|
||||
using std::output_iterator_tag;
|
||||
using std::forward_iterator_tag;
|
||||
using std::bidirectional_iterator_tag;
|
||||
using std::random_access_iterator_tag;
|
||||
|
||||
#if 0
|
||||
using std::iterator;
|
||||
#endif
|
||||
using std::input_iterator;
|
||||
using std::output_iterator;
|
||||
using std::forward_iterator;
|
||||
using std::bidirectional_iterator;
|
||||
using std::random_access_iterator;
|
||||
|
||||
using std::iterator_traits;
|
||||
|
||||
using std::iterator_category;
|
||||
using std::distance_type;
|
||||
using std::value_type;
|
||||
|
||||
using std::distance;
|
||||
using std::advance;
|
||||
|
||||
using std::insert_iterator;
|
||||
using std::front_insert_iterator;
|
||||
using std::back_insert_iterator;
|
||||
using std::inserter;
|
||||
using std::front_inserter;
|
||||
using std::back_inserter;
|
||||
|
||||
using std::reverse_iterator;
|
||||
using std::reverse_bidirectional_iterator;
|
||||
|
||||
using std::istream_iterator;
|
||||
using std::ostream_iterator;
|
||||
|
||||
// Names from stl_construct.h
|
||||
using std::construct;
|
||||
using std::destroy;
|
||||
|
||||
// Names from stl_raw_storage_iter.h
|
||||
using std::raw_storage_iterator;
|
||||
|
||||
#endif /* _CPP_BACKWARD_ITERATOR_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_LIST_H
|
||||
#define _CPP_BACKWARD_LIST_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include <bits/std_list.h>
|
||||
|
||||
using std::list;
|
||||
|
||||
#endif /* _CPP_BACKWARD_LIST_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_MAP_H
|
||||
#define _CPP_BACKWARD_MAP_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "tree.h"
|
||||
#include <bits/std_map.h>
|
||||
|
||||
using std::map;
|
||||
|
||||
#endif /* _CPP_BACKWARD_MAP_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_MULTIMAP_H
|
||||
#define _CPP_BACKWARD_MULTIMAP_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "tree.h"
|
||||
#include <bits/std_map.h>
|
||||
|
||||
using std::multimap;
|
||||
|
||||
#endif /* _CPP_BACKWARD_MULTIMAP_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_MULTISET_H
|
||||
#define _CPP_BACKWARD_MULTISET_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "tree.h"
|
||||
#include <bits/std_set.h>
|
||||
|
||||
using std::multiset;
|
||||
|
||||
#endif /* _CPP_BACKWARD_MULTISET_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,42 +0,0 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
// Copyright (C) 2000 Free Software Foundation
|
||||
|
||||
// This file is part of GNU CC.
|
||||
//
|
||||
// GNU CC is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// GNU CC 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 General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU CC; see the file COPYING. If not, write to
|
||||
// the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_NEW_H
|
||||
#define _CPP_BACKWARD_NEW_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <new>
|
||||
|
||||
using std::bad_alloc;
|
||||
using std::nothrow_t;
|
||||
using std::nothrow;
|
||||
using std::new_handler;
|
||||
using std::set_new_handler;
|
||||
|
||||
#endif
|
@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_OSTREAM_H
|
||||
#define _CPP_BACKWARD_OSTREAM_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "iostream.h"
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_PAIR_H
|
||||
#define _CPP_BACKWARD_PAIR_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/stl_pair.h>
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
|
||||
#endif /* _CPP_BACKWARD_PAIR_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,41 +0,0 @@
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_QUEUE_H
|
||||
#define _CPP_BACKWARD_QUEUE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_queue.h>
|
||||
|
||||
using std::queue;
|
||||
using std::priority_queue;
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_ROPE_H
|
||||
#define _CPP_BACKWARD_ROPE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "hashtable.h"
|
||||
#include <ext/rope>
|
||||
|
||||
using std::char_producer;
|
||||
using std::sequence_buffer;
|
||||
using std::rope;
|
||||
using std::crope;
|
||||
using std::wrope;
|
||||
|
||||
#endif /* _CPP_BACKWARD_ROPE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_SET_H
|
||||
#define _CPP_BACKWARD_SET_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "tree.h"
|
||||
#include <bits/std_set.h>
|
||||
|
||||
using std::set;
|
||||
|
||||
#endif /* _CPP_BACKWARD_SET_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_SLIST_H
|
||||
#define _CPP_BACKWARD_SLIST_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <ext/slist>
|
||||
|
||||
using std::slist;
|
||||
|
||||
#endif /* _CPP_BACKWARD_SLIST_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996,1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_STACK_H
|
||||
#define _CPP_BACKWARD_STACK_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "vector.h"
|
||||
#include "deque.h"
|
||||
#include "heap.h"
|
||||
#include "queue.h"
|
||||
#include <bits/std_stack.h>
|
||||
|
||||
using std::stack;
|
||||
|
||||
#endif /* _CPP_BACKWARD_STACK_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_STREAM_H
|
||||
#define _CPP_BACKWARD_STREAM_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "iostream.h"
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,40 +0,0 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_STREAMBUF_H
|
||||
#define _CPP_BACKWARD_STREAMBUF_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_streambuf.h>
|
||||
|
||||
using std::streambuf;
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,159 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1998
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
// WARNING: The classes defined in this header are DEPRECATED. This
|
||||
// header is defined in section D.7.1 of the C++ standard, and it
|
||||
// MAY BE REMOVED in a future standard revision. You should use the
|
||||
// header <sstream> instead.
|
||||
|
||||
#ifndef __SGI_STL_STRSTREAM
|
||||
#define __SGI_STL_STRSTREAM
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/std_iosfwd.h>
|
||||
#include <bits/std_ios.h>
|
||||
#include <bits/std_istream.h>
|
||||
#include <bits/std_ostream.h>
|
||||
#include <bits/std_string.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class strstreambuf, a streambuf class that manages an array of char.
|
||||
// Note that this class is not a template.
|
||||
|
||||
class strstreambuf : public basic_streambuf<char, char_traits<char> >
|
||||
{
|
||||
public: // Types.
|
||||
typedef char_traits<char> _Traits;
|
||||
typedef basic_streambuf<char, _Traits> _Base;
|
||||
|
||||
public: // Constructor, destructor
|
||||
explicit strstreambuf(streamsize __initial_capacity = 0);
|
||||
strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
|
||||
|
||||
strstreambuf(char* __get, streamsize __n, char* __put = 0);
|
||||
strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
|
||||
strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
|
||||
|
||||
strstreambuf(const char* __get, streamsize __n);
|
||||
strstreambuf(const signed char* __get, streamsize __n);
|
||||
strstreambuf(const unsigned char* __get, streamsize __n);
|
||||
|
||||
virtual ~strstreambuf();
|
||||
|
||||
public: // strstreambuf operations.
|
||||
void freeze(bool = true);
|
||||
char* str();
|
||||
int pcount() const;
|
||||
|
||||
protected: // Overridden virtual member functions.
|
||||
virtual int_type overflow(int_type __c = _Traits::eof());
|
||||
virtual int_type pbackfail(int_type __c = _Traits::eof());
|
||||
virtual int_type underflow();
|
||||
virtual _Base* setbuf(char* __buf, streamsize __n);
|
||||
virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
|
||||
ios_base::openmode __mode
|
||||
= ios_base::in | ios_base::out);
|
||||
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
|
||||
= ios_base::in | ios_base::out);
|
||||
|
||||
private: // Helper functions.
|
||||
// Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
|
||||
char* _M_alloc(size_t);
|
||||
void _M_free(char*);
|
||||
|
||||
// Helper function used in constructors.
|
||||
void _M_setup(char* __get, char* __put, streamsize __n);
|
||||
|
||||
private: // Data members.
|
||||
void* (*_M_alloc_fun)(size_t);
|
||||
void (*_M_free_fun)(void*);
|
||||
|
||||
bool _M_dynamic : 1;
|
||||
bool _M_frozen : 1;
|
||||
bool _M_constant : 1;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class istrstream, an istream that manages a strstreambuf.
|
||||
|
||||
class istrstream : public basic_istream<char>
|
||||
{
|
||||
public:
|
||||
explicit istrstream(char*);
|
||||
explicit istrstream(const char*);
|
||||
istrstream(char* , streamsize);
|
||||
istrstream(const char*, streamsize);
|
||||
virtual ~istrstream();
|
||||
|
||||
strstreambuf* rdbuf() const;
|
||||
char* str();
|
||||
|
||||
private:
|
||||
strstreambuf _M_buf;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class ostrstream
|
||||
|
||||
class ostrstream : public basic_ostream<char>
|
||||
{
|
||||
public:
|
||||
ostrstream();
|
||||
ostrstream(char*, int, ios_base::openmode = ios_base::out);
|
||||
virtual ~ostrstream();
|
||||
|
||||
strstreambuf* rdbuf() const;
|
||||
void freeze(bool = true);
|
||||
char* str();
|
||||
int pcount() const;
|
||||
|
||||
private:
|
||||
strstreambuf _M_buf;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class strstream
|
||||
|
||||
class strstream : public basic_iostream<char>
|
||||
{
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef char_traits<char>::int_type int_type;
|
||||
typedef char_traits<char>::pos_type pos_type;
|
||||
typedef char_traits<char>::off_type off_type;
|
||||
|
||||
strstream();
|
||||
strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
|
||||
virtual ~strstream();
|
||||
|
||||
strstreambuf* rdbuf() const;
|
||||
void freeze(bool = true);
|
||||
int pcount() const;
|
||||
char* str();
|
||||
|
||||
private:
|
||||
strstreambuf _M_buf;
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __SGI_STL_STRSTREAM */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
// Copyright (C) 2000 Free Software Foundation
|
||||
|
||||
// This file is part of GNU CC.
|
||||
//
|
||||
// GNU CC is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// GNU CC 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 General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU CC; see the file COPYING. If not, write to
|
||||
// the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _CPP_BACKWARD_STRSTREAM_H
|
||||
#define _CPP_BACKWARD_STRSTREAM_H 1
|
||||
|
||||
#include "strstream"
|
||||
|
||||
using std::strstreambuf;
|
||||
using std::istrstream;
|
||||
using std::ostrstream;
|
||||
using std::strstream;
|
||||
|
||||
#endif
|
||||
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_TEMPBUF_H
|
||||
#define _CPP_BACKWARD_TEMPBUF_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "pair.h"
|
||||
#include "iterator.h"
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <bits/type_traits.h>
|
||||
#include <bits/stl_construct.h>
|
||||
#include <bits/stl_uninitialized.h>
|
||||
#include <bits/stl_tempbuf.h>
|
||||
|
||||
using std::get_temporary_buffer;
|
||||
using std::return_temporary_buffer;
|
||||
using std::temporary_buffer;
|
||||
|
||||
#endif /* _CPP_BACKWARD_TEMPBUF_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,27 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CPP_EXT_TREE
|
||||
#define _CPP_EXT_TREE 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <bits/stl_tree.h>
|
||||
|
||||
using std::rb_tree;
|
||||
|
||||
#endif
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BACKWARD_VECTOR_H
|
||||
#define _CPP_BACKWARD_VECTOR_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include "algobase.h"
|
||||
#include "alloc.h"
|
||||
#include <bits/std_vector.h>
|
||||
|
||||
using std::vector;
|
||||
|
||||
#endif /* _CPP_BACKWARD_VECTOR_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#ifndef __dj_include_bios_h_
|
||||
#define __dj_include_bios_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
||||
int bioscom(int _cmd, char _data, int _port);
|
||||
int biosdisk(int _cmd, int _drive, int _head, int _track, int _sector,
|
||||
int _nsects, void *_buffer);
|
||||
int biosequip(void);
|
||||
int bioskey(int cmd);
|
||||
int biosmemory(void);
|
||||
int biosprint(int _cmd, int _byte, int _port);
|
||||
long biostime(int _cmd, long _newtime);
|
||||
|
||||
/*
|
||||
* For compatibility with other DOS C compilers.
|
||||
*/
|
||||
|
||||
/* Disk parameters for _bios_disk() function. */
|
||||
struct _diskinfo_t {
|
||||
unsigned drive; /* Drive number. */
|
||||
unsigned head; /* Head number. */
|
||||
unsigned track; /* Track number. */
|
||||
unsigned sector; /* Sector number. */
|
||||
unsigned nsectors; /* Number of sectors to read/write/verify. */
|
||||
void *buffer; /* Buffer for reading/writing/verifying. */
|
||||
};
|
||||
#define diskinfo_t _diskinfo_t
|
||||
|
||||
/* Constants for _bios_disk() function. */
|
||||
#define _DISK_RESET 0 /* Reset disk controller. */
|
||||
#define _DISK_STATUS 1 /* Get disk status. */
|
||||
#define _DISK_READ 2 /* Read disk sectors. */
|
||||
#define _DISK_WRITE 3 /* Write disk sectors. */
|
||||
#define _DISK_VERIFY 4 /* Verify disk sectors. */
|
||||
#define _DISK_FORMAT 5 /* Format disk track. */
|
||||
|
||||
/* Constants fot _bios_serialcom() function. */
|
||||
#define _COM_INIT 0 /* Init serial port. */
|
||||
#define _COM_SEND 1 /* Send character. */
|
||||
#define _COM_RECEIVE 2 /* Receive character. */
|
||||
#define _COM_STATUS 3 /* Get serial port status. */
|
||||
|
||||
#define _COM_CHR7 2 /* 7 bits characters. */
|
||||
#define _COM_CHR8 3 /* 8 bits characters. */
|
||||
|
||||
#define _COM_STOP1 0 /* 1 stop bit. */
|
||||
#define _COM_STOP2 4 /* 2 stop bits. */
|
||||
|
||||
#define _COM_NOPARITY 0 /* No parity. */
|
||||
#define _COM_ODDPARITY 8 /* Odd parity. */
|
||||
#define _COM_SPACEPARITY 16 /* Space parity. */
|
||||
#define _COM_EVENPARITY 24 /* Even parity. */
|
||||
|
||||
#define _COM_110 0 /* 110 baud. */
|
||||
#define _COM_150 32 /* 150 baud. */
|
||||
#define _COM_300 64 /* 300 baud. */
|
||||
#define _COM_600 96 /* 600 baud. */
|
||||
#define _COM_1200 128 /* 1200 baud. */
|
||||
#define _COM_2400 160 /* 2400 baud. */
|
||||
#define _COM_4800 192 /* 4800 baud. */
|
||||
#define _COM_9600 224 /* 9600 baud. */
|
||||
|
||||
/* Constants for _bios_keybrd() function. */
|
||||
#define _KEYBRD_READ 0 /* Read character. */
|
||||
#define _KEYBRD_READY 1 /* Check character. */
|
||||
#define _KEYBRD_SHIFTSTATUS 2 /* Get shift status. */
|
||||
|
||||
#define _NKEYBRD_READ 0x10 /* Read extended character. */
|
||||
#define _NKEYBRD_READY 0x11 /* Check extended character. */
|
||||
#define _NKEYBRD_SHIFTSTATUS 0x12 /* Get exteded shift status. */
|
||||
|
||||
/* Constans for _bios_printer() function. */
|
||||
#define _PRINTER_WRITE 0 /* Write character. */
|
||||
#define _PRINTER_INIT 1 /* Initialize printer. */
|
||||
#define _PRINTER_STATUS 2 /* Get printer status. */
|
||||
|
||||
/* Constants for _bios_timeofday() function. */
|
||||
#define _TIME_GETCLOCK 0 /* Get current clock count. */
|
||||
#define _TIME_SETCLOCK 1 /* Set current clock count. */
|
||||
|
||||
#define _bios_equiplist() ((unsigned)biosequip())
|
||||
#define _bios_memsize() ((unsigned)biosmemory())
|
||||
#define _bios_printer(_c, _p, _d) ((unsigned)biosprint(_c, _d, _p))
|
||||
#define _bios_serialcom(_c, _p, _d) ((unsigned)bioscom(_c, _d, _p))
|
||||
#define _bios_keybrd(_c) ((unsigned)bioskey(_c))
|
||||
|
||||
unsigned _bios_disk(unsigned _cmd, struct _diskinfo_t *_di);
|
||||
unsigned _bios_timeofday(unsigned _cmd, unsigned long *_timeval);
|
||||
|
||||
/* For int86(), int86x() and union REGS. */
|
||||
#include <dos.h>
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !__STRICT_ANSI__ */
|
||||
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
|
||||
|
||||
#ifndef __dj_ENFORCE_FUNCTION_CALLS
|
||||
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__dj_include_bios_h_ */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user