*/
for (compnum = 1, state = FLD2;;) {
switch (state = m_getfld2(state, &f, in)) {
*/
for (compnum = 1, state = FLD2;;) {
switch (state = m_getfld2(state, &f, in)) {
- adios(EX_DATAERR, NULL, "message format error in component #%d",
- compnum);
+ adios(EX_IOERR, "m_getfld2", "io error");
default:
adios(EX_SOFTWARE, NULL, "getfld() returned %d", state);
default:
adios(EX_SOFTWARE, NULL, "getfld() returned %d", state);
advise(NULL, "message %s has multiple %s: fields", ct->c_file, VRSN_FIELD);
goto next_header;
}
advise(NULL, "message %s has multiple %s: fields", ct->c_file, VRSN_FIELD);
goto next_header;
}
** Insert at first semicolon, if any.
** If none, append to end.
*/
** Insert at first semicolon, if any.
** If none, append to end.
*/
if ((cp = strchr(prefix, ';'))) {
suffix = concat(cp, NULL);
*cp = '\0';
newbuf = concat(prefix, insertion, suffix,
"\n", NULL);
if ((cp = strchr(prefix, ';'))) {
suffix = concat(cp, NULL);
*cp = '\0';
newbuf = concat(prefix, insertion, suffix,
"\n", NULL);
} else {
/* Append to end. */
newbuf = concat(buf, insertion, "\n", NULL);
}
} else {
/* Append to end. */
newbuf = concat(buf, insertion, "\n", NULL);
}
memcpy(extracted_name_value, name_suffix_begin,
cp - name_suffix_begin);
extracted_name_value[cp - name_suffix_begin] = '\0';
memcpy(extracted_name_value, name_suffix_begin,
cp - name_suffix_begin);
extracted_name_value[cp - name_suffix_begin] = '\0';
}
if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
advise(NULL, "invalid ID in message %s", ct->c_file);
}
if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
advise(NULL, "invalid ID in message %s", ct->c_file);
if (istype) {
if ((dp = ci->ci_comment)) {
ci->ci_comment = concat(dp, " ", buffer, NULL);
if (istype) {
if ((dp = ci->ci_comment)) {
ci->ci_comment = concat(dp, " ", buffer, NULL);
/* match character set or set to CHARSET_UNKNOWN */
for (kv = Charset; kv->kv_key; kv++) {
if (!mh_strcasecmp(*ep, kv->kv_key)) {
/* match character set or set to CHARSET_UNKNOWN */
for (kv = Charset; kv->kv_key; kv++) {
if (!mh_strcasecmp(*ep, kv->kv_key)) {
*/
for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) {
if (!mh_strcasecmp(*ap, "id")) {
*/
for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) {
if (!mh_strcasecmp(*ap, "id")) {
** Temporary file already exists, so we rename to
** version with extension.
*/
** Temporary file already exists, so we rename to
** version with extension.
*/
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}
** Temporary file already exists, so we rename to
** version with extension.
*/
** Temporary file already exists, so we rename to
** version with extension.
*/
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}
** Temporary file already exists, so we rename to
** version with extension.
*/
** Temporary file already exists, so we rename to
** version with extension.
*/
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}
ce->ce_file = add(cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
adios(EX_IOERR, ce->ce_file, "unable to rename %s to ",
file_org);
}