Mercurial > vim
comparison src/workshop.c @ 7837:33ba2adb6065
commit https://github.com/vim/vim/commit/b638a7be952544ceb03052c25b84224577a6494b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 30 21:29:58 2016 +0100
patch 7.4.1215
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Jan 2016 21:30:04 +0100 |
parents | bfade53bcafb |
children | fd9727ae3c49 |
comparison
equal
deleted
inserted
replaced
7836:4f052afd5b05 | 7837:33ba2adb6065 |
---|---|
96 static int menuMapMax; /* allocated size of menuMap */ | 96 static int menuMapMax; /* allocated size of menuMap */ |
97 static char *initialFileCmd; /* save command but defer doing it */ | 97 static char *initialFileCmd; /* save command but defer doing it */ |
98 | 98 |
99 | 99 |
100 void | 100 void |
101 workshop_init() | 101 workshop_init(void) |
102 { | 102 { |
103 char_u buf[64]; | 103 char_u buf[64]; |
104 int is_dirty = FALSE; | 104 int is_dirty = FALSE; |
105 int width, height; | 105 int width, height; |
106 XtInputMask mask; | 106 XtInputMask mask; |
146 && (mask & XtIMAlternateInput) && !workshopInitDone) | 146 && (mask & XtIMAlternateInput) && !workshopInitDone) |
147 XtAppProcessEvent(app_context, (XtInputMask)XtIMAlternateInput); | 147 XtAppProcessEvent(app_context, (XtInputMask)XtIMAlternateInput); |
148 } | 148 } |
149 | 149 |
150 void | 150 void |
151 workshop_postinit() | 151 workshop_postinit(void) |
152 { | 152 { |
153 do_cmdline_cmd((char_u *)initialFileCmd); | 153 do_cmdline_cmd((char_u *)initialFileCmd); |
154 ALT_INPUT_LOCK_OFF; | 154 ALT_INPUT_LOCK_OFF; |
155 free(initialFileCmd); | 155 free(initialFileCmd); |
156 initialFileCmd = NULL; | 156 initialFileCmd = NULL; |
168 * This string is recognized by eserve and should be all lower case. | 168 * This string is recognized by eserve and should be all lower case. |
169 * This is how the editor detects that it is talking to gvim instead | 169 * This is how the editor detects that it is talking to gvim instead |
170 * of NEdit, for example, when the connection is initiated from the editor. | 170 * of NEdit, for example, when the connection is initiated from the editor. |
171 */ | 171 */ |
172 char * | 172 char * |
173 workshop_get_editor_name() | 173 workshop_get_editor_name(void) |
174 { | 174 { |
175 return "gvim"; | 175 return "gvim"; |
176 } | 176 } |
177 | 177 |
178 /* | 178 /* |
179 * Version number of the editor. | 179 * Version number of the editor. |
180 * This number is communicated along with the protocol | 180 * This number is communicated along with the protocol |
181 * version to the application. | 181 * version to the application. |
182 */ | 182 */ |
183 char * | 183 char * |
184 workshop_get_editor_version() | 184 workshop_get_editor_version(void) |
185 { | 185 { |
186 return Version; | 186 return Version; |
187 } | 187 } |
188 | 188 |
189 /* | 189 /* |
286 vim_snprintf(cbuf, sizeof(cbuf), "w %s", filename); | 286 vim_snprintf(cbuf, sizeof(cbuf), "w %s", filename); |
287 coloncmd(cbuf, TRUE); | 287 coloncmd(cbuf, TRUE); |
288 } | 288 } |
289 | 289 |
290 void | 290 void |
291 workshop_save_files() | 291 workshop_save_files(void) |
292 { | 292 { |
293 /* Save the given file */ | 293 /* Save the given file */ |
294 #ifdef WSDEBUG_TRACE | 294 #ifdef WSDEBUG_TRACE |
295 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 295 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
296 wstrace("workshop_save_files()\n"); | 296 wstrace("workshop_save_files()\n"); |
298 | 298 |
299 add_to_input_buf((char_u *) ":wall\n", 6); | 299 add_to_input_buf((char_u *) ":wall\n", 6); |
300 } | 300 } |
301 | 301 |
302 void | 302 void |
303 workshop_quit() | 303 workshop_quit(void) |
304 { | 304 { |
305 #ifdef WSDEBUG_TRACE | 305 #ifdef WSDEBUG_TRACE |
306 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 306 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
307 wstrace("workshop_quit()\n"); | 307 wstrace("workshop_quit()\n"); |
308 #endif | 308 #endif |
309 | 309 |
310 add_to_input_buf((char_u *) ":qall\n", 6); | 310 add_to_input_buf((char_u *) ":qall\n", 6); |
311 } | 311 } |
312 | 312 |
313 void | 313 void |
314 workshop_minimize() | 314 workshop_minimize(void) |
315 { | 315 { |
316 #ifdef WSDEBUG_TRACE | 316 #ifdef WSDEBUG_TRACE |
317 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 317 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
318 wstrace("workshop_minimize()\n"); | 318 wstrace("workshop_minimize()\n"); |
319 #endif | 319 #endif |
320 workshop_minimize_shell(vimShell); | 320 workshop_minimize_shell(vimShell); |
321 } | 321 } |
322 void | 322 void |
323 workshop_maximize() | 323 workshop_maximize(void) |
324 { | 324 { |
325 #ifdef WSDEBUG_TRACE | 325 #ifdef WSDEBUG_TRACE |
326 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 326 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
327 wstrace("workshop_maximize()\n"); | 327 wstrace("workshop_maximize()\n"); |
328 #endif | 328 #endif |
508 wstrace("XXXworkshop_moved_marks(%s)\n", filename); | 508 wstrace("XXXworkshop_moved_marks(%s)\n", filename); |
509 #endif | 509 #endif |
510 } | 510 } |
511 | 511 |
512 int | 512 int |
513 workshop_get_font_height() | 513 workshop_get_font_height(void) |
514 { | 514 { |
515 XmFontList fontList; /* fontList made from gui.norm_font */ | 515 XmFontList fontList; /* fontList made from gui.norm_font */ |
516 XmString str; | 516 XmString str; |
517 Dimension w; | 517 Dimension w; |
518 Dimension h; | 518 Dimension h; |
621 /* | 621 /* |
622 * Remove the submenu name and priority from curMenu*. | 622 * Remove the submenu name and priority from curMenu*. |
623 */ | 623 */ |
624 | 624 |
625 void | 625 void |
626 workshop_submenu_end() | 626 workshop_submenu_end(void) |
627 { | 627 { |
628 char *p; | 628 char *p; |
629 | 629 |
630 #ifdef WSDEBUG_TRACE | 630 #ifdef WSDEBUG_TRACE |
631 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE) | 631 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE) |
718 * This function is called when a complete WorkShop menu description has been | 718 * This function is called when a complete WorkShop menu description has been |
719 * sent over from eserve. We do some menu cleanup. | 719 * sent over from eserve. We do some menu cleanup. |
720 */ | 720 */ |
721 | 721 |
722 void | 722 void |
723 workshop_menu_end() | 723 workshop_menu_end(void) |
724 { | 724 { |
725 Boolean using_tearoff; /* set per current option setting */ | 725 Boolean using_tearoff; /* set per current option setting */ |
726 | 726 |
727 #ifdef WSDEBUG_TRACE | 727 #ifdef WSDEBUG_TRACE |
728 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 728 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
732 using_tearoff = vim_strchr(p_go, GO_TEAROFF) != NULL; | 732 using_tearoff = vim_strchr(p_go, GO_TEAROFF) != NULL; |
733 gui_mch_toggle_tearoffs(using_tearoff); | 733 gui_mch_toggle_tearoffs(using_tearoff); |
734 } | 734 } |
735 | 735 |
736 void | 736 void |
737 workshop_toolbar_begin() | 737 workshop_toolbar_begin(void) |
738 { | 738 { |
739 #ifdef WSDEBUG_TRACE | 739 #ifdef WSDEBUG_TRACE |
740 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 740 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
741 wstrace("workshop_toolbar_begin()\n"); | 741 wstrace("workshop_toolbar_begin()\n"); |
742 #endif | 742 #endif |
744 coloncmd("aunmenu ToolBar", True); | 744 coloncmd("aunmenu ToolBar", True); |
745 tbpri = 10; | 745 tbpri = 10; |
746 } | 746 } |
747 | 747 |
748 void | 748 void |
749 workshop_toolbar_end() | 749 workshop_toolbar_end(void) |
750 { | 750 { |
751 char_u buf[64]; | 751 char_u buf[64]; |
752 | 752 |
753 #ifdef WSDEBUG_TRACE | 753 #ifdef WSDEBUG_TRACE |
754 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) | 754 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE)) |
1403 #ifdef NOHANDS_SUPPORT_FUNCTIONS | 1403 #ifdef NOHANDS_SUPPORT_FUNCTIONS |
1404 | 1404 |
1405 /* For the NoHands test suite */ | 1405 /* For the NoHands test suite */ |
1406 | 1406 |
1407 char * | 1407 char * |
1408 workshop_test_getcurrentfile() | 1408 workshop_test_getcurrentfile(void) |
1409 { | 1409 { |
1410 char *filename, *selection; | 1410 char *filename, *selection; |
1411 int curLine, curCol, selStartLine, selStartCol, selEndLine; | 1411 int curLine, curCol, selStartLine, selStartCol, selEndLine; |
1412 int selEndCol, selLength; | 1412 int selEndCol, selLength; |
1413 | 1413 |
1419 else | 1419 else |
1420 return NULL; | 1420 return NULL; |
1421 } | 1421 } |
1422 | 1422 |
1423 int | 1423 int |
1424 workshop_test_getcursorrow() | 1424 workshop_test_getcursorrow(void) |
1425 { | 1425 { |
1426 return 0; | 1426 return 0; |
1427 } | 1427 } |
1428 | 1428 |
1429 int | 1429 int |
1430 workshop_test_getcursorcol() | 1430 workshop_test_getcursorcol(void) |
1431 { | 1431 { |
1432 char *filename, *selection; | 1432 char *filename, *selection; |
1433 int curLine, curCol, selStartLine, selStartCol, selEndLine; | 1433 int curLine, curCol, selStartLine, selStartCol, selEndLine; |
1434 int selEndCol, selLength; | 1434 int selEndCol, selLength; |
1435 | 1435 |
1441 else | 1441 else |
1442 return -1; | 1442 return -1; |
1443 } | 1443 } |
1444 | 1444 |
1445 char * | 1445 char * |
1446 workshop_test_getcursorrowtext() | 1446 workshop_test_getcursorrowtext(void) |
1447 { | 1447 { |
1448 return NULL; | 1448 return NULL; |
1449 } | 1449 } |
1450 | 1450 |
1451 char * | 1451 char * |
1452 workshop_test_getselectedtext() | 1452 workshop_test_getselectedtext(void) |
1453 { | 1453 { |
1454 char *filename, *selection; | 1454 char *filename, *selection; |
1455 int curLine, curCol, selStartLine, selStartCol, selEndLine; | 1455 int curLine, curCol, selStartLine, selStartCol, selEndLine; |
1456 int selEndCol, selLength; | 1456 int selEndCol, selLength; |
1457 | 1457 |