diff options
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/close.c | 2 | ||||
-rw-r--r-- | libgfortran/io/file_pos.c | 16 | ||||
-rw-r--r-- | libgfortran/io/format.c | 2 | ||||
-rw-r--r-- | libgfortran/io/inquire.c | 4 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 36 | ||||
-rw-r--r-- | libgfortran/io/open.c | 70 | ||||
-rw-r--r-- | libgfortran/io/read.c | 14 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 156 | ||||
-rw-r--r-- | libgfortran/io/unit.c | 2 |
9 files changed, 151 insertions, 151 deletions
diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c index 7bd8a3e..eb66f66 100644 --- a/libgfortran/io/close.c +++ b/libgfortran/io/close.c @@ -73,7 +73,7 @@ st_close (st_parameter_close *clp) if (u->flags.status == STATUS_SCRATCH) { if (status == CLOSE_KEEP) - generate_error (&clp->common, ERROR_BAD_OPTION, + generate_error (&clp->common, LIBERROR_BAD_OPTION, "Can't KEEP a scratch file on CLOSE"); #if !HAVE_UNLINK_OPEN_FILE path = (char *) gfc_alloca (u->file_len + 1); diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c index 0a7dd04..c0412e8 100644 --- a/libgfortran/io/file_pos.c +++ b/libgfortran/io/file_pos.c @@ -90,7 +90,7 @@ formatted_backspace (st_parameter_filepos *fpp, gfc_unit *u) return; io_error: - generate_error (&fpp->common, ERROR_OS, NULL); + generate_error (&fpp->common, LIBERROR_OS, NULL); } @@ -122,8 +122,8 @@ unformatted_backspace (st_parameter_filepos *fpp, gfc_unit *u) if (p == NULL || length_read != length) goto io_error; - /* Only CONVERT_NATIVE and CONVERT_SWAP are valid here. */ - if (u->flags.convert == CONVERT_NATIVE) + /* Only GFC_CONVERT_NATIVE and GFC_CONVERT_SWAP are valid here. */ + if (u->flags.convert == GFC_CONVERT_NATIVE) { switch (length) { @@ -178,7 +178,7 @@ unformatted_backspace (st_parameter_filepos *fpp, gfc_unit *u) return; io_error: - generate_error (&fpp->common, ERROR_OS, NULL); + generate_error (&fpp->common, LIBERROR_OS, NULL); } @@ -195,7 +195,7 @@ st_backspace (st_parameter_filepos *fpp) u = find_unit (fpp->common.unit); if (u == NULL) { - generate_error (&fpp->common, ERROR_BAD_UNIT, NULL); + generate_error (&fpp->common, LIBERROR_BAD_UNIT, NULL); goto done; } @@ -296,7 +296,7 @@ st_rewind (st_parameter_filepos *fpp) if (u != NULL) { if (u->flags.access == ACCESS_DIRECT) - generate_error (&fpp->common, ERROR_BAD_OPTION, + generate_error (&fpp->common, LIBERROR_BAD_OPTION, "Cannot REWIND a file opened for DIRECT access"); else { @@ -312,7 +312,7 @@ st_rewind (st_parameter_filepos *fpp) u->last_record = 0; if (file_position (u->s) != 0 && sseek (u->s, 0) == FAILURE) - generate_error (&fpp->common, ERROR_OS, NULL); + generate_error (&fpp->common, LIBERROR_OS, NULL); /* Handle special files like /dev/null differently. */ if (!is_special (u->s)) @@ -359,7 +359,7 @@ st_flush (st_parameter_filepos *fpp) } else /* FLUSH on unconnected unit is illegal: F95 std., 9.3.5. */ - generate_error (&fpp->common, ERROR_BAD_OPTION, + generate_error (&fpp->common, LIBERROR_BAD_OPTION, "Specified UNIT in FLUSH is not connected"); library_end (); diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 038c80d..0f7a2e5 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -942,7 +942,7 @@ format_error (st_parameter_dt *dtp, const fnode *f, const char *message) *p++ = '^'; *p = '\0'; - generate_error (&dtp->common, ERROR_FORMAT, buffer); + generate_error (&dtp->common, LIBERROR_FORMAT, buffer); } diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c index 84f4683..2c16a3b 100644 --- a/libgfortran/io/inquire.c +++ b/libgfortran/io/inquire.c @@ -302,11 +302,11 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u) switch (u->flags.convert) { /* l8_to_l4_offset is 0 for little-endian, 1 for big-endian. */ - case CONVERT_NATIVE: + case GFC_CONVERT_NATIVE: p = l8_to_l4_offset ? "BIG_ENDIAN" : "LITTLE_ENDIAN"; break; - case CONVERT_SWAP: + case GFC_CONVERT_SWAP: p = l8_to_l4_offset ? "LITTLE_ENDIAN" : "BIG_ENDIAN"; break; diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 68fac2c..b97130b 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -207,7 +207,7 @@ next_char (st_parameter_dt *dtp) check for NULL here is cautionary. */ if (p == NULL) { - generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL); + generate_error (&dtp->common, LIBERROR_INTERNAL_UNIT, NULL); return '\0'; } @@ -228,7 +228,7 @@ next_char (st_parameter_dt *dtp) { if (p == NULL) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return '\0'; } if (length == 0) @@ -465,7 +465,7 @@ convert_integer (st_parameter_dt *dtp, int length, int negative) sprintf (message, "Zero repeat count in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); m = 1; } } @@ -482,7 +482,7 @@ convert_integer (st_parameter_dt *dtp, int length, int negative) dtp->u.p.item_count); free_saved (dtp); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -529,7 +529,7 @@ parse_repeat (st_parameter_dt *dtp) "Repeat count overflow in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -542,7 +542,7 @@ parse_repeat (st_parameter_dt *dtp) "Zero repeat count in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -563,7 +563,7 @@ parse_repeat (st_parameter_dt *dtp) free_saved (dtp); sprintf (message, "Bad repeat count in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -708,7 +708,7 @@ read_logical (st_parameter_dt *dtp, int length) free_saved (dtp); sprintf (message, "Bad logical value while reading item %d", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return; logical_done: @@ -840,7 +840,7 @@ read_integer (st_parameter_dt *dtp, int length) free_saved (dtp); sprintf (message, "Bad integer for item %d in list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return; @@ -1004,7 +1004,7 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused))) free_saved (dtp); sprintf (message, "Invalid string input in item %d", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); } } @@ -1123,7 +1123,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length) free_saved (dtp); sprintf (message, "Bad floating point number for item %d", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -1206,7 +1206,7 @@ eol_2: free_saved (dtp); sprintf (message, "Bad complex value in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); } @@ -1421,7 +1421,7 @@ read_real (st_parameter_dt *dtp, int length) free_saved (dtp); sprintf (message, "Bad real number in item %d of list input", dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); } @@ -1439,7 +1439,7 @@ check_type (st_parameter_dt *dtp, bt type, int len) type_name (dtp->u.p.saved_type), type_name (type), dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -1452,7 +1452,7 @@ check_type (st_parameter_dt *dtp, bt type, int len) "Read kind %d %s where kind %d is required for item %d", dtp->u.p.saved_length, type_name (dtp->u.p.saved_type), len, dtp->u.p.item_count); - generate_error (&dtp->common, ERROR_READ_VALUE, message); + generate_error (&dtp->common, LIBERROR_READ_VALUE, message); return 1; } @@ -1478,7 +1478,7 @@ list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p, int kind, dtp->u.p.eof_jump = &eof_jump; if (setjmp (eof_jump)) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); goto cleanup; } @@ -2550,7 +2550,7 @@ namelist_read (st_parameter_dt *dtp) if (setjmp (eof_jump)) { dtp->u.p.eof_jump = NULL; - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } @@ -2634,6 +2634,6 @@ nml_err_ret: dtp->u.p.eof_jump = NULL; free_saved (dtp); free_line (dtp); - generate_error (&dtp->common, ERROR_READ_VALUE, nml_err_msg); + generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg); return; } diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index e4a54ed..0a409ed 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -99,10 +99,10 @@ static const st_option pad_opt[] = static const st_option convert_opt[] = { - { "native", CONVERT_NATIVE}, - { "swap", CONVERT_SWAP}, - { "big_endian", CONVERT_BIG}, - { "little_endian", CONVERT_LITTLE}, + { "native", GFC_CONVERT_NATIVE}, + { "swap", GFC_CONVERT_SWAP}, + { "big_endian", GFC_CONVERT_BIG}, + { "little_endian", GFC_CONVERT_LITTLE}, { NULL, 0} }; @@ -130,24 +130,24 @@ edit_modes (st_parameter_open *opp, gfc_unit * u, unit_flags * flags) if (flags->status != STATUS_UNSPECIFIED && flags->status != STATUS_OLD && u->flags.status != flags->status) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot change STATUS parameter in OPEN statement"); if (flags->access != ACCESS_UNSPECIFIED && u->flags.access != flags->access) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot change ACCESS parameter in OPEN statement"); if (flags->form != FORM_UNSPECIFIED && u->flags.form != flags->form) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot change FORM parameter in OPEN statement"); if ((opp->common.flags & IOPARM_OPEN_HAS_RECL_IN) && opp->recl_in != u->recl) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot change RECL parameter in OPEN statement"); if (flags->action != ACTION_UNSPECIFIED && u->flags.action != flags->action) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot change ACTION parameter in OPEN statement"); /* Status must be OLD if present. */ @@ -159,24 +159,24 @@ edit_modes (st_parameter_open *opp, gfc_unit * u, unit_flags * flags) notify_std (&opp->common, GFC_STD_GNU, "OPEN statement must have a STATUS of OLD or UNKNOWN"); else - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "OPEN statement must have a STATUS of OLD or UNKNOWN"); } if (u->flags.form == FORM_UNFORMATTED) { if (flags->delim != DELIM_UNSPECIFIED) - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "DELIM parameter conflicts with UNFORMATTED form in " "OPEN statement"); if (flags->blank != BLANK_UNSPECIFIED) - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "BLANK parameter conflicts with UNFORMATTED form in " "OPEN statement"); if (flags->pad != PAD_UNSPECIFIED) - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "PAD parameter conflicts with UNFORMATTED form in " "OPEN statement"); } @@ -221,7 +221,7 @@ edit_modes (st_parameter_open *opp, gfc_unit * u, unit_flags * flags) break; seek_error: - generate_error (&opp->common, ERROR_OS, NULL); + generate_error (&opp->common, LIBERROR_OS, NULL); break; } @@ -256,7 +256,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) { if (flags->form == FORM_UNFORMATTED) { - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "DELIM parameter conflicts with UNFORMATTED form in " "OPEN statement"); goto fail; @@ -269,7 +269,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) { if (flags->form == FORM_UNFORMATTED) { - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "BLANK parameter conflicts with UNFORMATTED form in " "OPEN statement"); goto fail; @@ -282,7 +282,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) { if (flags->form == FORM_UNFORMATTED) { - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "PAD parameter conflicts with UNFORMATTED form in " "OPEN statement"); goto fail; @@ -291,7 +291,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) if (flags->position != POSITION_ASIS && flags->access == ACCESS_DIRECT) { - generate_error (&opp->common, ERROR_OPTION_CONFLICT, + generate_error (&opp->common, LIBERROR_OPTION_CONFLICT, "ACCESS parameter conflicts with SEQUENTIAL access in " "OPEN statement"); goto fail; @@ -309,14 +309,14 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) if (flags->access == ACCESS_DIRECT && (opp->common.flags & IOPARM_OPEN_HAS_RECL_IN) == 0) { - generate_error (&opp->common, ERROR_MISSING_OPTION, + generate_error (&opp->common, LIBERROR_MISSING_OPTION, "Missing RECL parameter in OPEN statement"); goto fail; } if ((opp->common.flags & IOPARM_OPEN_HAS_RECL_IN) && opp->recl_in <= 0) { - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "RECL parameter is non-positive in OPEN statement"); goto fail; } @@ -330,7 +330,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) break; } - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "FILE parameter must not be present in OPEN statement"); goto fail; @@ -366,7 +366,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) && (options.stderr_unit < 0 || u2->unit_number != options.stderr_unit)) { unlock_unit (u2); - generate_error (&opp->common, ERROR_ALREADY_OPEN, NULL); + generate_error (&opp->common, LIBERROR_ALREADY_OPEN, NULL); goto cleanup; } @@ -405,7 +405,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) msg = NULL; } - generate_error (&opp->common, ERROR_OS, msg); + generate_error (&opp->common, LIBERROR_OS, msg); goto cleanup; } @@ -431,7 +431,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) if (flags->position == POSITION_APPEND) { if (sseek (u->s, file_length (u->s)) == FAILURE) - generate_error (&opp->common, ERROR_OS, NULL); + generate_error (&opp->common, LIBERROR_OS, NULL); u->endfile = AT_ENDFILE; } @@ -544,7 +544,7 @@ already_open (st_parameter_open *opp, gfc_unit * u, unit_flags * flags) if (sclose (u->s) == FAILURE) { unlock_unit (u); - generate_error (&opp->common, ERROR_OS, + generate_error (&opp->common, LIBERROR_OS, "Error closing file in OPEN statement"); return; } @@ -624,7 +624,7 @@ st_open (st_parameter_open *opp) conv = get_unformatted_convert (opp->common.unit); - if (conv == CONVERT_NONE) + if (conv == GFC_CONVERT_NONE) { /* Nothing has been set by environment variable, check the convert tag. */ if (cf & IOPARM_OPEN_HAS_CONVERT) @@ -639,16 +639,16 @@ st_open (st_parameter_open *opp) and 1 on big-endian machines. */ switch (conv) { - case CONVERT_NATIVE: - case CONVERT_SWAP: + case GFC_CONVERT_NATIVE: + case GFC_CONVERT_SWAP: break; - case CONVERT_BIG: - conv = l8_to_l4_offset ? CONVERT_NATIVE : CONVERT_SWAP; + case GFC_CONVERT_BIG: + conv = l8_to_l4_offset ? GFC_CONVERT_NATIVE : GFC_CONVERT_SWAP; break; - case CONVERT_LITTLE: - conv = l8_to_l4_offset ? CONVERT_SWAP : CONVERT_NATIVE; + case GFC_CONVERT_LITTLE: + conv = l8_to_l4_offset ? GFC_CONVERT_SWAP : GFC_CONVERT_NATIVE; break; default: @@ -659,19 +659,19 @@ st_open (st_parameter_open *opp) flags.convert = conv; if (opp->common.unit < 0) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Bad unit number in OPEN statement"); if (flags.position != POSITION_UNSPECIFIED && flags.access == ACCESS_DIRECT) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Cannot use POSITION with direct access files"); if (flags.access == ACCESS_APPEND) { if (flags.position != POSITION_UNSPECIFIED && flags.position != POSITION_APPEND) - generate_error (&opp->common, ERROR_BAD_OPTION, + generate_error (&opp->common, LIBERROR_BAD_OPTION, "Conflicting ACCESS and POSITION flags in" " OPEN statement"); diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index 2049cca..8baa357 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -175,7 +175,7 @@ convert_real (st_parameter_dt *dtp, void *dest, const char *buffer, int length) if (errno == EINVAL) { - generate_error (&dtp->common, ERROR_READ_VALUE, + generate_error (&dtp->common, LIBERROR_READ_VALUE, "Error during floating point read"); return 1; } @@ -223,7 +223,7 @@ read_l (st_parameter_dt *dtp, const fnode *f, char *dest, int length) break; default: bad: - generate_error (&dtp->common, ERROR_READ_VALUE, + generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value on logical read"); break; } @@ -393,12 +393,12 @@ read_decimal (st_parameter_dt *dtp, const fnode *f, char *dest, int length) return; bad: - generate_error (&dtp->common, ERROR_READ_VALUE, + generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during integer read"); return; overflow: - generate_error (&dtp->common, ERROR_READ_OVERFLOW, + generate_error (&dtp->common, LIBERROR_READ_OVERFLOW, "Value overflowed during integer read"); return; } @@ -537,12 +537,12 @@ read_radix (st_parameter_dt *dtp, const fnode *f, char *dest, int length, return; bad: - generate_error (&dtp->common, ERROR_READ_VALUE, + generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during integer read"); return; overflow: - generate_error (&dtp->common, ERROR_READ_OVERFLOW, + generate_error (&dtp->common, LIBERROR_READ_OVERFLOW, "Value overflowed during integer read"); return; } @@ -657,7 +657,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) goto done; bad_float: - generate_error (&dtp->common, ERROR_READ_VALUE, + generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during floating point read"); return; diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 8118707..793f194 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -185,7 +185,7 @@ read_sf (st_parameter_dt *dtp, int *length, int no_error) { if (no_error) break; - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return NULL; } @@ -218,7 +218,7 @@ read_sf (st_parameter_dt *dtp, int *length, int no_error) { if (no_error) break; - generate_error (&dtp->common, ERROR_EOR, NULL); + generate_error (&dtp->common, LIBERROR_EOR, NULL); return NULL; } @@ -275,7 +275,7 @@ read_block (st_parameter_dt *dtp, int *length) if (sseek (dtp->u.p.current_unit->s, dtp->u.p.current_unit->strm_pos - 1) == FAILURE) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return NULL; } } @@ -293,7 +293,7 @@ read_block (st_parameter_dt *dtp, int *length) if (dtp->u.p.current_unit->flags.pad == PAD_NO) { /* Not enough data left. */ - generate_error (&dtp->common, ERROR_EOR, NULL); + generate_error (&dtp->common, LIBERROR_EOR, NULL); return NULL; } } @@ -301,7 +301,7 @@ read_block (st_parameter_dt *dtp, int *length) if (dtp->u.p.current_unit->bytes_left == 0) { dtp->u.p.current_unit->endfile = AT_ENDFILE; - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return NULL; } @@ -332,7 +332,7 @@ read_block (st_parameter_dt *dtp, int *length) *length = nread; else { - generate_error (&dtp->common, ERROR_EOR, NULL); + generate_error (&dtp->common, LIBERROR_EOR, NULL); source = NULL; } } @@ -360,7 +360,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) if (sseek (dtp->u.p.current_unit->s, dtp->u.p.current_unit->strm_pos - 1) == FAILURE) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } @@ -368,7 +368,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) have_read_record = to_read_record; if (sread (dtp->u.p.current_unit->s, buf, &have_read_record) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } @@ -378,7 +378,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) { /* Short read, e.g. if we hit EOF. For stream files, we have to set the end-of-file condition. */ - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } return; @@ -403,7 +403,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) if (sread (dtp->u.p.current_unit->s, buf, &to_read_record) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } @@ -417,7 +417,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) if (short_record) { - generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL); + generate_error (&dtp->common, LIBERROR_SHORT_RECORD, NULL); return; } return; @@ -429,7 +429,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) if (dtp->u.p.current_unit->endfile == AT_ENDFILE) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } @@ -468,7 +468,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) if (sread (dtp->u.p.current_unit->s, buf + have_read_record, &have_read_subrecord) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } @@ -482,7 +482,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) marker would still be present. */ *nbytes = have_read_record; - generate_error (&dtp->common, ERROR_CORRUPT_FILE, NULL); + generate_error (&dtp->common, LIBERROR_CORRUPT_FILE, NULL); return; } @@ -500,7 +500,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) dtp->u.p.current_unit->current_record = 0; next_record_r_unf (dtp, 0); - generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL); + generate_error (&dtp->common, LIBERROR_SHORT_RECORD, NULL); return; } } @@ -514,7 +514,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t *nbytes) dtp->u.p.current_unit->bytes_left -= have_read_record; if (short_record) { - generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL); + generate_error (&dtp->common, LIBERROR_SHORT_RECORD, NULL); return; } return; @@ -536,7 +536,7 @@ write_block (st_parameter_dt *dtp, int length) if (sseek (dtp->u.p.current_unit->s, dtp->u.p.current_unit->strm_pos - 1) == FAILURE) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return NULL; } } @@ -552,7 +552,7 @@ write_block (st_parameter_dt *dtp, int length) dtp->u.p.current_unit->bytes_left = dtp->u.p.current_unit->recl; else { - generate_error (&dtp->common, ERROR_EOR, NULL); + generate_error (&dtp->common, LIBERROR_EOR, NULL); return NULL; } } @@ -564,12 +564,12 @@ write_block (st_parameter_dt *dtp, int length) if (dest == NULL) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return NULL; } if (is_internal_unit (dtp) && dtp->u.p.current_unit->endfile == AT_ENDFILE) - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); if ((dtp->common.flags & IOPARM_DT_HAS_SIZE) != 0) dtp->u.p.size_used += (gfc_offset) length; @@ -599,13 +599,13 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes) if (sseek (dtp->u.p.current_unit->s, dtp->u.p.current_unit->strm_pos - 1) == FAILURE) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return FAILURE; } if (swrite (dtp->u.p.current_unit->s, buf, &nbytes) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return FAILURE; } @@ -620,13 +620,13 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes) { if (dtp->u.p.current_unit->bytes_left < (gfc_offset) nbytes) { - generate_error (&dtp->common, ERROR_DIRECT_EOR, NULL); + generate_error (&dtp->common, LIBERROR_DIRECT_EOR, NULL); return FAILURE; } if (swrite (dtp->u.p.current_unit->s, buf, &nbytes) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return FAILURE; } @@ -665,7 +665,7 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes) if (swrite (dtp->u.p.current_unit->s, buf + have_written, &to_write_subrecord) != 0) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return FAILURE; } @@ -682,7 +682,7 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes) dtp->u.p.current_unit->bytes_left -= have_written; if (short_record) { - generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL); + generate_error (&dtp->common, LIBERROR_SHORT_RECORD, NULL); return FAILURE; } return SUCCESS; @@ -699,7 +699,7 @@ unformatted_read (st_parameter_dt *dtp, bt type, size_t i, sz; /* Currently, character implies size=1. */ - if (dtp->u.p.current_unit->flags.convert == CONVERT_NATIVE + if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE || size == 1 || type == BT_CHARACTER) { sz = size * nelems; @@ -741,7 +741,7 @@ unformatted_write (st_parameter_dt *dtp, bt type, void *source, int kind __attribute__((unused)), size_t size, size_t nelems) { - if (dtp->u.p.current_unit->flags.convert == CONVERT_NATIVE || + if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE || size == 1 || type == BT_CHARACTER) { size *= nelems; @@ -916,7 +916,7 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len, { /* No data descriptors left. */ if (n > 0) - generate_error (&dtp->common, ERROR_FORMAT, + generate_error (&dtp->common, LIBERROR_FORMAT, "Insufficient data descriptors in format after reversion"); return; } @@ -1564,12 +1564,12 @@ us_read (st_parameter_dt *dtp, int continued) if (p == NULL || n != nr) { - generate_error (&dtp->common, ERROR_BAD_US, NULL); + generate_error (&dtp->common, LIBERROR_BAD_US, NULL); return; } - /* Only CONVERT_NATIVE and CONVERT_SWAP are valid here. */ - if (dtp->u.p.current_unit->flags.convert == CONVERT_NATIVE) + /* Only GFC_CONVERT_NATIVE and GFC_CONVERT_SWAP are valid here. */ + if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE) { switch (nr) { @@ -1639,7 +1639,7 @@ us_write (st_parameter_dt *dtp, int continued) nbytes = compile_options.record_marker ; if (swrite (dtp->u.p.current_unit->s, &dummy, &nbytes) != 0) - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); /* For sequential unformatted, if RECL= was not specified in the OPEN we write until we have more bytes than can fit in the subrecord @@ -1721,7 +1721,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { close_unit (dtp->u.p.current_unit); dtp->u.p.current_unit = NULL; - generate_error (&dtp->common, ERROR_BAD_OPTION, + generate_error (&dtp->common, LIBERROR_BAD_OPTION, "Bad unit number in OPEN statement"); return; } @@ -1743,23 +1743,23 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) conv = get_unformatted_convert (dtp->common.unit); - if (conv == CONVERT_NONE) + if (conv == GFC_CONVERT_NONE) conv = compile_options.convert; /* We use l8_to_l4_offset, which is 0 on little-endian machines and 1 on big-endian machines. */ switch (conv) { - case CONVERT_NATIVE: - case CONVERT_SWAP: + case GFC_CONVERT_NATIVE: + case GFC_CONVERT_SWAP: break; - case CONVERT_BIG: - conv = l8_to_l4_offset ? CONVERT_NATIVE : CONVERT_SWAP; + case GFC_CONVERT_BIG: + conv = l8_to_l4_offset ? GFC_CONVERT_NATIVE : GFC_CONVERT_SWAP; break; - case CONVERT_LITTLE: - conv = l8_to_l4_offset ? CONVERT_SWAP : CONVERT_NATIVE; + case GFC_CONVERT_LITTLE: + conv = l8_to_l4_offset ? GFC_CONVERT_SWAP : GFC_CONVERT_NATIVE; break; default: @@ -1782,14 +1782,14 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if (read_flag && dtp->u.p.current_unit->flags.action == ACTION_WRITE) { - generate_error (&dtp->common, ERROR_BAD_ACTION, + generate_error (&dtp->common, LIBERROR_BAD_ACTION, "Cannot read from file opened for WRITE"); return; } if (!read_flag && dtp->u.p.current_unit->flags.action == ACTION_READ) { - generate_error (&dtp->common, ERROR_BAD_ACTION, + generate_error (&dtp->common, LIBERROR_BAD_ACTION, "Cannot write to file opened for READ"); return; } @@ -1805,7 +1805,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) && (cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT)) != 0) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "Format present for UNFORMATTED data transfer"); return; } @@ -1813,20 +1813,20 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if ((cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0 && dtp->u.p.ionml != NULL) { if ((cf & IOPARM_DT_HAS_FORMAT) != 0) - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "A format cannot be specified with a namelist"); } else if (dtp->u.p.current_unit->flags.form == FORM_FORMATTED && !(cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT))) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "Missing format for FORMATTED data transfer"); } if (is_internal_unit (dtp) && dtp->u.p.current_unit->flags.form == FORM_UNFORMATTED) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "Internal file cannot be accessed by UNFORMATTED " "data transfer"); return; @@ -1837,7 +1837,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if (dtp->u.p.current_unit->flags.access == ACCESS_DIRECT && (cf & IOPARM_DT_HAS_REC) == 0) { - generate_error (&dtp->common, ERROR_MISSING_OPTION, + generate_error (&dtp->common, LIBERROR_MISSING_OPTION, "Direct access data transfer requires record number"); return; } @@ -1845,7 +1845,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL && (cf & IOPARM_DT_HAS_REC) != 0) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "Record number not allowed for sequential access data transfer"); return; } @@ -1861,14 +1861,14 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { if (dtp->u.p.current_unit->flags.access == ACCESS_DIRECT) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "ADVANCE specification conflicts with sequential access"); return; } if (is_internal_unit (dtp)) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "ADVANCE specification conflicts with internal file"); return; } @@ -1876,7 +1876,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if ((cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT)) != IOPARM_DT_HAS_FORMAT) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "ADVANCE specification requires an explicit format"); return; } @@ -1886,7 +1886,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { if ((cf & IOPARM_EOR) != 0 && dtp->u.p.advance_status != ADVANCE_NO) { - generate_error (&dtp->common, ERROR_MISSING_OPTION, + generate_error (&dtp->common, LIBERROR_MISSING_OPTION, "EOR specification requires an ADVANCE specification " "of NO"); return; @@ -1894,7 +1894,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if ((cf & IOPARM_DT_HAS_SIZE) != 0 && dtp->u.p.advance_status != ADVANCE_NO) { - generate_error (&dtp->common, ERROR_MISSING_OPTION, + generate_error (&dtp->common, LIBERROR_MISSING_OPTION, "SIZE specification requires an ADVANCE specification of NO"); return; } @@ -1903,21 +1903,21 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { /* Write constraints. */ if ((cf & IOPARM_END) != 0) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "END specification cannot appear in a write statement"); return; } if ((cf & IOPARM_EOR) != 0) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "EOR specification cannot appear in a write statement"); return; } if ((cf & IOPARM_DT_HAS_SIZE) != 0) { - generate_error (&dtp->common, ERROR_OPTION_CONFLICT, + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, "SIZE specification cannot appear in a write statement"); return; } @@ -1931,14 +1931,14 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { if (dtp->rec <= 0) { - generate_error (&dtp->common, ERROR_BAD_OPTION, + generate_error (&dtp->common, LIBERROR_BAD_OPTION, "Record number must be positive"); return; } if (dtp->rec >= dtp->u.p.current_unit->maxrec) { - generate_error (&dtp->common, ERROR_BAD_OPTION, + generate_error (&dtp->common, LIBERROR_BAD_OPTION, "Record number too large"); return; } @@ -1956,7 +1956,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if (dtp->u.p.mode == READING && (dtp->rec -1) * dtp->u.p.current_unit->recl >= file_length (dtp->u.p.current_unit->s)) { - generate_error (&dtp->common, ERROR_BAD_OPTION, + generate_error (&dtp->common, LIBERROR_BAD_OPTION, "Non-existing record number"); return; } @@ -1967,7 +1967,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) if (sseek (dtp->u.p.current_unit->s, (gfc_offset) (dtp->rec - 1) * dtp->u.p.current_unit->recl) == FAILURE) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } } @@ -2033,7 +2033,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) { if (dtp->u.p.current_unit->read_bad && !is_stream_io (dtp)) { - generate_error (&dtp->common, ERROR_BAD_OPTION, + generate_error (&dtp->common, LIBERROR_BAD_OPTION, "Cannot READ after a nonadvancing WRITE"); return; } @@ -2135,7 +2135,7 @@ skip_record (st_parameter_dt *dtp, size_t bytes) /* Direct access files do not generate END conditions, only I/O errors. */ if (sseek (dtp->u.p.current_unit->s, new) == FAILURE) - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); } else { /* Seek by reading data. */ @@ -2148,7 +2148,7 @@ skip_record (st_parameter_dt *dtp, size_t bytes) p = salloc_r (dtp->u.p.current_unit->s, &rlength); if (p == NULL) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } @@ -2231,7 +2231,7 @@ next_record_r (st_parameter_dt *dtp) record = record * dtp->u.p.current_unit->recl; if (sseek (dtp->u.p.current_unit->s, record) == FAILURE) { - generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL); + generate_error (&dtp->common, LIBERROR_INTERNAL_UNIT, NULL); break; } dtp->u.p.current_unit->bytes_left = dtp->u.p.current_unit->recl; @@ -2252,7 +2252,7 @@ next_record_r (st_parameter_dt *dtp) if (p == NULL) { - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); break; } @@ -2296,8 +2296,8 @@ write_us_marker (st_parameter_dt *dtp, const gfc_offset buf) else len = compile_options.record_marker; - /* Only CONVERT_NATIVE and CONVERT_SWAP are valid here. */ - if (dtp->u.p.current_unit->flags.convert == CONVERT_NATIVE) + /* Only GFC_CONVERT_NATIVE and GFC_CONVERT_SWAP are valid here. */ + if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE) { switch (len) { @@ -2393,7 +2393,7 @@ next_record_w_unf (st_parameter_dt *dtp, int next_subrecord) return; io_error: - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); return; } @@ -2461,7 +2461,7 @@ next_record_w (st_parameter_dt *dtp, int done) if (sset (dtp->u.p.current_unit->s, ' ', length) == FAILURE) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } @@ -2476,7 +2476,7 @@ next_record_w (st_parameter_dt *dtp, int done) if (sseek (dtp->u.p.current_unit->s, record) == FAILURE) { - generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL); + generate_error (&dtp->common, LIBERROR_INTERNAL_UNIT, NULL); return; } @@ -2505,7 +2505,7 @@ next_record_w (st_parameter_dt *dtp, int done) if (sset (dtp->u.p.current_unit->s, ' ', length) == FAILURE) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } } @@ -2542,7 +2542,7 @@ next_record_w (st_parameter_dt *dtp, int done) break; io_error: - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); break; } } @@ -2603,7 +2603,7 @@ finalize_transfer (st_parameter_dt *dtp) if (dtp->u.p.eor_condition) { - generate_error (&dtp->common, ERROR_EOR, NULL); + generate_error (&dtp->common, LIBERROR_EOR, NULL); return; } @@ -2626,7 +2626,7 @@ finalize_transfer (st_parameter_dt *dtp) dtp->u.p.eof_jump = &eof_jump; if (setjmp (eof_jump)) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); return; } @@ -2756,14 +2756,14 @@ st_read (st_parameter_dt *dtp) case AT_ENDFILE: if (!is_internal_unit (dtp)) { - generate_error (&dtp->common, ERROR_END, NULL); + generate_error (&dtp->common, LIBERROR_END, NULL); dtp->u.p.current_unit->endfile = AFTER_ENDFILE; dtp->u.p.current_unit->current_record = 0; } break; case AFTER_ENDFILE: - generate_error (&dtp->common, ERROR_ENDFILE, NULL); + generate_error (&dtp->common, LIBERROR_ENDFILE, NULL); dtp->u.p.current_unit->current_record = 0; break; } @@ -2825,7 +2825,7 @@ st_write_done (st_parameter_dt *dtp) { flush (dtp->u.p.current_unit->s); if (struncate (dtp->u.p.current_unit->s) == FAILURE) - generate_error (&dtp->common, ERROR_OS, NULL); + generate_error (&dtp->common, LIBERROR_OS, NULL); } dtp->u.p.current_unit->endfile = AT_ENDFILE; break; diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 644205f..a293bab 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -375,7 +375,7 @@ get_internal_unit (st_parameter_dt *dtp) iunit = get_mem (sizeof (gfc_unit)); if (iunit == NULL) { - generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL); + generate_error (&dtp->common, LIBERROR_INTERNAL_UNIT, NULL); return NULL; } |