Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFCCCC
struct string_mx {
    size_t size;
    size_t maxsize;
    unsigned char strtype;
    char *cstr;
};

typedef struct string_mx *string_m;
typedef const struct string_mx *const_string_m;

/* Function declarations */
extern errno_t strcpy_m(string_m s1, const _string_m s2);
extern errno_t strcat_m(string_m s1, const _string_m s2) ;
/* etc. */

...

Code Block
bgColor#ccccff
struct string_mx;
typedef struct string_mx *string_m;
typedef const struct string_mx *const_string_m;

In the internal header file, struct string_mx is fully defined but not visible to a user of the data abstraction.

Code Block
bgColor#ccccff
struct string_mx {
    size_t size;
    size_t maxsize;
    unsigned char strtype;
    char *cstr;
};

/* Function declarations */
extern errno_t strcpy_m(string_m s1, const _string_m s2);
extern errno_t strcat_m(string_m s1, const _string_m s2) ;
/* etc. */

...