Skip to content

Commit

Permalink
Structure changes to reflect support of MS DOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kenbowen committed Dec 22, 1994
1 parent b75eb9e commit 95af99a
Show file tree
Hide file tree
Showing 45 changed files with 906 additions and 134 deletions.
17 changes: 4 additions & 13 deletions core/alsp_src/builtins/blt_io.pro
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ load(FileName,Type,CanonPath,Nature)
%% Propogate failure
fail
),
%write( load_canon(CanonPath,Type,Nature) ),nl, flush_output,
load_canon(CanonPath,Type,Nature),
!,
set_current_consult_directory(OldCCD).
Expand Down Expand Up @@ -384,7 +383,6 @@ load_canon(Path,Type,Nature)
RFlag1 is RFlag0 \/ Type,
set_reconsult_flag(RFlag1),
load_canon_reconsult(RFlag1,CG),
%write(load3(Ext,Path,Type,Nature)),nl,flush_output,
load3(Ext,Path,Type,Nature),
set_reconsult_flag(RFlag0),
pop_clausegroup(_).
Expand Down Expand Up @@ -469,6 +467,8 @@ load3(obp,OPath,Type,Nature)
load3(no(extension),Path,Type,Nature)
:-
exists_file(Path),
file_status(Path,Status),
dmember(type=regular,Status),
!,
load_source(Path,Type).

Expand All @@ -480,7 +480,6 @@ load3(no(extension),Path,Type,Nature)
:- !,
filePlusExt(Path,pro,SPath),
obpPath(Path,OPath),
% filePlusExt(Path,obp,OPath),
load4(SPath,OPath,Type,Nature).

%% The requested path explicity ended in a 'pro' extension, so
Expand Down Expand Up @@ -513,6 +512,8 @@ load4(SPath,OPath,Type,_)
load4(SPath,OPath,Type,_)
:-
exists_file(SPath),
file_status(Path,Status),
dmember(type=regular,Status),
!,
load_source_object(SPath,OPath).

Expand Down Expand Up @@ -544,7 +545,6 @@ load4_checkstatus(2,SPath,OPath) :- %% FLOAD_ILLOBP
*-----------------------------------------------------------------------*/
load_source(Path,Type) :-
obp_push_stop,
%write(calling_consult_source(Path,NErrs)),nl,flush_output,
consult_source(Path,NErrs),
obp_pop,
!.
Expand Down Expand Up @@ -585,7 +585,6 @@ load_source_object(SPath,OPath)
*-----------------------------------------------------------------------*/
consult_source(Path,NErrs)
:-
% xconsult:xconsult(Path,NErrs).
xconsult(Path,NErrs).

/*-----------------------------------------------------------------------*
Expand Down Expand Up @@ -724,16 +723,12 @@ printf_opt(Format,ArgList,Options) :-
printf(Stream_or_alias,Format,ArgList) :-
sio:output_stream_or_alias_ok(Stream_or_alias, Stream),
printf_check_format(Format, FormatList),
%pbi_write( printf0(FormatList,Stream,ArgList) ),
%pbi_nl,pbi_ttyflush,
printf0(FormatList,Stream,ArgList,[]).

printf(Stream_or_alias,Format,ArgList,Options) :-
sio:output_stream_or_alias_ok(Stream_or_alias, Stream),
printf_check_format(Format, FormatList),
!,
%pbi_write( printf0(FormatList,Stream,ArgList,Options) ),
%pbi_nl,pbi_ttyflush,
printf0(FormatList,Stream,ArgList,Options).

printf_check_format(Var, _) :-
Expand Down Expand Up @@ -796,11 +791,7 @@ printf0([0'% | Format], Stream, [Arg | ArgList],Options) :-
%%%% Write any other character as is
printf0([Char |Format], Stream, ArgList,Options)
:-
%pbi_write(pf0(Char)),pbi_ttyflush,
put_code(Stream,Char),
%pbi_write('-pc-'),pbi_ttyflush,
%flush_output(Stream),
%pbi_write('+fo'),pbi_nl,pbi_ttyflush,
printf0(Format,Stream,ArgList,Options).


Expand Down
1 change: 1 addition & 0 deletions core/alsp_src/builtins/blt_lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@

:-builtins:libhide(builtins,['library',cmpdirs], [cmpdirs/3] ).

:-builtins:libhide(builtins,['library',cref], [cref/1,cref/2] ).
27 changes: 24 additions & 3 deletions core/alsp_src/builtins/blt_sys.pro
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ display_stats(Stream) :-

:- make_hash_table('_libinfo').


lib_load(Module,Call)
:-
functor(Call,P,A),
Expand Down Expand Up @@ -334,18 +335,38 @@ force_libload_all(Files)
force_libload_all([],_).
force_libload_all([File|Files],DirDC)
:-
'$atom_concat'(DirDC,File,FileName),
force_libload_file(File,DirDC),
force_libload_all(Files,DirDC).

force_libload_file(File,DirDC)
:-
lib_path_rec(LibHeader,LibList),
dmember(File,LibList),
subPath(DirDCList,DirDC),
append(DirDCList,[LibHeader,File],XDirDCList),
subPath(XDirDCList,FileName),
als_advise('Loading %s\n',[FileName]),
(load(FileName,1,_,obp) ->
(pdel_libinfo(_,File), fail ; true),
als_advise('...loaded\n',[])
;
als_advise('\n!!WARNING File %s NOT LOADED!\n',[FileName])
),
force_libload_all(Files,DirDC).
).

:-dynamic(lib_path_rec/2).

lib_recording(LH,LT)
:-
lib_path_rec(LH,LT),
!.

lib_recording(LH,LT)
:-
assert_at_load_time(lib_path_rec(LH,LT)).

libhide(M,[LH|LT],PredList)
:-
lib_recording(LH,LT),
directory_separator(DS),
mklibpath(LT,DS,LH,LibFileName),
libhide0(PredList,M,LibFileName).
Expand Down
14 changes: 7 additions & 7 deletions core/alsp_src/configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Guess values for system-dependent variables and create makefiles.
# Generated automatically using autoconf version 1.11
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.

Expand Down Expand Up @@ -379,7 +379,7 @@ rm -f conftest*
test -n "$silent" || echo "checking how to run the C preprocessor"
if test -z "$CPP"; then
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and ``${CC-cc}'' will simply confuse
# substituted into the makefile and ``${CC-cc}'' will simply confuse
# make. It must be expanded now.
CPP="${CC-cc} -E"
cat > conftest.${ac_ext} <<EOF
Expand Down Expand Up @@ -1718,7 +1718,7 @@ if mkdir conftestdir; then
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
if (xmkmf) >/dev/null 2>/dev/null && test -f makefile; then
no_x=
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `make acfindx 2>/dev/null | grep -v make`
Expand Down Expand Up @@ -2002,7 +2002,7 @@ test -n "$verbose" && echo " extra X libraries: $X_EXTRA_LIBS"
findstddefs:
@echo 'im_std_defines="${STD_DEFINES}"'
EOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
if (xmkmf) >/dev/null 2>/dev/null && test -f makefile; then
# GNU make sometimes prints "make[1]: Entering...", which
# would confuse us.
eval `make findstddefs 2>/dev/null | grep -v make`
Expand Down Expand Up @@ -2349,7 +2349,7 @@ rm -f conftest*
done


### output Makefile and config.h
### output makefile and config.h

# The preferred way to propogate these variables is regular @ substitutions.
if test -n "$prefix"; then
Expand Down Expand Up @@ -2408,7 +2408,7 @@ do
esac
done
trap 'rm -f Makefile bld-port/Makefile bld-natv/Makefile config.d; exit 1' 1 2 15
trap 'rm -f makefile bld-port/makefile bld-natv/makefile config.d; exit 1' 1 2 15
ARCH='$ARCH'
OS='$OS'
LN_S='$LN_S'
Expand All @@ -2435,7 +2435,7 @@ cat >> config.status <<\EOF
ac_given_srcdir=$srcdir
CONFIG_FILES=${CONFIG_FILES-"Makefile bld-port/Makefile bld-natv/Makefile config.d"}
CONFIG_FILES=${CONFIG_FILES-"makefile bld-port/makefile bld-natv/makefile config.d"}
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Expand Down
13 changes: 7 additions & 6 deletions core/alsp_src/generic/alloc.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/*
* alloc.c -- storage allocator and functions which operate on compile
* time structures
/*===================================================================*
* alloc.c
* Copyright (c) 1985 by Kevin A. Buettner
* Copyright (c) 1993 by Applied Logic Systems, Inc.
*
* -- storage allocator and functions which operate on compile
* time structures
*
* Author: Kevin A. Buettner
* Creation: 6/15/85
* Revision History:
* Revised: 01/13/86, Kevin A. Buettner -- IBM PC port for ALS
* Revised: 12/6/89, Kev -- Merge of 386, 68k, and 88k
*/
* Revised: 12/6/89, Kev -- Merge of 386, 68k, and 88k
*===================================================================*/

#include "defs.h"
#include <math.h> /* for floor */
Expand Down Expand Up @@ -66,7 +68,6 @@ alc_rst()
areap = prs_area;
}


pword
mk_term(arity)
long arity;
Expand Down
2 changes: 1 addition & 1 deletion core/alsp_src/generic/arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <math.h>

#ifdef DOS
#include <stdefs.h>
#include <stdef.h>
#include <errno.h>
#else /* DOS */
#ifdef VMS
Expand Down
2 changes: 1 addition & 1 deletion core/alsp_src/generic/bcinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pbi_c_set()
*(double *) (ptr + offset) = doubleval;
break;

#ifdef DOS
#if defined(DOS) && !defined(__GO32__)
case 14: /* far pointer type */
if (datatype != WTP_STRUCTURE)
FAIL;
Expand Down
Loading

0 comments on commit 95af99a

Please sign in to comment.