summaryrefslogtreecommitdiffstats
path: root/byte.c
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:37 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:37 -0800
commit710a97992705d67c3ded0d4b270c5978ce29b11f (patch)
treeddcb2f7a91cbb86ce582e74227768b7b898c29e1 /byte.c
parent50eb784bfcf15ee3c6b0b53d747db92673395040 (diff)
downloadscm-710a97992705d67c3ded0d4b270c5978ce29b11f.tar.gz
scm-710a97992705d67c3ded0d4b270c5978ce29b11f.zip
Import Upstream version 5e4upstream/5e4
Diffstat (limited to 'byte.c')
-rw-r--r--byte.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/byte.c b/byte.c
index 644966f..c737139 100644
--- a/byte.c
+++ b/byte.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ SCM scm_make_bytes(k, n)
dst = UCHARS(res);
if (!UNBNDP(n)) {
ASRTER(INUMP(n) && 0 <= n && n <= MAKINUM(255), n, ARG2, s_make_bytes);
- for(i--;i >= 0;i--) dst[i] = INUM(n);
+ for (i--;i >= 0;i--) dst[i] = INUM(n);
}
return res;
}
@@ -71,7 +71,7 @@ SCM scm_bytes(ints)
ASRTER(i >= 0, ints, ARG1, s_bytes);
res = makstr(i);
data = UCHARS(res);
- for(;NNULLP(ints);ints = CDR(ints)) {
+ for (;NNULLP(ints);ints = CDR(ints)) {
int n = INUM(CAR(ints));
ASRTER(INUMP(CAR(ints)) && 0 <= n && n <= 255, ints, ARG1, s_bytes);
*data++ = n;
@@ -107,7 +107,7 @@ SCM scm_bytes2list(str)
unsigned char *src;
ASRTER(NIMP(str) && STRINGP(str), str, ARG1, s_bytes2list);
src = UCHARS(str);
- for(i = LENGTH(str)-1;i >= 0;i--) res = cons((SCM)MAKINUM(src[i]), res);
+ for (i = LENGTH(str)-1;i >= 0;i--) res = cons((SCM)MAKINUM(src[i]), res);
return res;
}
static char s_bt_reverse[] = "bytes-reverse!";
@@ -119,7 +119,7 @@ SCM scm_bytes_reverse(str)
ASRTER(NIMP(str) && STRINGP(str), str, ARG1, s_bt_reverse);
len = LENGTH(str);
dst = CHARS(str);
- for(k = (len - 1)/2;k >= 0;k--) {
+ for (k = (len - 1)/2;k >= 0;k--) {
int tmp = dst[k];
dst[k] = dst[len - k - 1];
dst[len - k - 1] = tmp;