Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
engboris committed Jun 20, 2024
1 parent 683bb66 commit d5194a0
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 94 deletions.
6 changes: 3 additions & 3 deletions cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -12872,15 +12872,15 @@ output_internal_function (struct cb_program *prog, cb_tree parameter_list)

if (prog->flag_inspect_used) {
output_line ("if (inspect_st != NULL)");
output_line ("\tcob_free (inspect_st);");
output_line ("\tcob_inspect_free (inspect_st);");
}
if (prog->flag_string_used) {
output_line ("if (string_st != NULL)");
output_line ("\tcob_free (string_st);");
output_line ("\tcob_string_free (string_st);");
}
if (prog->flag_unstring_used) {
output_line ("if (unstring_st != NULL)");
output_line ("\tcob_free (unstring_st);");
output_line ("\tcob_unstring_free (unstring_st);");
}

if (prog->flag_main) {
Expand Down
14 changes: 7 additions & 7 deletions libcob/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1244,9 +1244,6 @@ typedef struct __cob_screen {
} cob_screen;

/* String structure */
struct cob_inspect_state;
struct cob_string_state;
struct cob_unstring_state;
typedef struct cob_inspect_state cob_inspect_state;
typedef struct cob_string_state cob_string_state;
typedef struct cob_unstring_state cob_unstring_state;
Expand Down Expand Up @@ -1944,8 +1941,8 @@ COB_EXPIMP int cob_bcd_cmp_zero (cob_field *);
/* Functions in strings.c */

/* Thread-safe inspect */
void cob_inspect_init_r (cob_inspect_state **, cob_field *, const cob_u32_t);
void cob_inspect_init_converting_r (cob_inspect_state **, cob_field *);
COB_EXPIMP void cob_inspect_init_r (cob_inspect_state **, cob_field *, const cob_u32_t);
COB_EXPIMP void cob_inspect_init_converting_r (cob_inspect_state **, cob_field *);
COB_EXPIMP void cob_inspect_start_r (cob_inspect_state *);
COB_EXPIMP void cob_inspect_before_r (cob_inspect_state *, const cob_field *);
COB_EXPIMP void cob_inspect_after_r (cob_inspect_state *, const cob_field *);
Expand All @@ -1957,19 +1954,22 @@ COB_EXPIMP void cob_inspect_trailing_r (cob_inspect_state *, cob_field *, cob_fi
COB_EXPIMP void cob_inspect_converting_r (cob_inspect_state *, const cob_field *, const cob_field *);
COB_EXPIMP void cob_inspect_translating_r (cob_inspect_state *, const unsigned char *);
COB_EXPIMP void cob_inspect_finish_r (cob_inspect_state *);
COB_EXPIMP void cob_inspect_free (cob_inspect_state *);

/* Thread-safe string */
void cob_string_init_r (cob_string_state **, cob_field *, cob_field *);
COB_EXPIMP void cob_string_init_r (cob_string_state **, cob_field *, cob_field *);
COB_EXPIMP void cob_string_delimited_r (cob_string_state *, cob_field *);
COB_EXPIMP void cob_string_append_r (cob_string_state *, cob_field *);
COB_EXPIMP void cob_string_finish_r (cob_string_state *);
COB_EXPIMP void cob_string_free (cob_string_state *);

/* Thread-safe unstring */
void cob_unstring_init_r (cob_unstring_state **, cob_field *, cob_field *, const size_t);
COB_EXPIMP void cob_unstring_init_r (cob_unstring_state **, cob_field *, cob_field *, const size_t);
COB_EXPIMP void cob_unstring_delimited_r (cob_unstring_state *, cob_field *, const cob_u32_t);
COB_EXPIMP void cob_unstring_into_r (cob_unstring_state *, cob_field *, cob_field *, cob_field *);
COB_EXPIMP void cob_unstring_tallying_r (cob_unstring_state *, cob_field *);
COB_EXPIMP void cob_unstring_finish_r (cob_unstring_state *);
COB_EXPIMP void cob_unstring_free (cob_unstring_state *);

/* Compat-only functions for old programs */
COB_EXPIMP void cob_inspect_init (cob_field *, const cob_u32_t);
Expand Down
Loading

0 comments on commit d5194a0

Please sign in to comment.