Commit e70e2df6 authored by Erick's avatar Erick

.

parent d155dc30
......@@ -18,7 +18,7 @@
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
;; Last file update: 28-Nov-2006 23:57 (eg)
;; Last file update: 15-Jan-2012 22:52 (eg)
;;
;; ======================================================================
......@@ -704,7 +704,7 @@ as a form which, when read, will build back this point:])
(fontified-code [
(define-method write-object ((p <point>) port)
(format port "#,(make <point> :x ~S :y ~S"
(format port "#,(make <point> :x ~S :y ~S)"
(get-x p) (get-y p)))
])
......@@ -715,7 +715,8 @@ prints the following text on the output port:])
(p [Note here the usage of the ,(q (code "#,")) notation of ,(link-srfi 10)
to ,(q "evaluate") the form when reading it,(footnote [We suppose here that
we are in a context where ,(fontified-code [(define-reader-ctor 'make make)])
we are in a context where
,(fontified-code [(define-reader-ctor 'make (lambda l (eval `(make ,@l))))])
as already been evaluated]).])
;;;; Comparing Objects ..................
......
# Makefile for stklos-pkgman
# Author: Erick Gallesio [eg@essi.fr]
# Creation date: 22-Dec-2006 12:00 (eg)
# Last file update: 4-Dec-2011 16:48 (eg)
# Last file update: 2-Jan-2012 13:21 (eg)
makefiledir= $(prefix)/etc/stklos
......@@ -11,7 +11,6 @@ bin_SCRIPTS = stklos-pkg
LEX = lang-bigloo.l lang-chicken.l lang-mzscheme.l
LEXOBJS = lang-bigloo.inc lang-chicken.inc lang-mzscheme.inc
SRC = ../lib/http.stk \
main.stk add.stk copy.stk extract.stk install.stk lang.stk \
params.stk pkgball.stk \
......@@ -19,7 +18,9 @@ SRC = ../lib/http.stk \
SFLAGS =
RM = /bin/rm
COMP = ../utils/tmpcomp
GENLEX = ../utils/tmpgenlex
GENLEX = ../utils/tmpgenlex
all: $(bin_SCRIPTS)
lang-bigloo.inc: lang-bigloo.l
$(GENLEX) lang-bigloo.l lang-bigloo.inc lang-bigloo
......@@ -30,12 +31,11 @@ lang-chicken.inc: lang-chicken.l
lang-mzscheme.inc: lang-mzscheme.l
$(GENLEX) lang-mzscheme.l lang-mzscheme.inc lang-mzscheme
$(bin_SCRIPTS): $(LEXOBJS) $(SRC)
$(bin_SCRIPTS): $(LEXOBJS) $(SRC)
$(COMP) main.stk $(bin_SCRIPTS)
clean:
$(RM) -f $(bin_SCRIPTS) *~
$(RM) -f $(bin_SCRIPTS) $(LEXOBJS) *~
distclean: clean
$(RM) -f Makefile
......@@ -18,7 +18,7 @@
# Makefile for stklos-pkgman
# Author: Erick Gallesio [eg@essi.fr]
# Creation date: 22-Dec-2006 12:00 (eg)
# Last file update: 4-Dec-2011 16:48 (eg)
# Last file update: 2-Jan-2012 13:21 (eg)
VPATH = @srcdir@
......@@ -218,7 +218,7 @@ SRC = ../lib/http.stk \
SFLAGS =
RM = /bin/rm
COMP = ../utils/tmpcomp
GENLEX = ../utils/tmpgenlex
GENLEX = ../utils/tmpgenlex
all: all-am
.SUFFIXES:
......@@ -452,6 +452,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-makefileDATA
uninstall-makefileDATA
all: $(bin_SCRIPTS)
lang-bigloo.inc: lang-bigloo.l
$(GENLEX) lang-bigloo.l lang-bigloo.inc lang-bigloo
......@@ -461,11 +463,11 @@ lang-chicken.inc: lang-chicken.l
lang-mzscheme.inc: lang-mzscheme.l
$(GENLEX) lang-mzscheme.l lang-mzscheme.inc lang-mzscheme
$(bin_SCRIPTS): $(LEXOBJS) $(SRC)
$(bin_SCRIPTS): $(LEXOBJS) $(SRC)
$(COMP) main.stk $(bin_SCRIPTS)
clean:
$(RM) -f $(bin_SCRIPTS) *~
$(RM) -f $(bin_SCRIPTS) $(LEXOBJS) *~
distclean: clean
$(RM) -f Makefile
......
......@@ -2,7 +2,7 @@
*
* s y s t e m . c -- System relative primitives
*
* Copyright © 1994-2011 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 1994-2012 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* Permission to use, copy, modify, distribute,and license this
......@@ -16,7 +16,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 29-Mar-1994 10:57
* Last file update: 27-May-2011 22:47 (eg)
* Last file update: 2-Jan-2012 13:23 (eg)
*/
#include <unistd.h>
......@@ -614,12 +614,13 @@ DEFINE_PRIMITIVE("temporary-file-name", tmp_file, subr0, (void))
return s ? STk_Cstring2string(s) : STk_false;
#else
static int cpt=0;
int pid = (int) getpid();
char buff[MAX_PATH_LENGTH];
MUT_DECL(tmpnam_mutex);
MUT_LOCK(tmpnam_mutex);
for ( ; ; ) {
sprintf(buff, "/tmp/stklos%05x", cpt++);
sprintf(buff, "/tmp/stklos%05d-%05x", pid, cpt++);
if (cpt > 100000) /* arbitrary limit to avoid infinite search */
return STk_false;
if (access(buff, F_OK) == -1) break;
......
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