#ifndef SHARED_SURVEY_MODIFY_H
#define SHARED_SURVEY_MODIFY_H
#include <stdio.h>
#include <stdlib.h>
#include "../xmlparse.h"
#include "../global.h"
#include "../survey.h"
#include "shared_lock.h"

void xml_header(FILE *fp);
void xml_close(FILE *fp);
void write_title(FILE *fp, SURVEY_DATA *data);
void write_memo(FILE *fp, SURVEY_DATA *data);
void write_likert(FILE *fp, SURVEY_DATA *data);

void write_choice(FILE *fp, SURVEY_DATA *data);
void write_text_custom(FILE *fp, SURVEY_DATA *data);
void modify_strtrim (char *string);
int get_id_count(const char *file_name);
void rewrite_xml_file(char *xml_file, SURVEY_DATA *new_data);
void modify_action( SESSION *user, const char *count, SURVEY_DATA *data);
void insert_data(char *xml_file, SURVEY_DATA *new_data, int pre_id);

void insert_action( SESSION *user, const char *count, SURVEY_DATA *data, int pre_id);

void paste_action( SESSION *user, int crs, const char *key, const char *count,  int pre_id);
void delete_data(char *xml_file,   int delete_id, int *before_me);
void delete_action( SESSION *user, const char *count, int delete_id, int *before_me);
void
write_to_clipboard(const char *count, SURVEY_DATA *data, SESSION *user);

int get_tag_id();
int
get_valid_tag_id(char *file);

void
delete_cut_action(SURVEY_LIST *list,  SESSION *user, const char *count, int delete_id, int *before_me);

#endif
   
        

   
