# include "data.h"

int mcreate (int argc, char **argv) {
  
  int Nx, Ny;
  Buffer *buf;

  if (argc != 4) {
    gprint (GP_ERR, "USAGE: mcreate <buffer> Nx Ny\n");
    return (FALSE);
  }

  if ((buf = SelectBuffer (argv[1], ANYBUFFER, TRUE)) == NULL) return (FALSE);
  Nx = atof (argv[2]);
  Ny = atof (argv[3]);

  /* I should encapsulate this in a create_default_buffer */
  gfits_free_matrix (&buf[0].matrix);
  gfits_free_header (&buf[0].header);
  CreateBuffer (buf, Nx, Ny, -32, 1.0, 0.0);
  return (TRUE);
}
