projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reform string library.
[pspp-builds.git]
/
src
/
language
/
line-buffer.c
diff --git
a/src/language/line-buffer.c
b/src/language/line-buffer.c
index e451532082b06a9f88ac10ed8fcf0cf6ed289892..1b48f5386e26457bf95bcc797e5458d1ffb96429 100644
(file)
--- a/
src/language/line-buffer.c
+++ b/
src/language/line-buffer.c
@@
-109,9
+109,9
@@
static const char *get_prompt (void);
void
getl_initialize (void)
{
void
getl_initialize (void)
{
- ds_
create
(&getl_include_path,
- fn_getenv_default ("STAT_INCLUDE_PATH", include_path));
- ds_init
(&getl_buf, 256
);
+ ds_
init_cstr
(&getl_include_path,
+
fn_getenv_default ("STAT_INCLUDE_PATH", include_path));
+ ds_init
_empty (&getl_buf
);
init_prompts ();
}
init_prompts ();
}
@@
-127,9
+127,9
@@
void
getl_add_include_dir (const char *path)
{
if (ds_length (&getl_include_path))
getl_add_include_dir (const char *path)
{
if (ds_length (&getl_include_path))
- ds_put
c
(&getl_include_path, ':');
+ ds_put
_char
(&getl_include_path, ':');
- ds_put
s
(&getl_include_path, path);
+ ds_put
_cstr
(&getl_include_path, path);
}
/* Appends source S to the list of source files. */
}
/* Appends source S to the list of source files. */
@@
-239,7
+239,7
@@
getl_include_syntax_file (const char *fn)
{
if (cur_source != NULL)
{
{
if (cur_source != NULL)
{
- char *found_fn = fn_search_path (fn, ds_c
_
str (&getl_include_path),
+ char *found_fn = fn_search_path (fn, ds_cstr (&getl_include_path),
fn_dir_name (cur_source->fn));
if (found_fn != NULL)
{
fn_dir_name (cur_source->fn));
if (found_fn != NULL)
{
@@
-457,7
+457,7
@@
read_syntax_file (struct string *line, struct getl_source *s)
do
{
s->ln++;
do
{
s->ln++;
- if (!ds_
gets
(line, s->u.syntax_file))
+ if (!ds_
read_line
(line, s->u.syntax_file))
{
if (ferror (s->u.syntax_file))
msg (ME, _("Reading `%s': %s."), s->fn, strerror (errno));
{
if (ferror (s->u.syntax_file))
msg (ME, _("Reading `%s': %s."), s->fn, strerror (errno));
@@
-465,11
+465,11
@@
read_syntax_file (struct string *line, struct getl_source *s)
}
ds_chomp (line, '\n');
}
}
ds_chomp (line, '\n');
}
- while (s->ln == 1 && !memcmp (ds_c
_
str (line), "#!", 2));
+ while (s->ln == 1 && !memcmp (ds_cstr (line), "#!", 2));
/* Echo to listing file, if configured to do so. */
if (get_echo ())
/* Echo to listing file, if configured to do so. */
if (get_echo ())
- tab_output_text (TAB_LEFT | TAB_FIX, ds_c
_
str (line));
+ tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (line));
return true;
}
return true;
}