Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent 863efc9 commit b7345340945a946b1a76f73840c241757de22d52 @marcomaggi committed Nov 9, 2011
View
22 doc/vicare.texi
@@ -4497,7 +4497,7 @@ example in the previous section):
All the file--related functions defined by @rnrs{6} accept a Scheme
string as representing a file pathname; internally such string is
-converted to a bytevector to be handed to the underlying operative
+converted to a bytevector to be handed to the underlying operating
system. The following bindings are exported by the @library{ikarus}
library.
@@ -5868,7 +5868,7 @@ the project. If a constant is not defined on a platform: its value is
set to @false{}.
@menu
-* posix env:: Operative system environment variables.
+* posix env:: Operating system environment variables.
* posix pid:: Process identifier functions.
* posix process:: Spawning processes and the like.
* posix status:: Process termination status.
@@ -6380,12 +6380,12 @@ positive exact integers. If an error occurs an exception is raised.
@menu
-* glibc env:: Operative system environment variables.
+* glibc env:: Operating system environment variables.
@end menu
@c page
@node glibc env
-@section Operative system environment variables
+@section Operating system environment variables
@defun clearenv
@@ -6415,13 +6415,13 @@ On non-Linux platform we must avoid calling these functions, else the
behaviour is undefined.
@menu
-* linux env:: Operative system environment variables.
+* linux env:: Operating system environment variables.
* linux status:: Process termination status.
@end menu
@c page
@node linux env
-@section Operative system environment variables
+@section Operating system environment variables
@defun clearenv
@@ -7518,7 +7518,7 @@ Extract the payload bits from a transcoder and return them as fixnum.
The executable @value{EXECUTABLE} defines a number of C language
functions that can be invoked by compiled code to access various
-services, both to handle startup and to access the operative system.
+services, both to handle startup and to access the operating system.
When on a @gnu{}+Linux system: the Linux specific functions are
available; when on other systems: calling such functions will terminate
@@ -7552,14 +7552,14 @@ the Scheme language level; the conversion is performed with the function
in the parameter @func{string->filename-func}.
The authoritative documentation for all the interface functions is the
-one of the C library on the platform's operative system; this file gives
+one of the C library on the platform's operating system; this file gives
only a brief overview of the features and explains the Scheme
adaptation.
@menu
* capi posix adding:: How to add a @posix{} primitive.
* capi posix errno:: Handling @code{errno} codes.
-* capi posix env:: Operative system environment variables.
+* capi posix env:: Operating system environment variables.
* capi posix fd:: File descriptors.
* capi posix pid:: Process identifier functions.
* capi posix files:: File system interface.
@@ -8520,12 +8520,12 @@ true if the process was resumed by delivery of @code{SIGCONT}.
@menu
-* capi glibc env:: Operative system environment variables.
+* capi glibc env:: Operating system environment variables.
@end menu
@c page
@node capi glibc env
-@subsection Operative system environment variables
+@subsection Operating system environment variables
@deftypefun ikrt ikrt_glibc_clearenv (void)
View
4 lib/vicare/unsafe-capi.sls
@@ -34,7 +34,7 @@
;; error handling
posix-strerror
- ;; operative system environment variables
+ ;; operating system environment variables
posix-getenv posix-setenv
posix-unsetenv posix-environ
glibc-clearenv
@@ -84,7 +84,7 @@
-;;;; operative system environment variables
+;;;; operating system environment variables
(define-inline (posix-getenv varname-bv)
(foreign-call "ikrt_posix_getenv" varname-bv))
View
6 scheme/ikarus.glibc.sls
@@ -27,11 +27,11 @@
(library (ikarus.glibc)
(export
- ;; operative system environment variables
+ ;; operating system environment variables
clearenv
)
(import (except (ikarus)
- ;; operative system environment variables
+ ;; operating system environment variables
clearenv
)
(vicare syntactic-extensions)
@@ -85,7 +85,7 @@
(assertion-violation who "expected fixnum signal code as argument" obj))
-;;;; operative system environment variables
+;;;; operating system environment variables
(define-for-glibc (clearenv)
(capi.glibc-clearenv))
View
6 scheme/ikarus.io.sls
@@ -464,7 +464,7 @@
string->filename-func
filename->string-func
- ;; spawning operative system processes
+ ;; spawning operating system processes
process process-nonblocking process*
;; networking
@@ -572,7 +572,7 @@
string->filename-func
filename->string-func
- ;; spawning operative system processes
+ ;; spawning operating system processes
process process-nonblocking process*
;; networking
@@ -1984,7 +1984,7 @@
;;Field name: dest
;;Accessor name: (cookie-dest COOKIE)
;; If an underlying device exists: this field holds a reference to it,
-;; for example a fixnum representing an operative system file
+;; for example a fixnum representing an operating system file
;; descriptor.
;;
;; If no device exists: this field is set to false.
View
2 scheme/ikarus.posix.sls
@@ -451,7 +451,7 @@
(define INTERPROCESS-SIGNAL-VECTOR (make-interprocess-signal-vector)))
-;;;; operative system environment variables
+;;;; operating system environment variables
(define (getenv key)
(define who 'getenv)
View
2 scheme/makefile.sps
@@ -6,7 +6,7 @@
;;;Abstract
;;;
;;; This file is an R6RS-compliant Scheme program, using some
-;;; Vicare's extension. When run in the appropriate operative
+;;; Vicare's extension. When run in the appropriate operating
;;; system environment: it rebuilds Vicare's boot file
;;; "vicare.boot".
;;;
View
1 src/Makefile.am
@@ -28,7 +28,6 @@ SRCS = \
ikarus-verify-integrity.c \
ikarus-weak-pairs.c \
ikarus-winmmap.c \
- ikarus-winmmap.h \
ikarus.h
vicare_SOURCES = $(SRCS) ikarus.c
View
7 src/ikarus-glibc.c
@@ -39,13 +39,6 @@ feature_failure (const char * funcname)
/** --------------------------------------------------------------------
- ** Prototypes and external definitions.
- ** ----------------------------------------------------------------- */
-
-ikptr ik_errno_to_code (void);
-
-
-/** --------------------------------------------------------------------
** Operative system environment variables.
** ----------------------------------------------------------------- */
View
7 src/ikarus-linux.c
@@ -51,13 +51,6 @@ feature_failure (const char * funcname)
/** --------------------------------------------------------------------
- ** Prototypes and external definitions.
- ** ----------------------------------------------------------------- */
-
-ikptr ik_errno_to_code (void);
-
-
-/** --------------------------------------------------------------------
** Process exit status.
** ----------------------------------------------------------------- */
View
9 src/ikarus-posix.c
@@ -33,22 +33,17 @@
#include "ikarus.h"
#include <dirent.h>
-#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <time.h>
+#include <unistd.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <time.h>
-#include <unistd.h>
-
-#ifdef __CYGWIN__
-#include "ikarus-winmmap.h"
-#endif
/** --------------------------------------------------------------------
View
38 src/ikarus-runtime.c
@@ -16,33 +16,31 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+/** --------------------------------------------------------------------
+ ** Headers.
+ ** ----------------------------------------------------------------- */
-#include "ikarus-data.h"
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <limits.h>
+#include "ikarus.h"
+#include <dirent.h>
#include <fcntl.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
#include <unistd.h>
#include <sys/mman.h>
-#include <assert.h>
-#include <sys/time.h>
+#include <sys/param.h>
#include <sys/resource.h>
+#include <sys/time.h>
#include <sys/wait.h>
-#include <sys/param.h>
-#include <dirent.h>
-#ifdef __CYGWIN__
-#include "ikarus-winmmap.h"
-#endif
-ikptr ik_errno_to_code (void);
+
+/** --------------------------------------------------------------------
+ ** Prototypes and internal definitions.
+ ** ----------------------------------------------------------------- */
int total_allocated_pages = 0;
+int total_malloced = 0;
#define segment_size (pagesize*pagesize/4)
#define segment_shift (pageshift+pageshift-2)
@@ -51,6 +49,7 @@ int total_allocated_pages = 0;
ikptr ik_mmap(unsigned long int size);
void ik_munmap(ikptr mem, unsigned long int size);
+
static void
extend_table_maybe(ikptr p, unsigned long int size, ikpcb* pcb){
assert(size == align_to_next_page(size));
@@ -258,8 +257,7 @@ ik_munmap(ikptr mem, unsigned long int size){
#endif
}
-int total_malloced = 0;
-
+/* end of file */
void*
ik_malloc(int size){
View
17 src/ikarus-winmmap.c
@@ -15,28 +15,35 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#ifdef __CYGWIN__
+
+/** --------------------------------------------------------------------
+ ** Headers.
+ ** ----------------------------------------------------------------- */
+#include "ikarus.h"
#include <sys/mman.h>
#include <stdio.h>
#include <strings.h>
#include <errno.h>
#include <assert.h>
+
+/** --------------------------------------------------------------------
+ ** Internal definitions.
+ ** ----------------------------------------------------------------- */
+
#define pagesize 4096
#define pageshift 12
#define segment_size (16*pagesize)
#define segment_shift (4+pageshift)
-#include "ikarus-winmmap.h"
-
-/* vim:syntax=c */
static unsigned short* table = 0;
static char* ap = 0;
static size_t as = 0;
+
static void*
do_mmap(size_t n){
void* x = mmap(0, n, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
@@ -109,3 +116,5 @@ win_mmap(size_t size){
}
#endif
+
+/* end of file */
View
25 src/ikarus-winmmap.h
@@ -1,25 +0,0 @@
-/*
- * Ikarus Scheme -- A compiler for R6RS Scheme.
- * Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * 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, see <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include <stdlib.h>
-#ifdef __CYGWIN__
-void win_munmap(char* addr, size_t size);
-
-char* win_mmap(size_t size);
-#endif
View
6 src/ikarus.h
@@ -28,6 +28,7 @@
# include <config.h>
#endif
#include <assert.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -43,6 +44,11 @@
extern char **environ;
+#ifdef __CYGWIN__
+void win_munmap(char* addr, size_t size);
+char* win_mmap(size_t size);
+#endif
+
int ikarus_main (int argc, char** argv, char* boot_file);
ikptr ik_errno_to_code (void);

0 comments on commit b734534

Please sign in to comment.
Something went wrong with that request. Please try again.