projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove julcal.
[pspp]
/
src
/
str.c
diff --git
a/src/str.c
b/src/str.c
index 265c2a230d53e0798cea632e1507d23f25e4cad5..bb49d0f3ac088424964dca9cfbe3a3568ec163d3 100644
(file)
--- a/
src/str.c
+++ b/
src/str.c
@@
-528,7
+528,7
@@
ds_get_config_line (FILE *stream, struct string *st, struct file_locator *where)
/* Creates a new lengthed string LS with contents as a copy of
S. */
void
/* Creates a new lengthed string LS with contents as a copy of
S. */
void
-ls_create (struct
len
_string *ls, const char *s)
+ls_create (struct
fixed
_string *ls, const char *s)
{
ls->length = strlen (s);
ls->string = xmalloc (ls->length + 1);
{
ls->length = strlen (s);
ls->string = xmalloc (ls->length + 1);
@@
-538,7
+538,7
@@
ls_create (struct len_string *ls, const char *s)
/* Creates a new lengthed string LS with contents as a copy of
BUFFER with length LEN. */
void
/* Creates a new lengthed string LS with contents as a copy of
BUFFER with length LEN. */
void
-ls_create_buffer (struct
len
_string *ls,
+ls_create_buffer (struct
fixed
_string *ls,
const char *buffer, size_t len)
{
ls->length = len;
const char *buffer, size_t len)
{
ls->length = len;
@@
-549,7
+549,7
@@
ls_create_buffer (struct len_string *ls,
/* Sets the fields of LS to the specified values. */
void
/* Sets the fields of LS to the specified values. */
void
-ls_init (struct
len
_string *ls, const char *string, size_t length)
+ls_init (struct
fixed
_string *ls, const char *string, size_t length)
{
ls->string = (char *) string;
ls->length = length;
{
ls->string = (char *) string;
ls->length = length;
@@
-557,49
+557,49
@@
ls_init (struct len_string *ls, const char *string, size_t length)
/* Copies the fields of SRC to DST. */
void
/* Copies the fields of SRC to DST. */
void
-ls_shallow_copy (struct
len_string *dst, const struct len
_string *src)
+ls_shallow_copy (struct
fixed_string *dst, const struct fixed
_string *src)
{
*dst = *src;
}
/* Frees the memory backing LS. */
void
{
*dst = *src;
}
/* Frees the memory backing LS. */
void
-ls_destroy (struct
len
_string *ls)
+ls_destroy (struct
fixed
_string *ls)
{
free (ls->string);
}
/* Sets LS to a null pointer value. */
void
{
free (ls->string);
}
/* Sets LS to a null pointer value. */
void
-ls_null (struct
len
_string *ls)
+ls_null (struct
fixed
_string *ls)
{
ls->string = NULL;
}
/* Returns nonzero only if LS has a null pointer value. */
int
{
ls->string = NULL;
}
/* Returns nonzero only if LS has a null pointer value. */
int
-ls_null_p (const struct
len
_string *ls)
+ls_null_p (const struct
fixed
_string *ls)
{
return ls->string == NULL;
}
/* Returns nonzero only if LS is a null pointer or has length 0. */
int
{
return ls->string == NULL;
}
/* Returns nonzero only if LS is a null pointer or has length 0. */
int
-ls_empty_p (const struct
len
_string *ls)
+ls_empty_p (const struct
fixed
_string *ls)
{
return ls->string == NULL || ls->length == 0;
}
/* Returns the length of LS, which must not be null. */
size_t
{
return ls->string == NULL || ls->length == 0;
}
/* Returns the length of LS, which must not be null. */
size_t
-ls_length (const struct
len
_string *ls)
+ls_length (const struct
fixed
_string *ls)
{
return ls->length;
}
/* Returns a pointer to the character string in LS. */
char *
{
return ls->length;
}
/* Returns a pointer to the character string in LS. */
char *
-ls_c_str (const struct
len
_string *ls)
+ls_c_str (const struct
fixed
_string *ls)
{
return (char *) ls->string;
}
{
return (char *) ls->string;
}
@@
-607,7
+607,7
@@
ls_c_str (const struct len_string *ls)
/* Returns a pointer to the null terminator of the character string in
LS. */
char *
/* Returns a pointer to the null terminator of the character string in
LS. */
char *
-ls_end (const struct
len
_string *ls)
+ls_end (const struct
fixed
_string *ls)
{
return (char *) (ls->string + ls->length);
}
{
return (char *) (ls->string + ls->length);
}