mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 06:03:02 +01:00
Remove obsolete definitions
This commit is contained in:
parent
332a6ede8a
commit
a4e8a3f256
@ -86,12 +86,10 @@ typedef struct dsc
|
||||
inline SSHORT DSC_GET_CHARSET(const dsc* desc) {
|
||||
return (desc->dsc_sub_type & 0x00FF);
|
||||
}
|
||||
//#define DSC_GET_CHARSET(dsc) (((dsc)->dsc_sub_type) & 0x00FF)
|
||||
|
||||
inline SSHORT DSC_GET_COLLATE(const dsc* desc) {
|
||||
return (desc->dsc_sub_type >> 8);
|
||||
}
|
||||
//#define DSC_GET_COLLATE(dsc) (((dsc)->dsc_sub_type) >> 8)
|
||||
|
||||
typedef struct alt_dsc {
|
||||
SLONG dsc_combined_type;
|
||||
@ -116,8 +114,6 @@ inline bool DSC_EQUIV(const dsc* d1, const dsc* d2, bool check_collate)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//#define DSC_EQUIV(d1,d2) ((((ALT_DSC*) d1)->dsc_combined_type == ((ALT_DSC*) d2)->dsc_combined_type) &&
|
||||
// ((DSC_GET_CHARSET (d1) == DSC_GET_CHARSET (d2)) || d1->dsc_dtype > dtype_any_text))
|
||||
|
||||
/* In DSC_*_result tables, DTYPE_CANNOT means that the two operands
|
||||
cannot participate together in the requested operation. */
|
||||
@ -139,7 +135,6 @@ inline USHORT TEXT_LEN(const dsc* desc) {
|
||||
return ((desc->dsc_dtype == dtype_text) ? desc->dsc_length
|
||||
: (desc->dsc_dtype == dtype_cstring) ? desc->dsc_length - 1 : desc->dsc_length - sizeof(USHORT));
|
||||
}
|
||||
//#define TEXT_LEN(d) ((d->dsc_dtype == dtype_text) ? d->dsc_length : (d->dsc_dtype == dtype_cstring) ? d->dsc_length - 1 : d->dsc_length - sizeof(USHORT))
|
||||
|
||||
|
||||
/* Text Sub types, distinct from character sets & collations */
|
||||
@ -161,63 +156,45 @@ const SSHORT dsc_num_type_decimal = 2; /* defined as DECIMAL(n,m) */
|
||||
/* Date type information */
|
||||
|
||||
inline bool DTYPE_IS_TEXT(UCHAR d) {
|
||||
return (((d) >= dtype_text) && ((d) <= dtype_varying));
|
||||
return ((d >= dtype_text) && (d <= dtype_varying));
|
||||
}
|
||||
//#define DTYPE_IS_DATE(d) (((d) >= dtype_text) && ((d) <= dtype_varying))
|
||||
|
||||
inline bool DTYPE_IS_DATE(UCHAR t) {
|
||||
return (((t) >= dtype_sql_date) && ((t) <= dtype_timestamp));
|
||||
return ((t >= dtype_sql_date) && (t <= dtype_timestamp));
|
||||
}
|
||||
//#define DTYPE_IS_DATE(t) (((t) >= dtype_sql_date) && ((t) <= dtype_timestamp))
|
||||
|
||||
/* DTYPE_IS_BLOB includes both BLOB and ARRAY since array's are implemented over blobs. */
|
||||
inline bool DTYPE_IS_BLOB(UCHAR d) {
|
||||
return (((d) == dtype_blob) || ((d) == dtype_array));
|
||||
return ((d == dtype_blob) || (d == dtype_array));
|
||||
}
|
||||
|
||||
//#define DTYPE_IS_BLOB(d) (((d) == dtype_blob) || ((d) == dtype_array))
|
||||
|
||||
/* DTYPE_IS_BLOB_OR_QUAD includes both BLOB, QUAD and ARRAY since array's are implemented over blobs. */
|
||||
inline bool DTYPE_IS_BLOB_OR_QUAD(UCHAR d) {
|
||||
return (((d) == dtype_blob) || ((d) == dtype_quad) || ((d) == dtype_array));
|
||||
return ((d == dtype_blob) || (d == dtype_quad) || (d == dtype_array));
|
||||
}
|
||||
|
||||
/* Exact numeric? */
|
||||
inline bool DTYPE_IS_EXACT(UCHAR d) {
|
||||
return (((d) == dtype_int64) || ((d) == dtype_long) || ((d) == dtype_short));
|
||||
return ((d == dtype_int64) || (d == dtype_long) || (d == dtype_short));
|
||||
}
|
||||
|
||||
//#define DTYPE_IS_EXACT(d) (((d) == dtype_int64) ||
|
||||
// ((d) == dtype_long) ||
|
||||
// ((d) == dtype_short))
|
||||
|
||||
#ifdef VMS
|
||||
inline bool DTYPE_IS_APPROX(UCHAR d) {
|
||||
return (((d) == dtype_double) || ((d) == dtype_real) || ((d) == dtype_d_float));
|
||||
return ((d == dtype_double) || (d == dtype_real) || (d == dtype_d_float));
|
||||
}
|
||||
//#define DTYPE_IS_APPROX(d) (((d) == dtype_double) ||
|
||||
// ((d) == dtype_real) ||
|
||||
// ((d) == dtype_d_float))
|
||||
#else
|
||||
inline bool DTYPE_IS_APPROX(UCHAR d) {
|
||||
return (((d) == dtype_double) || ((d) == dtype_real));
|
||||
return ((d == dtype_double) || (d == dtype_real));
|
||||
}
|
||||
//#define DTYPE_IS_APPROX(d) (((d) == dtype_double) ||
|
||||
// ((d) == dtype_real))
|
||||
#endif
|
||||
|
||||
|
||||
inline bool DTYPE_IS_NUMERIC(UCHAR d) {
|
||||
return ((((d) >= dtype_byte) && ((d) <= dtype_d_float)) || ((d) == dtype_int64));
|
||||
return (((d >= dtype_byte) && (d <= dtype_d_float)) || (d == dtype_int64));
|
||||
}
|
||||
//#define DTYPE_IS_NUMERIC(d) ((((d) >= dtype_byte) &&
|
||||
// ((d) <= dtype_d_float)) ||
|
||||
// ((d) == dtype_int64))
|
||||
|
||||
inline SCHAR NUMERIC_SCALE(const dsc desc) {
|
||||
return ((DTYPE_IS_TEXT((desc).dsc_dtype)) ? 0 : (desc).dsc_scale);
|
||||
return ((DTYPE_IS_TEXT(desc.dsc_dtype)) ? 0 : desc.dsc_scale);
|
||||
}
|
||||
|
||||
//#define NUMERIC_SCALE(desc) ((DTYPE_IS_TEXT((desc).dsc_dtype)) ? 0 : (desc).dsc_scale)
|
||||
|
||||
#endif /* JRD_DSC_H */
|
||||
|
Loading…
Reference in New Issue
Block a user