#define USE_TCL_STUBS

#include <stdlib.h>
#include <memory.h>
#include <tcl.h>

extern char *macmenubarcolor_cmd ();

int
Macmenubarcolor_Cmd (
  ClientData cd,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *const objv[] )
{
  char  *color;
  int   rc = 0;
  int   set = 0;

  if (objc != 1) {
    Tcl_WrongNumArgs(interp, 1, objv, NULL);
    return TCL_ERROR;
  }

  color = macmenubarcolor_cmd ();
  Tcl_SetObjResult(interp, Tcl_NewStringObj(color, -1));
  free (color);
  return TCL_OK;
}

int
Macmenubarcolor_Init (Tcl_Interp *interp)
{
  if (! Tcl_InitStubs(interp, TCL_VERSION, 0)) {
    return TCL_ERROR;
  }

  Tcl_CreateObjCommand (interp, "macmenubarcolor", Macmenubarcolor_Cmd, NULL, NULL);
  Tcl_PkgProvide (interp, "macmenubarcolor", "0.1");
  return TCL_OK;
}
