@@ -45,9 +45,7 @@ extern char *(*PyOS_ReadlineFunctionPointer)(char *);
4545/* Exported function to send one line to readline's init file parser */
4646
4747static PyObject *
48- parse_and_bind (self , args )
49- PyObject * self ;
50- PyObject * args ;
48+ parse_and_bind (PyObject * self , PyObject * args )
5149{
5250 char * s , * copy ;
5351 if (!PyArg_ParseTuple (args , "s:parse_and_bind" , & s ))
@@ -73,9 +71,7 @@ Parse and execute single line of a readline init file.\
7371/* Exported function to parse a readline init file */
7472
7573static PyObject *
76- read_init_file (self , args )
77- PyObject * self ;
78- PyObject * args ;
74+ read_init_file (PyObject * self , PyObject * args )
7975{
8076 char * s = NULL ;
8177 if (!PyArg_ParseTuple (args , "|z:read_init_file" , & s ))
@@ -97,9 +93,7 @@ The default filename is the last filename used.\
9793/* Exported function to load a readline history file */
9894
9995static PyObject *
100- read_history_file (self , args )
101- PyObject * self ;
102- PyObject * args ;
96+ read_history_file (PyObject * self , PyObject * args )
10397{
10498 char * s = NULL ;
10599 if (!PyArg_ParseTuple (args , "|z:read_history_file" , & s ))
@@ -121,9 +115,7 @@ The default filename is ~/.history.\
121115/* Exported function to save a readline history file */
122116
123117static PyObject *
124- write_history_file (self , args )
125- PyObject * self ;
126- PyObject * args ;
118+ write_history_file (PyObject * self , PyObject * args )
127119{
128120 char * s = NULL ;
129121 if (!PyArg_ParseTuple (args , "|z:write_history_file" , & s ))
@@ -152,9 +144,7 @@ static PyObject *endidx = NULL;
152144
153145/* get the beginning index for the scope of the tab-completion */
154146static PyObject *
155- get_begidx (self , args )
156- PyObject * self ;
157- PyObject * args ;
147+ get_begidx (PyObject * self , PyObject * args )
158148{
159149 if (!PyArg_NoArgs (args )) {
160150 return NULL ;
@@ -169,9 +159,7 @@ get the beginning index of the readline tab-completion scope";
169159
170160/* get the ending index for the scope of the tab-completion */
171161static PyObject *
172- get_endidx (self , args )
173- PyObject * self ;
174- PyObject * args ;
162+ get_endidx (PyObject * self , PyObject * args )
175163{
176164 if (!PyArg_NoArgs (args )) {
177165 return NULL ;
@@ -188,9 +176,7 @@ get the ending index of the readline tab-completion scope";
188176/* set the tab-completion word-delimiters that readline uses */
189177
190178static PyObject *
191- set_completer_delims (self , args )
192- PyObject * self ;
193- PyObject * args ;
179+ set_completer_delims (PyObject * self , PyObject * args )
194180{
195181 char * break_chars ;
196182
@@ -211,9 +197,7 @@ set the readline word delimiters for tab-completion";
211197/* get the tab-completion word-delimiters that readline uses */
212198
213199static PyObject *
214- get_completer_delims (self , args )
215- PyObject * self ;
216- PyObject * args ;
200+ get_completer_delims (PyObject * self , PyObject * args )
217201{
218202 if (!PyArg_NoArgs (args )) {
219203 return NULL ;
@@ -226,9 +210,7 @@ get_completer_delims() -> string\n\
226210get the readline word delimiters for tab-completion" ;
227211
228212static PyObject *
229- set_completer (self , args )
230- PyObject * self ;
231- PyObject * args ;
213+ set_completer (PyObject * self , PyObject * args )
232214{
233215 PyObject * function = Py_None ;
234216 if (!PyArg_ParseTuple (args , "|O:set_completer" , & function ))
@@ -265,9 +247,7 @@ It should return the next possible completion starting with 'text'.\
265247/* Exported function to read the current line buffer */
266248
267249static PyObject *
268- get_line_buffer (self , args )
269- PyObject * self ;
270- PyObject * args ;
250+ get_line_buffer (PyObject * self , PyObject * args )
271251{
272252 if (!PyArg_NoArgs (args ))
273253 return NULL ;
@@ -282,9 +262,7 @@ return the current contents of the line buffer.\
282262/* Exported function to insert text into the line buffer */
283263
284264static PyObject *
285- insert_text (self , args )
286- PyObject * self ;
287- PyObject * args ;
265+ insert_text (PyObject * self , PyObject * args )
288266{
289267 char * s ;
290268 if (!PyArg_ParseTuple (args , "s:insert_text" , & s ))
@@ -325,9 +303,7 @@ static struct PyMethodDef readline_methods[] =
325303/* C function to call the Python completer. */
326304
327305static char *
328- on_completion (text , state )
329- char * text ;
330- int state ;
306+ on_completion (char * text , int state )
331307{
332308 char * result = NULL ;
333309 if (completer != NULL ) {
@@ -366,10 +342,7 @@ on_completion(text, state)
366342 * before calling the normal completer */
367343
368344char * *
369- flex_complete (text , start , end )
370- char * text ;
371- int start ;
372- int end ;
345+ flex_complete (char * text , int start , int end )
373346{
374347 Py_XDECREF (begidx );
375348 Py_XDECREF (endidx );
@@ -413,8 +386,7 @@ static jmp_buf jbuf;
413386
414387/* ARGSUSED */
415388static RETSIGTYPE
416- onintr (sig )
417- int sig ;
389+ onintr (int sig )
418390{
419391 longjmp (jbuf , 1 );
420392}
@@ -423,8 +395,7 @@ onintr(sig)
423395/* Wrapper around GNU readline that handles signals differently. */
424396
425397static char *
426- call_readline (prompt )
427- char * prompt ;
398+ call_readline (char * prompt )
428399{
429400 size_t n ;
430401 char * p , * q ;
0 commit comments