improve readability of stdlib: fix indentation and remove trailing spaces
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Change-Id: I7dd90a0816b5376ffc1de4499d56935e0bd574a1
This commit is contained in:
parent
1698d9ebfc
commit
e734769276
@ -49,6 +49,6 @@ __assert2(const char *file, int line, const char *func, const char *failedexpr)
|
||||
(void)fprintf(stderr,
|
||||
"assertion \"%s\" failed: file \"%s\", line %d, function \"%s\"\n",
|
||||
failedexpr, file, line, func);
|
||||
abort();
|
||||
abort();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ const char _C_ctype_[1 + CTYPE_NUM_CHARS] = {
|
||||
_P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
|
||||
_L, _L, _L, _L, _L, _L, _L, _L,
|
||||
_L, _L, _L, _L, _L, _L, _L, _L,
|
||||
/* determine printability based on the IS0 8859 8-bit standard */
|
||||
/* determine printability based on the IS0 8859 8-bit standard */
|
||||
_L, _L, _L, _P, _P, _P, _P, _C,
|
||||
|
||||
_C, _C, _C, _C, _C, _C, _C, _C, /* 80 */
|
||||
|
@ -62,8 +62,8 @@ __findenv(const char *name, int *offset)
|
||||
if (i == 0 && *cp++ == '=') {
|
||||
*offset = p - environ;
|
||||
return (cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ putenv(const char *str)
|
||||
if ((equal = strchr(p, '=')) == NULL) {
|
||||
(void)free(p);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
*equal = '\0';
|
||||
rval = setenv(p, equal + 1, 1);
|
||||
(void)free(p);
|
||||
|
@ -39,11 +39,11 @@ static __inline void swapfunc(char *, char *, int, int);
|
||||
/*
|
||||
* Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
|
||||
*/
|
||||
#define swapcode(TYPE, parmi, parmj, n) { \
|
||||
long i = (n) / sizeof (TYPE); \
|
||||
TYPE *pi = (TYPE *) (parmi); \
|
||||
TYPE *pj = (TYPE *) (parmj); \
|
||||
do { \
|
||||
#define swapcode(TYPE, parmi, parmj, n) { \
|
||||
long i = (n) / sizeof (TYPE); \
|
||||
TYPE *pi = (TYPE *) (parmi); \
|
||||
TYPE *pj = (TYPE *) (parmj); \
|
||||
do { \
|
||||
TYPE t = *pi; \
|
||||
*pi++ = *pj; \
|
||||
*pj++ = t; \
|
||||
@ -70,7 +70,7 @@ swapfunc(char *a, char *b, int n, int swaptype)
|
||||
} else \
|
||||
swapfunc(a, b, es, swaptype)
|
||||
|
||||
#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
|
||||
#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
|
||||
|
||||
static __inline char *
|
||||
med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *))
|
||||
@ -118,7 +118,7 @@ loop: SWAPINIT(a, es);
|
||||
swap_cnt = 1;
|
||||
swap(pa, pb);
|
||||
pa += es;
|
||||
}
|
||||
}
|
||||
pb += es;
|
||||
}
|
||||
while (pb <= pc && (r = cmp(pc, a)) >= 0) {
|
||||
@ -142,7 +142,7 @@ loop: SWAPINIT(a, es);
|
||||
pl -= es)
|
||||
swap(pl, pl - es);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
pn = (char *)a + n * es;
|
||||
r = min(pa - (char *)a, pb - pa);
|
||||
@ -157,5 +157,5 @@ loop: SWAPINIT(a, es);
|
||||
n = r / es;
|
||||
goto loop;
|
||||
}
|
||||
/* qsort(pn - r, r / es, es, cmp);*/
|
||||
/* qsort(pn - r, r / es, es, cmp); */
|
||||
}
|
||||
|
@ -238,8 +238,7 @@ unsigned char finalcount[8];
|
||||
while ((context->count[0] & 504) != 448) {
|
||||
SHA1Update(context, (unsigned char *)"\0", 1);
|
||||
}
|
||||
SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform()
|
||||
*/
|
||||
SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
|
||||
for (i = 0; i < 20; i++) {
|
||||
digest[i] = (unsigned char)
|
||||
((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -387,7 +387,7 @@ size_t wcsxfrm(wchar_t *ws1, const wchar_t *ws2, size_t n)
|
||||
|
||||
int wctob(wint_t c)
|
||||
{
|
||||
return c;
|
||||
return c;
|
||||
}
|
||||
|
||||
wctype_t wctype(const char *property)
|
||||
|
Loading…
x
Reference in New Issue
Block a user