/* Prototypes and macros for cmds.c */
double ngetf2 (void);
double ninputcomponent (void);
group *ninputgroup (player * P);
int ninputcargotype2 (void);
player *ninputplayer (void);
int ninputproduction (player * P, planet * p);
shiptype *ninputshiptype (player * P);
char *next_token (void);
void extra_token (void);
group *matchgroup (player * P, char *cmd);
fleetname *matchfleet (player * P, char *cmd);
shiptype *matchtype (player * P, char *cmd);
void hstrcpy (char *a, const char *b);
void hcstrcpy (char *a, const char *b);
void hcstrncpy (char *a, const char *b, const int sz);
void cmds_rcsid (void);
double get_tech (char str[],double tech);
group * new_group (player *P, group *g, const int num);
void upgrade_group (player *P, player *Px, group *g, planet *p, int num_to_do);
void cmd_init (char *buf);
int known_empire (const player * P, const player *P2);

#define COL 0
#define CAP 1
#define MAT 2
#define EMP 3
#define ALL_CARGO 4

int group_check (player *P, group *g, fleetname *fl, int groupno, int flag);
#define G_DIST 0x01
#define G_DRIVES 0x02
#define G_OWNPLANET 0x04
#define G_INTERCEPT 0x08
#define G_NOUPG 0x10

int isnum (char * numstr, int type);
#define INT 1
#define FLOAT 2

planet *ninputplanet (player *P);
planet * nametoknownplan (player *P, planet * head, const char *s);


#define DASH 1 /* - and _ are valid as well as a real planet */
#define ANY  2 /* - _ ; and # are valid as well as real planet */

int ngeti (void);
#define NAI -3
#define BADI -2
#define MISSINGI -1

double ngetf (void);
#define NAF -30000.0   /* Not a float */
#define BADF -20000.0  /* Bad float [out of range, typically] */
#define MISSINGF -10000.0 /* Float missing */

int ninputcargotype (void);
#define NOCARGO -1 /* No valid cargo type */

int legal_name (const char * name, int flags);
#define COMMENTNAME -1
#define DASHNAME -2
#define ILLEGNAME -3
#define EMPIRE 1 /* power of two for these things...*/
