Mercurial > hg > octave-lyh
comparison src/input.cc @ 2299:f296bbc757a1
[project @ 1996-06-23 03:45:44 by jwe]
author | jwe |
---|---|
date | Sun, 23 Jun 1996 03:45:44 +0000 |
parents | 0e065eb7e838 |
children | b2f6b8a0992d |
comparison
equal
deleted
inserted
replaced
2298:8fa2c46fca3e | 2299:f296bbc757a1 |
---|---|
123 int promptflag = 1; | 123 int promptflag = 1; |
124 | 124 |
125 // The current line of input, from wherever. | 125 // The current line of input, from wherever. |
126 string current_input_line; | 126 string current_input_line; |
127 | 127 |
128 // TRUE after a call to completion_matches(). | |
129 bool octave_completion_matches_called = false; | |
130 | |
128 // Return the octal number parsed from STRING, or -1 to indicate that | 131 // Return the octal number parsed from STRING, or -1 to indicate that |
129 // the string contained a bad number. | 132 // the string contained a bad number. |
130 | 133 |
131 static int | 134 static int |
132 read_octal (const string& s) | 135 read_octal (const string& s) |
1172 | 1175 |
1173 return retval; | 1176 return retval; |
1174 } | 1177 } |
1175 | 1178 |
1176 DEFUN (completion_matches, args, nargout, | 1179 DEFUN (completion_matches, args, nargout, |
1177 "completion_matches (HINT): generate possible completions given HINT") | 1180 "completion_matches (HINT): generate possible completions given HINT\n\ |
1181 \n\ | |
1182 This function is provided for the benefit of programs like Emacs which\n\ | |
1183 might be controlling Octave and handling user input. The current command\n\ | |
1184 number is not incremented when this function is called. This is a feature,\n\ | |
1185 not a bug.") | |
1178 { | 1186 { |
1179 octave_value retval; | 1187 octave_value retval; |
1180 | 1188 |
1181 int nargin = args.length (); | 1189 int nargin = args.length (); |
1182 | 1190 |
1234 int len = list.length (); | 1242 int len = list.length (); |
1235 | 1243 |
1236 for (int i = 0; i < len; i++) | 1244 for (int i = 0; i < len; i++) |
1237 octave_stdout << list[i] << "\n"; | 1245 octave_stdout << list[i] << "\n"; |
1238 } | 1246 } |
1247 | |
1248 octave_completion_matches_called = true; | |
1239 } | 1249 } |
1240 } | 1250 } |
1241 else | 1251 else |
1242 print_usage ("completion_matches"); | 1252 print_usage ("completion_matches"); |
1243 | 1253 |