1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from

unif.c.
strop.h: move prototypes too.
* posix.c (scm_init_posix): don't intern EINTR since it's now done
elsewhere.

* ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
etc.  I deleted them from filesys.c long ago, but didn't
notice they were here too (although ineffective since
sys/stat.h wasn't included).
This commit is contained in:
Gary Houston 1997-02-06 07:05:08 +00:00
parent 5862b540cd
commit c101e39e41
7 changed files with 66 additions and 131 deletions

View file

@ -1,3 +1,19 @@
Thu Feb 6 03:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
* strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
unif.c.
strop.h: move prototypes too.
Wed Feb 5 08:33:00 1997 Gary Houston <ghouston@actrix.gen.nz>
* posix.c (scm_init_posix): don't intern EINTR since it's now done
elsewhere.
* ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
etc. I deleted them from filesys.c long ago, but didn't
notice they were here too (although ineffective since
sys/stat.h wasn't included).
Tue Feb 4 18:17:50 1997 Tom Tromey <tromey@cygnus.com>
* eval.c: Don't define alloca in GCC case. gcc will automatically

View file

@ -473,80 +473,6 @@ scm_init_ioext ()
scm_sysintern ("SEEK_CUR", SCM_MAKINUM (SEEK_CUR));
scm_sysintern ("SEEK_END", SCM_MAKINUM (SEEK_END));
/* File type/permission bits. */
#ifdef S_IRUSR
scm_sysintern ("S_IRUSR", SCM_MAKINUM (S_IRUSR));
#endif
#ifdef S_IWUSR
scm_sysintern ("S_IWUSR", SCM_MAKINUM (S_IWUSR));
#endif
#ifdef S_IXUSR
scm_sysintern ("S_IXUSR", SCM_MAKINUM (S_IXUSR));
#endif
#ifdef S_IRWXU
scm_sysintern ("S_IRWXU", SCM_MAKINUM (S_IRWXU));
#endif
#ifdef S_IRGRP
scm_sysintern ("S_IRGRP", SCM_MAKINUM (S_IRGRP));
#endif
#ifdef S_IWGRP
scm_sysintern ("S_IWGRP", SCM_MAKINUM (S_IWGRP));
#endif
#ifdef S_IXGRP
scm_sysintern ("S_IXGRP", SCM_MAKINUM (S_IXGRP));
#endif
#ifdef S_IRWXG
scm_sysintern ("S_IRWXG", SCM_MAKINUM (S_IRWXG));
#endif
#ifdef S_IROTH
scm_sysintern ("S_IROTH", SCM_MAKINUM (S_IROTH));
#endif
#ifdef S_IWOTH
scm_sysintern ("S_IWOTH", SCM_MAKINUM (S_IWOTH));
#endif
#ifdef S_IXOTH
scm_sysintern ("S_IXOTH", SCM_MAKINUM (S_IXOTH));
#endif
#ifdef S_IRWXO
scm_sysintern ("S_IRWXO", SCM_MAKINUM (S_IRWXO));
#endif
#ifdef S_ISUID
scm_sysintern ("S_ISUID", SCM_MAKINUM (S_ISUID));
#endif
#ifdef S_ISGID
scm_sysintern ("S_ISGID", SCM_MAKINUM (S_ISGID));
#endif
#ifdef S_ISVTX
scm_sysintern ("S_ISVTX", SCM_MAKINUM (S_ISVTX));
#endif
#ifdef S_IFMT
scm_sysintern ("S_IFMT", SCM_MAKINUM (S_IFMT));
#endif
#ifdef S_IFDIR
scm_sysintern ("S_IFDIR", SCM_MAKINUM (S_IFDIR));
#endif
#ifdef S_IFCHR
scm_sysintern ("S_IFCHR", SCM_MAKINUM (S_IFCHR));
#endif
#ifdef S_IFBLK
scm_sysintern ("S_IFBLK", SCM_MAKINUM (S_IFBLK));
#endif
#ifdef S_IFREG
scm_sysintern ("S_IFREG", SCM_MAKINUM (S_IFREG));
#endif
#ifdef S_IFLNK
scm_sysintern ("S_IFLNK", SCM_MAKINUM (S_IFLNK));
#endif
#ifdef S_IFSOCK
scm_sysintern ("S_IFSOCK", SCM_MAKINUM (S_IFSOCK));
#endif
#ifdef S_IFIFO
scm_sysintern ("S_IFIFO", SCM_MAKINUM (S_IFIFO));
#endif
#include "ioext.x"
}

View file

@ -1214,10 +1214,6 @@ scm_init_posix ()
scm_sysintern ("WUNTRACED", SCM_MAKINUM (WUNTRACED));
#endif
#ifdef EINTR
scm_sysintern ("EINTR", SCM_MAKINUM (EINTR));
#endif
#ifdef SIGHUP
scm_sysintern ("SIGHUP", SCM_MAKINUM (SIGHUP));
#endif

View file

@ -285,6 +285,53 @@ scm_string_fill_x (str, chr)
return SCM_UNSPECIFIED;
}
SCM_PROC(s_string_upcase_x, "string-upcase!", 1, 0, 0, scm_string_upcase_x);
SCM
scm_string_upcase_x (v)
SCM v;
{
register long k;
register unsigned char *cs;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
k = SCM_LENGTH (v);
switch SCM_TYP7
(v)
{
case scm_tc7_string:
cs = SCM_UCHARS (v);
while (k--)
cs[k] = scm_upcase(cs[k]);
break;
default:
badarg1:scm_wta (v, (char *) SCM_ARG1, s_string_upcase_x);
}
return v;
}
SCM_PROC(s_string_downcase_x, "string-downcase!", 1, 0, 0, scm_string_downcase_x);
SCM
scm_string_downcase_x (v)
SCM v;
{
register long k;
register unsigned char *cs;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
k = SCM_LENGTH (v);
switch SCM_TYP7
(v)
{
case scm_tc7_string:
cs = SCM_UCHARS (v);
while (k--)
cs[k] = scm_downcase(cs[k]);
break;
default:
badarg1:scm_wta (v, (char *) SCM_ARG1, s_string_downcase_x);
}
return v;
}
void

View file

@ -2,7 +2,7 @@
#ifndef STROPH
#define STROPH
/* Copyright (C) 1995,1996 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1997 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
@ -59,5 +59,7 @@ extern SCM scm_string_to_list SCM_P ((SCM str));
extern SCM scm_string_copy SCM_P ((SCM str));
extern SCM scm_string_fill_x SCM_P ((SCM str, SCM chr));
extern void scm_init_strop SCM_P ((void));
extern SCM scm_string_upcase_x SCM_P ((SCM v));
extern SCM scm_string_downcase_x SCM_P ((SCM v));
#endif /* STROPH */

View file

@ -1925,56 +1925,6 @@ scm_bit_invert_x (v)
}
SCM_PROC(s_string_upcase_x, "string-upcase!", 1, 0, 0, scm_string_upcase_x);
SCM
scm_string_upcase_x (v)
SCM v;
{
register long k;
register unsigned char *cs;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
k = SCM_LENGTH (v);
switch SCM_TYP7
(v)
{
case scm_tc7_string:
cs = SCM_UCHARS (v);
while (k--)
cs[k] = scm_upcase(cs[k]);
break;
default:
badarg1:scm_wta (v, (char *) SCM_ARG1, s_string_upcase_x);
}
return v;
}
SCM_PROC(s_string_downcase_x, "string-downcase!", 1, 0, 0, scm_string_downcase_x);
SCM
scm_string_downcase_x (v)
SCM v;
{
register long k;
register unsigned char *cs;
SCM_ASRTGO (SCM_NIMP (v), badarg1);
k = SCM_LENGTH (v);
switch SCM_TYP7
(v)
{
case scm_tc7_string:
cs = SCM_UCHARS (v);
while (k--)
cs[k] = scm_downcase(cs[k]);
break;
default:
badarg1:scm_wta (v, (char *) SCM_ARG1, s_string_downcase_x);
}
return v;
}
SCM
scm_istr2bve (str, len)
char *str;

View file

@ -102,8 +102,6 @@ extern SCM scm_bit_position SCM_P ((SCM item, SCM v, SCM k));
extern SCM scm_bit_set_star_x SCM_P ((SCM v, SCM kv, SCM obj));
extern SCM scm_bit_count_star SCM_P ((SCM v, SCM kv, SCM obj));
extern SCM scm_bit_invert_x SCM_P ((SCM v));
extern SCM scm_string_upcase_x SCM_P ((SCM v));
extern SCM scm_string_downcase_x SCM_P ((SCM v));
extern SCM scm_istr2bve SCM_P ((char *str, long len));
extern SCM scm_array_to_list SCM_P ((SCM v));
extern SCM scm_list_to_uniform_array SCM_P ((SCM ndim, SCM prot, SCM lst));