X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcaseproto.h;h=b0f45c418c47aae8017b0469a5307cff6b9cd7f6;hb=3c7f102523ad679395c3baf023931ffe88f37d88;hp=ba091e6b7f867e034df93d1dc129f6b59124a134;hpb=5c3291dc396b795696e94f47780308fd7ace6fc4;p=pspp-builds.git diff --git a/src/data/caseproto.h b/src/data/caseproto.h index ba091e6b..b0f45c41 100644 --- a/src/data/caseproto.h +++ b/src/data/caseproto.h @@ -22,6 +22,7 @@ #include #include #include +#include #include /* Case prototype. @@ -144,7 +145,7 @@ void caseproto_free__ (struct caseproto *); static inline struct caseproto * caseproto_ref (const struct caseproto *proto_) { - struct caseproto *proto = (struct caseproto *) proto_; + struct caseproto *proto = CONST_CAST (struct caseproto *, proto_); proto->ref_cnt++; return proto; } @@ -183,8 +184,8 @@ caseproto_get_n_widths (const struct caseproto *proto) void caseproto_refresh_long_string_cache__ (const struct caseproto *); /* Returns the number of long string widths in PROTO; that is, - the number of widths in PROTO that are greater than or equal - to MIN_LONG_STRING. */ + the number of widths in PROTO that are greater than to + MAX_SHORT_STRING. */ static inline size_t caseproto_get_n_long_strings (const struct caseproto *proto) { @@ -193,7 +194,7 @@ caseproto_get_n_long_strings (const struct caseproto *proto) /* Given long string width IDX1, returns a value IDX2 for which caseproto_get_width(PROTO, IDX2) will return a value greater - than or equal to MIN_LONG_STRING. IDX1 must be less than + than MAX_SHORT_STRING. IDX1 must be less than caseproto_get_n_long_strings(PROTO), and IDX2 will be less than caseproto_get_n_widths(PROTO). */ static inline size_t