diff --git a/elog.c b/elog.c index dd44be25..d7e9bdc5 100755 --- a/elog.c +++ b/elog.c @@ -6,6 +6,9 @@ Contents: Electronic logbook utility $Log$ + Revision 1.9 2002/08/02 11:01:34 midas + Added -r for replies + Revision 1.8 2002/07/23 11:31:08 midas Fixed problems with password cookie @@ -114,6 +117,7 @@ char request[600000], response[10000], content[600000]; INT submit_elog(char *host, int port, char *subdir, char *experiment, char *passwd, char *uname, char *upwd, + int reply, char attrib_name[MAX_N_ATTR][NAME_LENGTH], char attrib[MAX_N_ATTR][NAME_LENGTH], int n_attr, @@ -134,7 +138,7 @@ INT submit_elog(char *host, int port, char *subdir, char *experiment, char *passwd Write password char *uname User name char *upwd User password - int run Run number + int reply Reply to existing message char *attrib_name Attribute names char *attrib Attribute values char *text Message text @@ -235,6 +239,10 @@ char host_name[256], boundary[80], str[80], *p; sprintf(content+strlen(content), "%s\r\nContent-Disposition: form-data; name=\"exp\"\r\n\r\n%s\r\n", boundary, experiment); + if (reply) + sprintf(content+strlen(content), + "%s\r\nContent-Disposition: form-data; name=\"orig\"\r\n\r\n%d\r\n", boundary, reply); + for (i=0 ; i] (up to %d times)\n", MAX_ATTACHMENTS); printf(" -a = (up to %d times)\n", MAX_N_ATTR); + printf(" [-r ] Reply to existing message\n"); printf(" -m ] | \n"); printf("\nArguments with blanks must be enclosed in quotes\n"); printf("The elog message can either be submitted on the command line\n"); @@ -527,7 +560,7 @@ char attr_name[MAX_N_ATTR][NAME_LENGTH], attrib[MAX_N_ATTR][NAME_LENGTH]; /* now submit message */ submit_elog(host_name, port, subdir, logbook, password, - uname, upwd, + uname, upwd, reply, attr_name, attrib, n_attr, text, attachment, buffer, att_size);