#include "viewportcamera.h"
-static glCompPanel *controlPanel;
-static glCompButton *rotatebutton;
+/* static glCompPanel *controlPanel; */
+/* static glCompButton *rotatebutton; */
static glCompPanel* sel=NULL;
static glCompButton* to3DBtn;
static glCompButton* to2DBtn;
}
+#ifdef UNUSED
static void menu_click_zoom(void* obj,GLfloat x,GLfloat y,glMouseButtonType t)
{
switch_Mouse(NULL,MM_ZOOM);
}
+#endif
static void menu_click_fisheye_magnifier(void* obj,GLfloat x,GLfloat y,glMouseButtonType t)
{
void CBglCompMouseUp (void* obj,GLfloat x,GLfloat y,glMouseButtonType t)
{
- glCompMouse* m=&((glCompSet*)obj)->mouse;
+ /* glCompMouse* m=&((glCompSet*)obj)->mouse; */
sel->common.visible=0;
sel->common.pos.x=-5000;
glCompSet *glcreate_gl_topview_menu(void)
{
- static char* icondir[512];
- int ind=0;
+ /* static char* icondir[512]; */
+ /* int ind=0; */
GLfloat y=5;
GLfloat off=43;
glCompSet *s = glCompSetNew(view->w,view->h);
glCompPanel *p=NULL;
glCompButton *b=NULL;
- glCompLabel *l=NULL;
+ /* glCompLabel *l=NULL; */
glCompImage *i=NULL;
glCompColor c;
s->common.callbacks.click=CBglCompMouseRightClick;
int a=GetCurrentDirectory(512,bf);
if ((a > 512) || (a==0))
return 0;
- return 1;
#else
//code *nix implementation to retrieve the icon directory, possibly some /share dir.
-
+ /* FIXME */
#endif
+ return 1;
-}
\ No newline at end of file
+}
char*
smyrnaPath (char* suffix)
{
- static char* buf[1024];
+ static int buflen;
+ static char* buf;
+ static int baselen;
+ int slen;
#ifdef WIN32
char* pathSep = "\\";
#else
char* pathSep = "/";
#endif
assert (smyrnaDir);
- if ((strlen(smyrnaDir)+strlen(suffix)+ strlen(suffix) + 2) > 512)
- return NULL;
+
+ if (!buf) {
+ baselen = strlen (smyrnaDir) + 2;
+ buflen = baselen + 100;
+ buf = N_NEW(buflen,char);
+ }
+ slen = strlen (suffix);
+ if (baselen + slen > buflen) {
+ buflen = baselen + slen;
+ buf = realloc (buf, buflen);
+ }
sprintf (buf, "%s%s%s", smyrnaDir, pathSep, suffix);
return buf;
}