# include "data.h"

int accum            PROTO((int, char **));
int applyfit         PROTO((int, char **));
int applyfit2d       PROTO((int, char **));
int box              PROTO((int, char **));
int center           PROTO((int, char **));
int circstats        PROTO((int, char **));
int clear            PROTO((int, char **));
int clip             PROTO((int, char **));
int concat           PROTO((int, char **));
int contour          PROTO((int, char **));
int create           PROTO((int, char **));
int cursor           PROTO((int, char **));
int cut              PROTO((int, char **));
int datafile         PROTO((int, char **));
int delete           PROTO((int, char **));
int device           PROTO((int, char **));
int dimendown        PROTO((int, char **));
int dimenup          PROTO((int, char **));
int erase            PROTO((int, char **));
int extract          PROTO((int, char **));
int fft1d            PROTO((int, char **));
int fft2d            PROTO((int, char **));
int fit2d            PROTO((int, char **));
int fit              PROTO((int, char **));
int gaussjordan      PROTO((int, char **));
int gaussdeviate     PROTO((int, char **));
int grid             PROTO((int, char **));
int gridify          PROTO((int, char **));
int histogram        PROTO((int, char **));
int imhist           PROTO((int, char **));
int imcut            PROTO((int, char **));
int integrate        PROTO((int, char **));
int interpolate      PROTO((int, char **));
int jpeg             PROTO((int, char **));
int kern             PROTO((int, char **));
int keyword          PROTO((int, char **));
int labels           PROTO((int, char **));
int limits           PROTO((int, char **));
int line             PROTO((int, char **));
int list_buffers     PROTO((int, char **));
int header           PROTO((int, char **));
int list_vectors     PROTO((int, char **));
int load             PROTO((int, char **));
int mcreate          PROTO((int, char **));
int medacc           PROTO((int, char **));
int mget             PROTO((int, char **));
int minterp          PROTO((int, char **));
int mset             PROTO((int, char **));
int peak             PROTO((int, char **));
int plot             PROTO((int, char **));
int point            PROTO((int, char **));
int pop              PROTO((int, char **));
int ps               PROTO((int, char **));
int push             PROTO((int, char **));
int queuelist        PROTO((int, char **));
int queuesize        PROTO((int, char **));
int rd               PROTO((int, char **));
int rdseg            PROTO((int, char **));
int read_vectors     PROTO((int, char **));
int rebin            PROTO((int, char **));
int resize           PROTO((int, char **));
int roll             PROTO((int, char **));
int rotate           PROTO((int, char **));
int save             PROTO((int, char **));
int section          PROTO((int, char **));
int set              PROTO((int, char **));
int shift            PROTO((int, char **));
int sort_vectors     PROTO((int, char **));
int spline_apply     PROTO((int, char **));
int spline_construct PROTO((int, char **));
int stats            PROTO((int, char **));
int style            PROTO((int, char **));
int subraster        PROTO((int, char **));
int subset           PROTO((int, char **));
int svd              PROTO((int, char **));
int swapbytes        PROTO((int, char **));
int textline         PROTO((int, char **));
int tv               PROTO((int, char **));
int tvcontour        PROTO((int, char **));
int tvgrid           PROTO((int, char **));
int uniq             PROTO((int, char **));
int unsign           PROTO((int, char **));
int vbin             PROTO((int, char **));
int vclip            PROTO((int, char **));
int vect_select      PROTO((int, char **));
int vgrid            PROTO((int, char **));
int vstat            PROTO((int, char **));
int vroll            PROTO((int, char **));
int vpop             PROTO((int, char **));
int wd               PROTO((int, char **));
int write_vectors    PROTO((int, char **));
int zap              PROTO((int, char **));
int zplot            PROTO((int, char **));

static Command cmds[] = {  
  {"accum",        accum,	     "accumulate vector values in another vector"},
  {"applyfit",     applyfit,	     "apply fit to new vector"},
  {"applyfit2d",   applyfit2d,	     "apply 2-d fit to new vector"},
  {"box",     	   box,		     "draw a box on the plot"},
  {"center",       center,	     "center image on coords"},
  {"circstats",    circstats,	     "circular statistics"},
  {"clear",   	   clear,	     "erase plot"},
  {"clip",         clip,	     "clip values in a buffer to be within a range"},
  {"concat",  	   concat,	     "reduce vector dimension"},
  {"contour", 	   contour,	     "create contour from image"},
  {"create",  	   create,	     "create a new vector"},
  {"cursor",  	   cursor,	     "get coords from cursor"},
  {"cut",	   cut,		     "extract a cut across an image"},
  {"datafile",     datafile,	     "define file to read vectors"},
  {"delete",  	   delete,	     "delete vectors or matrices"},
  {"device",  	   device,	     "set / get current graphics device"},
  {"dimendown",	   dimendown,	     "convert matrix to vector"},
  {"dimenup",	   dimenup,	     "convert vector to matrix"},
  {"erase",        erase,	     "erase objects on an overlay"},
  {"extract",      extract,	     "extract a portion of a buffer into another buffer"},
  {"fft1d",        fft1d,	     "fft on the pixel-stream in an image"},
  {"fft2d",        fft2d,	     "fft on an image"},
  {"fit",     	   fit,		     "fit polynomial to vector pair"},
  {"fit2d",        fit2d,	     "fit 2-d polynomial to vector triplet"},
  {"gaussj",  	   gaussjordan,	     "solve Ax = B (N-D)"},
  {"gaussdev",	   gaussdeviate,     "generate a gaussian deviate vector"},
  {"grid",    	   grid,	     "plot cartesian grid"},
  {"gridify",      gridify,	     "convert vector triplet to buffer"},
  {"header",       header,	     "print buffer header"},
  {"histogram",    histogram,	     "generate histogram from vector"},
  {"imhist",       imhist,	     "histogram of an image region"},
  {"integrate",    integrate,	     "integrate a vector"},
  {"interpolate",  interpolate,	     "interpolate between vector pairs"},
  {"imcut",        imcut,	     "linear image cut between arbitrary coords"},
  {"jpeg",         jpeg,	     "write text line on graph"},
  {"kern",         kern,	     "convolve with 3x3 kernel"},
  {"keyword",      keyword,	     "extract a FITS keyword from buffer header"},
  {"labels",  	   labels,	     "define labels for plot"},
  {"limits",  	   limits,	     "define plot limits"},
  {"line",         line,	     "plot line"},
  {"buffers",      list_buffers,     "list the currently allocated buffers"},
  {"vectors", 	   list_vectors,     "list vectors"},
  {"load",         load,	     "load an SAOimage style overlay"},
  {"mcreate", 	   mcreate,	     "create a matrix"},
  {"medacc",       medacc,	     "accumulate vector values in another vector"},
  {"mget",    	   mget,	     "extract a vector from a matrix"},
  {"minterp",      minterp,	     "interpolate image pixels"},
  {"mset",    	   mset,	     "insert a vector in a matrix"},
  {"peak",	   peak,	     "find vector peak in range"},
  {"plot",    	   plot,	     "plot a pair of vectors"},
  {"point",	   point,	     "load overlay with single point"},
  {"ps",      	   ps,		     "define labels for plot"},
  {"pop",      	   pop,		     "pop value from queue to variable"},
  {"push",     	   push,	     "push value onto queue"},
  {"queuelist",	   queuelist,	     "list defined queues"},
  {"queuesize",    queuesize,	     "show queue size"},
  {"rd",           rd,		     "load fits image"},
  {"rdseg",	   rdseg,	     "read a segment of an image from a file"},
  {"read",         read_vectors,     "read vectors from datafile"},
  {"rebin",	   rebin,	     "rebin data by factor of N"},
  {"resize",  	   resize,	     "set graphics/image window size"},
  {"roll",	   roll,	     "roll image to new start point"},
  {"rotate",	   rotate,	     "rotate image"},
  {"save",	   save,	     "save an SAOimage style overlay"},
  {"section", 	   section,	     "define section of graph"},
  {"set",     	   set,		     "vector math"},
  {"shift",	   shift,	     "shift data in an image"},
  {"sort",    	   sort_vectors,     "sort list of vectors"},
  {"spline.apply", spline_apply,     "apply spline fit to generate an image"},
  {"spline.const", spline_construct, "create spline 2nd deriv. terms"},
  {"stats",   	   stats,	     "give statistics on a portion of a buffer"},
  {"style",   	   style,	     "set the style for graph plots"},
  {"subraster",    subraster,	     "subraster of fits image"},
  {"subset",  	   subset,	     "expand vector dimension"},
  {"svd",	   svd,		     "singular value decomposition of a matrix"},
  {"swapbytes",	   swapbytes,        "byte swap thing"},
  {"textline",     textline,	     "write text line on graph"},
  {"tv",      	   tv,		     "display an image on the Kii window"},
  {"tvcontour",	   tvcontour,	     "send contour to overlay"},
  {"tvgrid",	   tvgrid,	     "wait until return is typed"},
  {"uniq",    	   uniq,	     "create a uniq vector subset from a vector"},
  {"unsign",	   unsign,	     "toggle the UNSIGN status"},
  {"vbin",	   vbin,	     "bin values in a vector to be within a range"},
  {"vclip",	   vclip,	     "clip values in a vector to be within a range"},
  {"select",	   vect_select,	     "selective vector assignment"},
  {"vgrid",        vgrid,	     "get info from imreg database"},
  {"vstat",        vstat,	     "get info from imreg database"},
  {"vroll",        vroll,	     "roll vector elements"},
  {"vpop",         vpop, 	     "remove first element"},
  {"wd",      	   wd,		     "write an image to a file"},
  {"write",   	   write_vectors,    "write vectors to datafile"},
  {"zap",     	   zap,		     "delete pixels"},
  {"zplot",   	   zplot,	     "plot x y with size scaled by z"},
}; 

void InitData () {
  
  int i;

  for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) {
    AddCommand (&cmds[i]);
  }

}
