Commit eb4b8c1b authored by John P. Willis's avatar John P. Willis
Browse files

Attempt to support Tru64 UNIX

parent 42a85abb
Pipeline #552 passed with stage
in 1 minute and 12 seconds
......@@ -448,3 +448,8 @@ VERSION 0.28.1
VERSION 0.28.2
Fix configure.ac problem
********************************************************************************
VERSION 0.28.3
Attempt to support Tru64 UNIX
......@@ -37,7 +37,7 @@
#
#
AC_INIT(freem, 0.28.2, jpw@coherent-logic.com)
AC_INIT(freem, 0.28.3, jpw@coherent-logic.com)
AC_CONFIG_HEADERS([src/config.h])
#AC_CHECK_LIB([readline], [readline])
#AC_CHECK_LIB([readline], [history_list])
......
......@@ -4,7 +4,7 @@
@settitle The FreeM Manual
@copying
This manual is for FreeM, (version 0.28.2), which is a free and open-source implementation of the M programming language and database system.
This manual is for FreeM, (version 0.28.3), which is a free and open-source implementation of the M programming language and database system.
Copyright @copyright{} 2020 Coherent Logic Development LLC
......@@ -18,7 +18,7 @@ Permission is granted to copy, distribute and/or modify this document under the
@title The FreeM Manual
@subtitle @sc{The Official Manual of FreeM}
@subtitle Version 0.28.2
@subtitle Version 0.28.3
@c@vskip 10pt
@c@center @image{freem-logo-sm,,,,.png}
@author John P. Willis
......@@ -279,7 +279,7 @@ The FreeM direct-mode environment is the mode entered when FreeM is loaded witho
@example
Coherent Logic Development FreeM
Version 0.28.2-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
Version 0.28.3-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
*
* *
......@@ -1291,7 +1291,7 @@ In the above @emph{inclusive} form, @code{KVALUE} will kill the data values at e
@cartouche
@quotation
@emph{Note}
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.28.2, but are planned for a future release.
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.28.3, but are planned for a future release.
@end quotation
@end cartouche
......
......@@ -109,7 +109,7 @@
#define GET 'Y'
#define GETX ':'
#if !defined(__OpenBSD__)
#if !defined(__OpenBSD__) && !defined(__osf__)
long time ();
#endif
......
......@@ -103,7 +103,7 @@ static void panic (void);
#define BOTTOM 6
#define DATA 8
#if !defined(__OpenBSD__) && !defined(_AIX)
#if !defined(__OpenBSD__) && !defined(_AIX) && !defined(__osf__)
long time ();
#endif
......
......@@ -68,6 +68,8 @@ extern char config_file[4096];
# include <sys/syslimits.h>
#endif
ini_keyvalue *ini_head;
/* prototypes for internal-use-only functions */
int read_profile_string(char *file, char *section, char *key, char *value);
......@@ -219,3 +221,103 @@ int file_exists(char *filename)
return(FALSE);
}
}
void write_profile_string(char *file, char *section, char *key, char *value)
{
ini_keyvalue *ini_head;
}
ini_keyvalue *ini_insert(ini_section *s, char *section, char *key, char *value)
{
ini_section *t;
for (t = s; t != NULL; t = t->next) {
if (strcmp (t->name, section) == 0) {
/* this section already exists. update. */
return ini_kv_insert (s, key, value);
}
}
/* section does not exist. insert. */
t = (ini_section *) malloc (sizeof (ini_section));
t->name = (char *) malloc ((strlen (section) + 1) * sizeof (char));
strcpy (t->name, section);
t->next = s;
s = t;
return ini_kv_insert (s, key, value);
}
ini_keyvalue *ini_kv_insert(ini_section *s, char *key, char *value)
{
ini_keyvalue *t;
for (t = s->head; t != NULL; t = t->next) {
if (strcmp (t->key, key) == 0) {
/* this is an update */
free (t->value);
t->value = (char *) malloc ((strlen (value) + 1) * sizeof (char));
strcpy (t->value, value);
return t;
}
}
/* this is an insert */
t = (ini_keyvalue *) malloc (sizeof (ini_keyvalue));
t->key = (char *) malloc ((strlen (key) + 1) * sizeof (char));
t->value = (char *) malloc ((strlen (value) + 1) * sizeof (char));
strcpy (t->key, key);
strcpy (t->value, value);
t->next = s->head;
s->head = t;
return t;
}
void ini_section_delete(ini_section *head, char *name)
{
ini_section *t = head;
ini_section *p = NULL;
if ((t != (ini_section *) NULL) && (strcmp (t->name, name) == 0)) {
head = t->next;
free (t->name);
free (t);
return;
}
while ((t != NULL) && (strcmp (t->name, name) != 0)) {
p = t;
t = t->next;
}
if (t == NULL) return;
free (t->name);
free (t);
return;
}
void ini_key_delete(ini_section *head, char *key)
{
}
......@@ -43,7 +43,26 @@
#define CONF_BUFSIZE 255
typedef struct ini_keyvalue {
char *key;
char *value;
struct ini_keyvalue *next;
} ini_keyvalue;
typedef struct ini_section {
char *name;
ini_keyvalue *head;
struct ini_section *next;
} ini_section;
extern int get_conf(char *section, char *key, char *value);
extern int file_exists(char *filename);
#endif
\ No newline at end of file
extern void write_profile_string(char *file, char *section, char *key, char *value);
extern ini_keyvalue *ini_insert(ini_section *s, char *section, char *key, char *value);
extern ini_keyvalue *ini_kv_insert(ini_section *s, char *key, char *value);
extern void ini_section_delete(ini_section *head, char *name);
extern void ini_key_delete(ini_section *head, char *key);
#endif
......@@ -60,7 +60,7 @@
#include "version.h"
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX)
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX) && !defined(__osf__)
# include <getopt.h>
#endif
......@@ -79,7 +79,7 @@ int main (int argc, char **argv, char **envp)
int option_index = 0;
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX)
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX) && !defined(__osf__)
struct option long_options[] = {
{"hardcopy", no_argument, &hardcopy, ENABLE},
{"filter", no_argument, &filter, TRUE},
......@@ -120,7 +120,7 @@ int main (int argc, char **argv, char **envp)
strncpy (config_file, SYSCONFDIR"/freem.conf", 100);
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX)
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX) && !defined(__osf__)
while(1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment