Hi
Attached patch makes minor changes to 'sun_workshop' feature:
- comment out functions defined in integration.c but never used:
workshop_invoked(), workshop_set_icon(), workshop_get_rows_cols(),
workshop_file_closed(), workshop_move_mark(), workshop_file_modified().
- added some #ifdef to avoid defining functions when not needed.
- added missing UNUSED to some unused function args
Cheers
-- Dominique
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Index: workshop.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/workshop.c,v
retrieving revision 1.10
diff -c -r1.10 workshop.c
*** workshop.c 21 May 2009 21:26:55 -0000 1.10
--- workshop.c 25 Dec 2009 17:33:27 -0000
***************
*** 56,67 ****
static void load_window(char *, int lnum);
static void warp_to_pc(int);
#ifdef FEAT_BEVAL
! void workshop_beval_cb(BalloonEval *, int);
#endif
static char *fixAccelText(char *);
static void addMenu(char *, char *, char *);
static char *lookupVerb(char *, int);
- static int computeIndex(int, char_u *, int);
static void coloncmd(char *, Boolean);
extern Widget vimShell;
--- 56,67 ----
static void load_window(char *, int lnum);
static void warp_to_pc(int);
#ifdef FEAT_BEVAL
! void workshop_beval_cb(BalloonEval *, int);
! static int computeIndex(int, char_u *, int);
#endif
static char *fixAccelText(char *);
static void addMenu(char *, char *, char *);
static char *lookupVerb(char *, int);
static void coloncmd(char *, Boolean);
extern Widget vimShell;
***************
*** 1624,1631 ****
}
}
}
- #endif
-
static int
computeIndex(
--- 1624,1629 ----
***************
*** 1649,1654 ****
--- 1647,1653 ----
return -1;
}
+ #endif
static void
addMenu(
Index: integration.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/integration.c,v
retrieving revision 1.4
diff -c -r1.4 integration.c
*** integration.c 24 Jun 2008 20:27:10 -0000 1.4
--- integration.c 25 Dec 2009 17:33:27 -0000
***************
*** 159,165 ****
/*ARGSUSED*/
void
! messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2)
{
char *cmd; /* the 1st word of the command */
--- 159,165 ----
/*ARGSUSED*/
void
! messageFromEserve(XtPointer clientData UNUSED, int *NOTUSED1 UNUSED, XtInputId *NOTUSED2 UNUSED)
{
char *cmd; /* the 1st word of the command */
***************
*** 199,205 ****
if (sign) {
sign++;
}
! /* Change sign name to accomodate a different size? */
adjust_sign_name(sign);
workshop_add_mark_type(idx, color, sign);
}
--- 199,205 ----
if (sign) {
sign++;
}
! /* Change sign name to accommodate a different size? */
adjust_sign_name(sign);
workshop_add_mark_type(idx, color, sign);
}
***************
*** 580,586 ****
#endif
! /* Change sign name to accomodate a different size:
* Create the filename based on the height. The filename format
* of multisize icons are:
* x.xpm : largest icon
--- 580,586 ----
#endif
! /* Change sign name to accommodate a different size:
* Create the filename based on the height. The filename format
* of multisize icons are:
* x.xpm : largest icon
***************
*** 618,623 ****
--- 618,624 ----
if you want to do things differently if the editor is started standalone
or in WorkShop mode. For example, in standalone mode you may not want to
add a footer/message area or a sign gutter. */
+ #if 0
int
workshop_invoked()
{
***************
*** 627,632 ****
--- 628,634 ----
}
return result;
}
+ #endif
/* Connect back to eserve */
void workshop_connect(XtAppContext context)
***************
*** 751,756 ****
--- 753,759 ----
*/
/* Set icon for the window */
+ #if 0
void
workshop_set_icon(Display *display, Widget shell, char **xpmdata,
int width, int height)
***************
*** 793,798 ****
--- 796,802 ----
}
XtFree((char *)xpmAttributes.colorsymbols);
}
+ #endif
/* Minimize and maximize shells. From libutil's shell.cc. */
***************
*** 927,933 ****
return success;
}
!
Boolean workshop_get_rows_cols(int *rows, int *cols)
{
static int r = 0;
--- 931,937 ----
return success;
}
! #if 0
Boolean workshop_get_rows_cols(int *rows, int *cols)
{
static int r = 0;
***************
*** 958,963 ****
--- 962,968 ----
}
return success;
}
+ #endif
/*
* Toolbar code
***************
*** 1048,1054 ****
* Send information to eserve on certain editor events
* You must make sure these are called when necessary
*/
!
void workshop_file_closed(char *filename)
{
char buffer[2*MAXPATHLEN];
--- 1053,1059 ----
* Send information to eserve on certain editor events
* You must make sure these are called when necessary
*/
! #if 0
void workshop_file_closed(char *filename)
{
char buffer[2*MAXPATHLEN];
***************
*** 1056,1061 ****
--- 1061,1067 ----
NOCATGETS("deletedFile %s\n"), filename);
write(sd, buffer, strlen(buffer));
}
+ #endif
void workshop_file_closed_lineno(char *filename, int lineno)
{
***************
*** 1086,1091 ****
--- 1092,1098 ----
workshop_moved_marks(filename);
}
+ #if 0
void workshop_move_mark(char *filename, int markId, int newLineno)
{
char buffer[2*MAXPATHLEN];
***************
*** 1101,1106 ****
--- 1108,1114 ----
NOCATGETS("modifiedFile %s\n"), filename);
write(sd, buffer, strlen(buffer));
}
+ #endif
void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h)
{
***************
*** 1179,1188 ****
--- 1187,1198 ----
}
/* Send a message to eserve */
+ #if defined(NOHANDS_SUPPORT_FUNCTIONS) || defined(FEAT_BEVAL)
void workshop_send_message(char *buf)
{
write(sd, buf, strlen(buf));
}
+ #endif
/* Some methods, like currentFile, cursorPos, etc. are missing here.
* But it looks like these are used for NoHands testing only so we
Index: integration.h
===================================================================
RCS file: /cvsroot/vim/vim7/src/integration.h,v
retrieving revision 1.1
diff -c -r1.1 integration.h
*** integration.h 13 Jun 2004 15:34:12 -0000 1.1
--- integration.h 25 Dec 2009 17:33:28 -0000
***************
*** 284,290 ****
--- 284,292 ----
/* A file has been closed */
+ #if 0
void workshop_file_closed(char *filename);
+ #endif
/* Like workshop_file_closed, but also inform eserve what line the
cursor was on when you left the file. That way eserve can put you
***************
*** 292,297 ****
--- 294,300 ----
void workshop_file_closed_lineno(char *filename, int line);
/* A file has been modified */
+ #if 0
void workshop_file_modified(char *filename);
***************
*** 300,305 ****
--- 303,309 ----
* a workshop_moved_marks request call.
*/
void workshop_move_mark(char *filename, int markId, int newLineno);
+ #endif
/* Tell the integration library about a new frame being added.
* Supply a form for the toolbar, a label for the footer, and an
***************
*** 377,383 ****
--- 381,389 ----
*/
void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h);
Boolean workshop_get_width_height(int *, int *);
+ #if 0
Boolean workshop_get_rows_cols(int *, int *);
+ #endif
/* This function should be invoked when you press a hotkey
* set up by workshop_register_hotkey. Pass the clientData
***************
*** 401,415 ****
* or in WorkShop mode. For example, in standalone mode you may not want to
* add a footer/message area or a sign gutter.
*/
int workshop_invoked(void);
/*
*Set the desktop icon of the current shell to the given xpm icon.
* Standard WorkShop desktop icons should be 48x48.
*/
!
void workshop_set_icon(Display *display, Widget shell, char **xpmdata,
int width, int height);
/* Minimize (iconify) the given shell */
--- 407,424 ----
* or in WorkShop mode. For example, in standalone mode you may not want to
* add a footer/message area or a sign gutter.
*/
+ #if 0
int workshop_invoked(void);
+ #endif
/*
*Set the desktop icon of the current shell to the given xpm icon.
* Standard WorkShop desktop icons should be 48x48.
*/
! #if 0
void workshop_set_icon(Display *display, Widget shell, char **xpmdata,
int width, int height);
+ #endif
/* Minimize (iconify) the given shell */