
#define CHECK_ERRNO	-2
#define NOTHING	-1
#define WINATTR	0
#define TRANS	1
#define X11IMAGE 2
#define NOMEM 3
#define LADDR	4
#define STR	5

#define MAXSTR		1024
#define ERRORS_STR	90

typedef struct {
 struct list_head node;
 char *name;
 int id;
} album_t;

extern album_t *albums;
extern FILE *dump_file;


extern int errors;
extern char errors_str[ERRORS_STR];

extern sem_t *spin_done;
extern pthread_t *spin_thread;
extern int spin_go, spin_ack;

extern int wait_sec;
extern char nul[];
extern char *album_name;
extern char *cat_name;
extern char *title;
extern char *desc;
extern char *tags;
extern char *username;
extern char *disp;
extern char *password;
extern int timeout_sec;
extern int uptimeout_sec;
extern int upload_id;
extern int album_id;
extern int jpeg_quality;



void add_album(album_t **list, char *name, int id);
void choose_album(void);
