ChangeLogTag:Mon Jun 07 12:58:17 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
This commit is contained in:
@@ -1,3 +1,62 @@
|
||||
Mon Jun 07 12:58:17 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
|
||||
|
||||
* source/hbpp/Makefile:
|
||||
* source/hbpp/harb.c:
|
||||
* source/hbpp/harb.h:
|
||||
* source/hbpp/hbpp.c:
|
||||
* source/hbpp/table.c:
|
||||
Added a GNU-make Makefile to this directory.
|
||||
Solved portability problems under gcc.
|
||||
Got rid of a few warnings and unused variables.
|
||||
|
||||
* source/rtl/msgxxx.c:
|
||||
This file includes the correct message file based on the value of
|
||||
HB_LANGUAGE, whose default is UK.
|
||||
|
||||
* source/rtl/classes.c:
|
||||
* source/rtl/console.c:
|
||||
* source/rtl/dir.c:
|
||||
* source/rtl/files.c:
|
||||
* source/rtl/set.c:
|
||||
Solved portability problems under gcc.
|
||||
Got rid of a few warnings and unused variables.
|
||||
|
||||
* source/rtl/dir.c:
|
||||
This file had definite bugs, see difference between r1.4 and r1.3
|
||||
for more details.
|
||||
|
||||
* source/rtl/natmsg/msgdut.c:
|
||||
* source/rtl/natmsg/msggal.c:
|
||||
* source/rtl/natmsg/msgger.c:
|
||||
* source/rtl/natmsg/msghu.c:
|
||||
* source/rtl/natmsg/msgpor.c:
|
||||
* source/rtl/natmsg/msgr1251.c:
|
||||
* source/rtl/natmsg/msgru866.c:
|
||||
* source/rtl/natmsg/msgspa.c:
|
||||
* source/rtl/natmsg/msguk.c:
|
||||
Added Id keywords.
|
||||
|
||||
* config/bin.cf:
|
||||
* config/global.cf:
|
||||
* config/header.cf:
|
||||
* config/lib.cf:
|
||||
* config/prg.cf:
|
||||
* config/test.cf:
|
||||
* config/win32/rules.cf:
|
||||
Use GRANDP to refer to ../../ and change environment variables to
|
||||
start with a HB_.
|
||||
|
||||
* config/win32/rules.cf:
|
||||
Added a -I$(TOP) to the list of paths for included files in the
|
||||
rule to compile a PRG file with Harbour.
|
||||
|
||||
* include/Makefile:
|
||||
* source/Makefile:
|
||||
* source/rtl/Makefile:
|
||||
* source/tools/Makefile:
|
||||
* tests/working/Makefile:
|
||||
Updated the file list.
|
||||
|
||||
19990607-15:15 CET Matthew Hamilton
|
||||
* tests/working/inifiles.prg
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ first : dirbase descend
|
||||
|
||||
descend :
|
||||
@cd $(ARCH_DIR); \
|
||||
$(MAKE) -f ../../Makefile 'TOP=../../' $(EXE_NAME); \
|
||||
cd ../../
|
||||
$(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME); \
|
||||
cd $(GRANDP)
|
||||
|
||||
$(EXE_NAME) : $(ALL_OBJS)
|
||||
$(LD_RULE)
|
||||
|
||||
|
||||
INSTALL_OBJS = $(EXE_ARCH)
|
||||
INSTALL_DIR = $(BIN_DIR)
|
||||
INSTALL_DIR = $(HB_BIN_DIR)
|
||||
|
||||
include $(TOP)$(ROOT)config/install.cf
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
|
||||
all : first
|
||||
|
||||
ARCH_DIR = $(ARCHITECTURE)/$(COMPILER)/
|
||||
GRANDP = ../../
|
||||
ARCH = $(HB_ARCHITECTURE)/$(HB_COMPILER)
|
||||
|
||||
include $(TOP)$(ROOT)config/$(ARCHITECTURE)/$(COMPILER).cf
|
||||
ARCH_DIR = $(ARCH)/
|
||||
|
||||
include $(TOP)$(ROOT)config/$(ARCH).cf
|
||||
|
||||
dirbase::
|
||||
@if [ ! -d $(ARCHITECTURE) ]; then \
|
||||
$(MD) $(ARCHITECTURE); \
|
||||
@if [ ! -d $(HB_ARCH) ]; then \
|
||||
$(MD) $(HB_ARCH); \
|
||||
fi; \
|
||||
if [ ! -d $(ARCH_DIR) ]; then \
|
||||
$(MD) $(ARCH_DIR); \
|
||||
|
||||
@@ -12,6 +12,6 @@ ALL_HEADERS = $(C_HEADERS) $(PRG_HEADERS) $(API_HEADERS)
|
||||
first :
|
||||
|
||||
INSTALL_OBJS = $(ALL_HEADERS)
|
||||
INSTALL_DIR = $(INC_DIR)
|
||||
INSTALL_DIR = $(HB_INC_DIR)
|
||||
|
||||
include $(TOP)$(ROOT)config/install.cf
|
||||
|
||||
@@ -15,14 +15,14 @@ first : dirbase descend
|
||||
|
||||
descend :
|
||||
@cd $(ARCH_DIR); \
|
||||
$(MAKE) -f ../../Makefile 'TOP=../../' $(LIB_NAME); \
|
||||
cd ../../
|
||||
$(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(LIB_NAME); \
|
||||
cd $(GRANDP)
|
||||
|
||||
$(LIB_NAME) : $(ALL_OBJS)
|
||||
$(AR_RULE)
|
||||
|
||||
|
||||
INSTALL_OBJS = $(LIB_ARCH)
|
||||
INSTALL_DIR = $(LIB_DIR)
|
||||
INSTALL_DIR = $(HB_LIB_DIR)
|
||||
|
||||
include $(TOP)$(ROOT)config/install.cf
|
||||
|
||||
@@ -12,4 +12,4 @@ $(PRG_EXES) : %$(EXE_EXT) : %$(OBJ_EXT)
|
||||
|
||||
$(PRG_OBJS) : %$(OBJ_EXT) : %.c
|
||||
|
||||
$(PRG_C_SOURCES) : %.c : ../../%.prg
|
||||
$(PRG_C_SOURCES) : %.c : $(GRANDP)%.prg
|
||||
|
||||
@@ -9,5 +9,5 @@ first : dirbase descend
|
||||
|
||||
descend :
|
||||
@cd $(ARCH_DIR); \
|
||||
$(MAKE) -f ../../Makefile 'TOP=../../' $(PRG_EXES); \
|
||||
cd ../../
|
||||
$(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(PRG_EXES); \
|
||||
cd $(GRANDP)
|
||||
|
||||
@@ -12,7 +12,7 @@ LEX_FLAGS = -i
|
||||
|
||||
# How to run Harbour.
|
||||
HB = harbour$(EXE_EXT)
|
||||
HB_FLAGS = -n -q -I$(INC_DIR)
|
||||
HB_FLAGS = -n -q -I$(TOP) -I$(INC_DIR)
|
||||
|
||||
# The rule to link an executable.
|
||||
LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS)
|
||||
@@ -26,8 +26,8 @@ LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS)
|
||||
|
||||
|
||||
# Rule to generate an object file from a C source file in the parent.
|
||||
%$(OBJ_EXT) : ../../%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $? $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst ../../,,$?))
|
||||
%$(OBJ_EXT) : $(GRANDP)%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $? $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst $(GRANDP),,$?))
|
||||
|
||||
# Rule to generate an object file from a C source file.
|
||||
%$(OBJ_EXT) : %.c
|
||||
@@ -38,7 +38,7 @@ LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS)
|
||||
$(LD_RULE)
|
||||
|
||||
# Rule to generate a C file from a PRG file.
|
||||
%.c : ../../%.prg
|
||||
%.c : $(GRANDP)%.prg
|
||||
$(HB) $? $(HB_FLAGS)
|
||||
|
||||
# Generic rule to clean up.
|
||||
|
||||
166
harbour/doc/gmake.txt
Normal file
166
harbour/doc/gmake.txt
Normal file
@@ -0,0 +1,166 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
INTRODUCTION
|
||||
============
|
||||
|
||||
This file explains the philosophy for the GNU-make based build system
|
||||
for Harbour, and gives instructions on how to use it.
|
||||
|
||||
|
||||
PHILOSOPHY
|
||||
==========
|
||||
|
||||
This build system is based on GNU-make, the idea being that GNU-make
|
||||
is freely available for every platform you can dream up, and it is
|
||||
usually more powerful than any native make.
|
||||
|
||||
Each directory in the project contains one makefile, called Makefile,
|
||||
which lists the data (file names, directory names, etc.) that is used
|
||||
to determine how to bring ever target up to date within that
|
||||
directory. There are no rules in the Makefiles, to keep them
|
||||
platform-independent. The rules itself are included from the
|
||||
"appropriate" configuration file.
|
||||
|
||||
For example, this could be the Makefile for the VM library:
|
||||
|
||||
-- Cut here ---------------------------------------
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
dynsym.c \
|
||||
hvm.c \
|
||||
initsymb.c \
|
||||
|
||||
LIB=vm
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
-- Cut here ---------------------------------------
|
||||
|
||||
What this means is:
|
||||
|
||||
* The root of the source directory is in ../../; that is where the
|
||||
config/ directory lives, with all the real rules to make the
|
||||
targets.
|
||||
* The only sources in this directory are C sources (three files).
|
||||
* The library name is "vm". This will be translated to a real file
|
||||
name depending on the rules file: "libvm.a" on Unix, "VM.LIB" on
|
||||
DOS.
|
||||
* The final line includes the rules file. In this case, we include a
|
||||
set of rules to build a library.
|
||||
|
||||
Let's look at another Makefile, this one for the Harbour compiler:
|
||||
|
||||
-- Cut here ---------------------------------------
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
YACC_SOURCE=harbour.y
|
||||
|
||||
LEX_SOURCE=harbour.l
|
||||
|
||||
C_SOURCES=\
|
||||
genobj32.c \
|
||||
|
||||
C_MAIN=harbour.c
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
-- Cut here ---------------------------------------
|
||||
|
||||
Notice how we now have other kinds of source files: yacc sources and
|
||||
lex sources. Also, since this is a Makefile for a stand-alone
|
||||
executable, we indicate the name for the file containing the "main"
|
||||
function, which also defines the executable name. The rules included
|
||||
in this Makefile are those appropriate to build a stand-alone binary.
|
||||
|
||||
One final Makefile, this one from the source directory:
|
||||
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-- Cut here ---------------------------------------
|
||||
ROOT = ../
|
||||
|
||||
DIRS=\
|
||||
compiler \
|
||||
hbpp \
|
||||
rtl \
|
||||
vm \
|
||||
rdd \
|
||||
tools \
|
||||
|
||||
include $(ROOT)config/dir.cf
|
||||
-- Cut here ---------------------------------------
|
||||
|
||||
This Makefile is used to traverse the subdirectories hanging from the
|
||||
current directory. It simply lists all the subdirectories to be
|
||||
traversed.
|
||||
|
||||
Now. let's take a look at the rules themselves. They all live in the
|
||||
config/ directory, with the following structure:
|
||||
|
||||
config/: The generic configuration files.
|
||||
config/win32: Configuration files for win32 platforms.
|
||||
|
||||
|
||||
Finally, you will notice one thing: the build system compiles
|
||||
everything into a subdirectory (for example, win32/gcc for WIN32 files
|
||||
compiled with gcc). This has two advantages:
|
||||
|
||||
1. It allows you to compile for multiple platforms/compilers at the
|
||||
same time.
|
||||
2. It creates all temporary, object, binary, intermediate, etc. files
|
||||
in the subdirectory; cleaning up is very easy.
|
||||
|
||||
|
||||
USAGE
|
||||
=====
|
||||
|
||||
To use the system, you need to install GNU-make 3.75 or later in your
|
||||
system. To check this, type "make -v"; you should see
|
||||
|
||||
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
|
||||
...
|
||||
|
||||
Then, you must set a couple of environment variables that indicate
|
||||
your architecture and compiler.
|
||||
|
||||
For gcc on Win95/WinNT:
|
||||
|
||||
HB_ARCHITECTURE win32
|
||||
HB_COMPILER gcc
|
||||
|
||||
For MSVC on Win95/WinNT:
|
||||
|
||||
HB_ARCHITECTURE win32
|
||||
HB_COMPILER msvc
|
||||
|
||||
These are the only two supported compilers right now (guess which ones
|
||||
I own).
|
||||
|
||||
If you issue a "make install", it will try to install your header,
|
||||
executable and library files into directories given by
|
||||
|
||||
HB_BIN_DIR
|
||||
HB_LIB_DIR
|
||||
HB_INC_DIR
|
||||
|
||||
You can set those as environment variables too.
|
||||
|
||||
The most used targets are these:
|
||||
|
||||
* all: Same as typing "make" without arguments. It will usually try to
|
||||
compile and link the obvious target in the directory.
|
||||
|
||||
* clean: Clean up everything made by make.
|
||||
|
||||
* install: Install stuff into the appropriate directory.
|
||||
@@ -18,12 +18,15 @@ C_HEADERS=\
|
||||
pcode.h \
|
||||
set.h \
|
||||
types.h \
|
||||
version.h \
|
||||
|
||||
PRG_HEADERS=\
|
||||
cgi.ch \
|
||||
error.ch \
|
||||
inkey.ch \
|
||||
set.ch \
|
||||
setcurs.ch \
|
||||
test.ch \
|
||||
|
||||
API_HEADERS=\
|
||||
error.api \
|
||||
|
||||
@@ -6,6 +6,7 @@ ROOT = ../
|
||||
|
||||
DIRS=\
|
||||
compiler \
|
||||
hbpp \
|
||||
rtl \
|
||||
vm \
|
||||
rdd \
|
||||
|
||||
13
harbour/source/hbpp/Makefile
Normal file
13
harbour/source/hbpp/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
harb.c \
|
||||
table.c \
|
||||
|
||||
C_MAIN=hbpp.c
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,8 +1,21 @@
|
||||
#include <stdio.h>
|
||||
#include <mem.h>
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if defined(__DJGPP__)
|
||||
#ifndef __dj_include_stdio_h_
|
||||
#include <alloc.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__DJGPP__) || defined(__GNUC__)
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <mem.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "harb.h"
|
||||
/*
|
||||
* Split given filename into path, name and extension
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------
|
||||
Definitions, copied from Harbour.y and types.h */
|
||||
|
||||
@@ -24,4 +28,4 @@ void * _xgrab( ULONG ); /* allocates fixed memory */
|
||||
void * _xrealloc( void *, ULONG ); /* reallocates memory */
|
||||
void _xfree( void * ); /* frees fixed memory */
|
||||
|
||||
/* ------------------------------------------ */
|
||||
/* ------------------------------------------ */
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Harbour Preprocessor , version 0.8
|
||||
author - Alexander Kresin */
|
||||
|
||||
#if defined(__DJGPP__) || defined(__GNUC__)
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <mem.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <mem.h>
|
||||
#include <ctype.h>
|
||||
#include "harb.h"
|
||||
|
||||
@@ -99,7 +111,7 @@ int kolcommands = 0, maxcommands = INITIAL_ACOM_SIZE;
|
||||
|
||||
int main (int argc,char* argv[])
|
||||
{
|
||||
int handl_i,handl_o,i;
|
||||
int handl_i,handl_o;
|
||||
char szFileName[ _POSIX_PATH_MAX ];
|
||||
FILENAME *pFileName =NULL;
|
||||
|
||||
@@ -230,7 +242,7 @@ int ParseDirective( char* sLine )
|
||||
{ printf("\nCan't open %s",sLine); return 1001; }
|
||||
|
||||
lInclude++;
|
||||
Hp_Parse(handl_i, NULL);
|
||||
Hp_Parse(handl_i, 0);
|
||||
lInclude--;
|
||||
close(handl_i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
|
||||
@@ -10,17 +10,23 @@ C_SOURCES=\
|
||||
codebloc.c \
|
||||
console.c \
|
||||
dates.c \
|
||||
descend.c \
|
||||
dir.c \
|
||||
environ.c \
|
||||
errorapi.c \
|
||||
extend.c \
|
||||
files.c \
|
||||
gtapi.c \
|
||||
hardcr.c \
|
||||
itemapi.c \
|
||||
math.c \
|
||||
mtran.c \
|
||||
set.c \
|
||||
strcmp.c \
|
||||
strings.c \
|
||||
transfrm.c \
|
||||
\
|
||||
msgxxx.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
asort.prg \
|
||||
|
||||
@@ -246,7 +246,6 @@ HARBOUR CLASSCREATE()
|
||||
{
|
||||
WORD wSuper = _parni( 3 ); /* Super class present */
|
||||
WORD wSize;
|
||||
PHB_ITEM pItem;
|
||||
PCLASS pNewCls;
|
||||
PCLASS pSprCls;
|
||||
|
||||
@@ -939,7 +938,6 @@ HARBOUR __INSTSUPER( void )
|
||||
{
|
||||
PHB_ITEM pString = _param( 1, IT_STRING );
|
||||
PDYNSYM pDynSym;
|
||||
PHB_ITEM pSuperCls;
|
||||
BYTE bFound = FALSE;
|
||||
WORD w;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <ctoharb.h>
|
||||
#include <dates.h>
|
||||
#include <set.h>
|
||||
#ifdef __DJGPP__
|
||||
#if defined(__DJGPP__) || defined(__GNUC__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef USE_GTAPI
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <extend.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <itemapi.h>
|
||||
|
||||
#if defined(__GNUC__) || defined(__DJGPP__)
|
||||
@@ -85,6 +86,10 @@
|
||||
#undef DIRECTORY
|
||||
#endif
|
||||
|
||||
|
||||
static BOOL hb_strMatchDOS (char *pszString, char *pszMask);
|
||||
|
||||
|
||||
HARBOUR DIRECTORY( void )
|
||||
{
|
||||
#if defined(HAVE_POSIX_IO)
|
||||
@@ -106,13 +111,7 @@ HARBOUR DIRECTORY( void )
|
||||
char fname[_POSIX_PATH_MAX+1];
|
||||
char fext[_POSIX_PATH_MAX+1];
|
||||
char filesize[10];
|
||||
char yyear[5];
|
||||
char mmonth[3];
|
||||
char dday[3];
|
||||
char ddate[9];
|
||||
char hh[3];
|
||||
char mm[3];
|
||||
char ss[3];
|
||||
char ttime[9];
|
||||
int attrib;
|
||||
char aatrib[7];
|
||||
@@ -141,7 +140,7 @@ HARBOUR DIRECTORY( void )
|
||||
if( pos )
|
||||
{
|
||||
strcpy(pattern,(pos+1));
|
||||
string[pos-string+1] = '\0';
|
||||
*(pos+1) = '\0';
|
||||
strcpy(dirname,string);
|
||||
}
|
||||
else
|
||||
@@ -166,7 +165,7 @@ HARBOUR DIRECTORY( void )
|
||||
if( pos )
|
||||
{
|
||||
strcpy(pfext,(pos+1));
|
||||
string[pos-string] = '\0';
|
||||
*pos = '\0';
|
||||
strcpy(pfname,string);
|
||||
}
|
||||
else
|
||||
@@ -204,7 +203,7 @@ HARBOUR DIRECTORY( void )
|
||||
if( pos )
|
||||
{
|
||||
strcpy(fext,(pos+1));
|
||||
string[pos-string] = '\0';
|
||||
*pos = '\0';
|
||||
strcpy(fname,string);
|
||||
}
|
||||
else
|
||||
@@ -224,8 +223,6 @@ HARBOUR DIRECTORY( void )
|
||||
if (hb_strMatchDOS( fname,pfname) && hb_strMatchDOS( fext,pfext))
|
||||
{
|
||||
|
||||
ddate[0] = '\0';
|
||||
ttime[0] = '\0';
|
||||
aatrib[0] = '\0';
|
||||
filesize[0] = '\0';
|
||||
filename[0] = '\0';
|
||||
@@ -242,54 +239,23 @@ HARBOUR DIRECTORY( void )
|
||||
}
|
||||
|
||||
fsize = statbuf.st_size;
|
||||
ltoa(fsize,filesize,10);
|
||||
sprintf(filesize, "%ld", fsize);
|
||||
ftime = statbuf.st_mtime;
|
||||
ft = localtime(&ftime);
|
||||
|
||||
itoa(ft->tm_year+1900,yyear,10);
|
||||
strcat(ddate,yyear);
|
||||
itoa(ft->tm_mon,mmonth,10);
|
||||
if (strlen(mmonth) < 2)
|
||||
{
|
||||
strcat(mmonth,"0");
|
||||
strrev(mmonth);
|
||||
}
|
||||
strcat(ddate,mmonth);
|
||||
itoa(ft->tm_mday,dday,10);
|
||||
if (strlen(dday) < 2)
|
||||
{
|
||||
strcat(dday,"0");
|
||||
strrev(dday);
|
||||
}
|
||||
strcat(ddate,dday);
|
||||
itoa(ft->tm_hour,hh,10);
|
||||
if (strlen(hh) < 2)
|
||||
{
|
||||
strcat(hh,"0");
|
||||
strrev(hh);
|
||||
}
|
||||
strcat(ttime,hh);
|
||||
strcat(ttime,":");
|
||||
itoa(ft->tm_min,mm,10);
|
||||
if (strlen(mm) < 2)
|
||||
{
|
||||
strcat(mm,"0");
|
||||
strrev(mm);
|
||||
}
|
||||
strcat(ttime,mm);
|
||||
strcat(ttime,":");
|
||||
itoa(ft->tm_sec,ss,10);
|
||||
if (strlen(ss) < 2)
|
||||
{
|
||||
strcat(ss,"0");
|
||||
strrev(ss);
|
||||
}
|
||||
strcat(ttime,ss);
|
||||
sprintf(ddate, "%04d%02d%02d",
|
||||
ft->tm_year+1900, ft->tm_mon, ft->tm_mday);
|
||||
sprintf(ttime, "%02d:%02d:%02d",
|
||||
ft->tm_hour, ft->tm_min, ft->tm_sec);
|
||||
|
||||
/* debug code
|
||||
printf("\n name date time %s %s %s ",entry,ddate,ttime);
|
||||
while(0==getchar());
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) || defined(__DJGPP__)
|
||||
aatrib[0] = '\0';
|
||||
#else
|
||||
/* TODO: seems to not clear on root entries ? */
|
||||
attrib = _chmod(fullfile,0);
|
||||
if (attrib & FA_ARCH)
|
||||
@@ -304,17 +270,18 @@ HARBOUR DIRECTORY( void )
|
||||
strcat(aatrib,"R");
|
||||
if (attrib & FA_SYSTEM)
|
||||
strcat(aatrib,"S");
|
||||
#endif
|
||||
|
||||
/* TODO: attribute match rtn */
|
||||
pos = 0;
|
||||
pos = string;
|
||||
if( arg2_it && _parclen(2) >= 1)
|
||||
{
|
||||
strcpy(string, _parc(2));
|
||||
while (string[pos]) string[pos] = toupper(string[pos]);
|
||||
while (*pos != '\0') *pos = toupper(*pos);
|
||||
pos = strchr(string,*aatrib);
|
||||
}
|
||||
else
|
||||
pos = 1;
|
||||
pos = string;
|
||||
|
||||
if ( pos )
|
||||
{
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#include <extend.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <mingw32/share.h>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__DJGPP__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -269,6 +273,7 @@ int _fsLock( int handle, long start, long length, long mode )
|
||||
{
|
||||
int result=0;
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__DJGPP__)
|
||||
#if defined(HAVE_POSIX_IO)
|
||||
if (mode == FL_LOCK)
|
||||
{
|
||||
@@ -283,6 +288,7 @@ int _fsLock( int handle, long start, long length, long mode )
|
||||
last_error = errno;
|
||||
}
|
||||
result = (last_error=0?1:0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return result;
|
||||
|
||||
27
harbour/source/rtl/msgxxx.c
Normal file
27
harbour/source/rtl/msgxxx.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if !defined(HB_LANGUAGE)
|
||||
#define HB_LANGUAGE UK
|
||||
#endif
|
||||
|
||||
#if (HB_LANGUAGE == DUT)
|
||||
#include "natmsg/msgdut.c"
|
||||
#elif (HB_LANGUAGE == GAL)
|
||||
#include "natmsg/msggal.c"
|
||||
#elif (HB_LANGUAGE == GER)
|
||||
#include "natmsg/msgger.c"
|
||||
#elif (HB_LANGUAGE == HU)
|
||||
#include "natmsg/msghu.c"
|
||||
#elif (HB_LANGUAGE == POR)
|
||||
#include "natmsg/msgpor.c"
|
||||
#elif (HB_LANGUAGE == R1251)
|
||||
#include "natmsg/msgr1251.c"
|
||||
#elif (HB_LANGUAGE == RU886)
|
||||
#include "natmsg/msgru886.c"
|
||||
#elif (HB_LANGUAGE == SPA)
|
||||
#include "natmsg/msgspa.c"
|
||||
#elif (HB_LANGUAGE == UK)
|
||||
#include "natmsg/msguk.c"
|
||||
#endif
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Language support unit for Galician
|
||||
*
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -10,4 +14,4 @@ char *hb_monthsname[ 12 ] = {
|
||||
char *hb_daysname[ 7 ] = {
|
||||
"Sonntag", "Montag", "Dienstag",
|
||||
"Mittwoch", "Donnerstag", "Freitag",
|
||||
"Samstag" };
|
||||
"Samstag" };
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Hungarian language module (2 char. ISO language code: HU) */
|
||||
/* Codepage: 852 */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <extend.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* English language module */
|
||||
/* Codepage: N/A */
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) || defined(__DJGPP__)
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <extend.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#ifdef __DJGPP__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
/* #include <sys/stat.h> */
|
||||
|
||||
#include <set.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -104,7 +106,13 @@ static int open_handle (char * file_name, BOOL bMode, char * def_ext)
|
||||
/* Open the file either in append (bMode) or truncate mode (!bMode), but
|
||||
always use binary mode */
|
||||
handle = open (path, O_BINARY | O_WRONLY | O_CREAT | (bMode ? O_APPEND : O_TRUNC )); /* , S_IWRITE); */
|
||||
if (handle < 0) printf("\nError %d creating %s (DOS error %02x)", errno, path, _doserrno);
|
||||
if (handle < 0)
|
||||
{
|
||||
printf("\nError %d creating %s", errno, path);
|
||||
#if !defined(__GNUC__) && !defined(__DJGPP__)
|
||||
printf(" (DOS error %02x)", _doserrno);
|
||||
#endif
|
||||
}
|
||||
if (handle < 0)
|
||||
{
|
||||
char error_message [32];
|
||||
|
||||
@@ -5,12 +5,30 @@
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
asciisum.c \
|
||||
ascpos.c \
|
||||
atdiff.c \
|
||||
chareven.c \
|
||||
charmix.c \
|
||||
charodd.c \
|
||||
chrcount.c \
|
||||
chrfirst.c \
|
||||
chrtotal.c \
|
||||
datesx.c \
|
||||
debug.c \
|
||||
genobj.c \
|
||||
hb_f.c \
|
||||
io.c \
|
||||
mathx.c \
|
||||
strasint.c \
|
||||
strcount.c \
|
||||
strcspn.c \
|
||||
strdiff.c \
|
||||
strexpan.c \
|
||||
stringsx.c \
|
||||
strleft.c \
|
||||
strpbrk.c \
|
||||
strright.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
stringp.prg \
|
||||
|
||||
@@ -8,63 +8,108 @@ PRG_SOURCES=\
|
||||
ainstest.prg \
|
||||
and_or.prg \
|
||||
array16.prg \
|
||||
arrayidx.prg \
|
||||
arrays.prg \
|
||||
arrindex.prg \
|
||||
asctest.prg \
|
||||
atest.prg \
|
||||
byref.prg \
|
||||
calling.prg \
|
||||
cdow.prg \
|
||||
clasinit.prg \
|
||||
classes.prg \
|
||||
codebl.prg \
|
||||
codebl2.prg \
|
||||
codebloc.prg \
|
||||
comments.prg \
|
||||
dates.prg \
|
||||
dates2.prg \
|
||||
dates3.prg \
|
||||
debugtst.prg \
|
||||
descend.prg \
|
||||
dirtest.prg \
|
||||
docase.prg \
|
||||
dupvars.prg \
|
||||
dynobj.prg \
|
||||
empty.prg \
|
||||
errorsys.prg \
|
||||
exittest.prg \
|
||||
fib.prg \
|
||||
fileio.prg \
|
||||
filexist.prg \
|
||||
fornext.prg \
|
||||
fornext2.prg \
|
||||
funcarr.prg \
|
||||
guess.prg \
|
||||
hardcr.prg \
|
||||
hello.prg \
|
||||
ifelse.prg \
|
||||
ifinline.prg \
|
||||
inherit.prg \
|
||||
inifiles.prg \
|
||||
initexit.prg \
|
||||
inline.prg \
|
||||
instr.prg \
|
||||
iotest.prg \
|
||||
iotest2.prg \
|
||||
keywords.prg \
|
||||
longstr.prg \
|
||||
mankala.prg \
|
||||
mathtest.prg \
|
||||
mtran.prg \
|
||||
multiarg.prg \
|
||||
next.prg \
|
||||
nums.prg \
|
||||
objarr.prg \
|
||||
objasign.prg \
|
||||
objects.prg \
|
||||
operat.prg \
|
||||
os.prg \
|
||||
output.prg \
|
||||
overload.prg \
|
||||
passref.prg \
|
||||
procname.prg \
|
||||
readhrb.prg \
|
||||
recursiv.prg \
|
||||
returns.prg \
|
||||
rtl_test.prg \
|
||||
scroll.prg \
|
||||
set_num.prg \
|
||||
set_test.prg \
|
||||
spawn.prg \
|
||||
spawn2.prg \
|
||||
statfun.prg \
|
||||
statics.prg \
|
||||
strcmp.prg \
|
||||
strdelim.prg \
|
||||
strings.prg \
|
||||
strings2.prg \
|
||||
strings3.prg \
|
||||
strings4.prg \
|
||||
strip.prg \
|
||||
t1.prg \
|
||||
test.prg \
|
||||
test10.prg \
|
||||
test_all.prg \
|
||||
testcgi.prg \
|
||||
testerro.prg \
|
||||
testfor.prg \
|
||||
testgt.prg \
|
||||
testhbf.prg \
|
||||
testhtml.prg \
|
||||
testid.prg \
|
||||
testinc.prg \
|
||||
testmem.prg \
|
||||
teststr.prg \
|
||||
testtok.prg \
|
||||
testvars.prg \
|
||||
transfrm.prg \
|
||||
val.prg \
|
||||
version.prg \
|
||||
while.prg \
|
||||
|
||||
BAD_PRG_SOURCES=\
|
||||
dupvars.prg \
|
||||
|
||||
LIBS=\
|
||||
vm \
|
||||
rtl \
|
||||
|
||||
Reference in New Issue
Block a user