.TH "doc_decisions_key_below_md" 3elektra "Sat Nov 5 2022" "Version 0.9.11" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
doc_decisions_key_below_md \- \fCkeyIsBelow\fP 
 
.SH "Problem"
.PP
There are multiple very similar functions to check the 'is below' relation between to keys:
.PP
.IP "\(bu" 2
Replacement \fCkeyIsBelow\fP
.IP "\(bu" 2
Replacement \fCkeyIsBelowOrSame\fP
.IP "\(bu" 2
Replacement \fCkeyIsDirectlyBelow\fP
.PP
.SH "Constraints"
.PP
Keep (at least) the same functionality
.SH "Assumptions"
.PP
.SH "Considered Alternatives"
.PP
.SH "Decision"
.PP
Merge \fCkeyIsBelow\fP with \fCkeyIsBelowOrSame\fP and \fCkeyIsDirectlyBelow\fP to create this new API:
.PP
.PP
.nf

int keyIsBelow (const Key * base, const Key * other);
.fi
.PP
.PP
The replacements for the old functions are:
.PP
.IP "\(bu" 2
old keyIsBelow: \fCkeyIsBelow > 0\fP
.IP "\(bu" 2
keyIsBelowOrSame: \fCkeyIsBelow >= 0\fP
.IP "\(bu" 2
keyIsDirectlyBelow: \fCkeyIsBelow == 1\fP
.PP
.SH "Rationale"
.PP
.SH "Implications"
.PP
.SH "Related Decisions"
.PP
.SH "Notes"
.PP

