home *** CD-ROM | disk | FTP | other *** search
- /*
- hist_cmd: a command has been read from the history file. Do the
- necessary list-building activities for a new command.
-
- Kenneth Ingham
-
- Copyright (C) 1988 The University of New Mexico
- */
-
- #include "defs.h"
-
- hist_cmd(line, cmd_head, cmd_ptr, key_ptr, value_ptr)
- char *line;
- struct old_cmd_st **cmd_head, **cmd_ptr;
- struct key_st **key_ptr;
- struct val_st **value_ptr;
- {
- /* is this the first? */
- if (*cmd_head == NULL) {
- *cmd_head = *cmd_ptr = allocate(struct old_cmd_st);
- }
- else {
- (*cmd_ptr)->next = allocate(struct old_cmd_st);
- *cmd_ptr = (*cmd_ptr)->next;
- }
-
- (*cmd_ptr)->keys = NULL;
- (*cmd_ptr)->next = NULL;
- (*cmd_ptr)->pipeline = strsave(line);
- (*cmd_ptr)->next = NULL;
- *key_ptr == NULL;
- *value_ptr == NULL;
- }
-