Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * prompt.c: Routines for retrieving and setting a prompt. |
| 3 | * |
| 4 | * $Header$ |
| 5 | * $Locker$ |
| 6 | * |
| 7 | * Copyright 1987, 1988 by MIT Student Information Processing Board |
| 8 | * |
Theodore Ts'o | 06cefee | 1999-10-23 01:16:22 +0000 | [diff] [blame^] | 9 | * Permission to use, copy, modify, and distribute this software and |
| 10 | * its documentation for any purpose is hereby granted, provided that |
| 11 | * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in |
| 12 | * advertising or publicity pertaining to distribution of the software |
| 13 | * without specific, written prior permission. M.I.T. and the |
| 14 | * M.I.T. S.I.P.B. make no representations about the suitability of |
| 15 | * this software for any purpose. It is provided "as is" without |
| 16 | * express or implied warranty. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 17 | */ |
| 18 | |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 19 | #include <stdio.h> |
| 20 | #include "ss_internal.h" |
| 21 | |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 22 | #ifdef __STDC__ |
| 23 | void ss_set_prompt(int sci_idx, char *new_prompt) |
| 24 | #else |
| 25 | void ss_set_prompt(sci_idx, new_prompt) |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 26 | int sci_idx; |
| 27 | char *new_prompt; |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 28 | #endif |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 29 | { |
| 30 | ss_info(sci_idx)->prompt = new_prompt; |
| 31 | } |
| 32 | |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 33 | #ifdef __STDC__ |
| 34 | char *ss_get_prompt(int sci_idx) |
| 35 | #else |
| 36 | char *ss_get_prompt(sci_idx) |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 37 | int sci_idx; |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 38 | #endif |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 39 | { |
| 40 | return(ss_info(sci_idx)->prompt); |
| 41 | } |