Skip to content

Commit f77ce8a

Browse files
author
ripley
committed
add comments
git-svn-id: https://svn.r-project.org/R/trunk@87895 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5dc775e commit f77ce8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/sort.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static int scmp(SEXP x, SEXP y, Rboolean nalast)
8383
}
8484

8585
#define R_INT_MIN 1 + INT_MIN //INT_MIN is NA_INTEGER
86+
// API: in Rinternals.h
8687
Rboolean isUnsorted(SEXP x, Rboolean strictly)
8788
{
8889
R_xlen_t n, i;
@@ -630,6 +631,7 @@ static void ssort2(SEXP *x, R_xlen_t n, Rboolean decreasing)
630631
}
631632

632633
/* The meat of sort.int() */
634+
// Used in envir.c library/utils/src/io.c
633635
void sortVector(SEXP s, Rboolean decreasing)
634636
{
635637
R_xlen_t n = XLENGTH(s);
@@ -1118,6 +1120,7 @@ GREATER_2_SUB_DEF(intdbl2greater, int, double, icmp, rcmp)
11181120
* to the API */
11191121

11201122
// Usage: R_orderVector(indx, n, Rf_lang2(x,y), nalast, decreasing)
1123+
// API
11211124
void R_orderVector(int *indx, // must be pre-allocated to length >= n
11221125
int n,
11231126
SEXP arglist, // <- e.g. Rf_lang2(x,y)
@@ -1130,6 +1133,7 @@ void R_orderVector(int *indx, // must be pre-allocated to length >= n
11301133
}
11311134

11321135
// Fast version of 1-argument case of R_orderVector()
1136+
// API
11331137
void R_orderVector1(int *indx, int n, SEXP x,
11341138
Rboolean nalast, Rboolean decreasing)
11351139
{
@@ -1143,6 +1147,7 @@ void R_orderVector1(int *indx, int n, SEXP x,
11431147
Also used by do_options and ../gnuwin32/extra.c
11441148
Called with rho != R_NilValue only from do_rank, when NAs are not involved.
11451149
*/
1150+
// used in envir.c options.c library/utils/src/windows/registry.c
11461151
attribute_hidden void
11471152
orderVector1(int *indx, int n, SEXP key, Rboolean nalast, Rboolean decreasing,
11481153
SEXP rho)

0 commit comments

Comments
 (0)