projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rearranged whitespace (and comments) in all the code!
[mmh]
/
sbr
/
r1bindex.c
diff --git
a/sbr/r1bindex.c
b/sbr/r1bindex.c
index
92818f9
..
93ec950
100644
(file)
--- a/
sbr/r1bindex.c
+++ b/
sbr/r1bindex.c
@@
-1,4
+1,3
@@
-
/*
* r1bindex.c -- Given a string and a character, return a pointer
* -- to the right of the rightmost occurrence of the
/*
* r1bindex.c -- Given a string and a character, return a pointer
* -- to the right of the rightmost occurrence of the
@@
-16,19
+15,19
@@
char *
r1bindex(char *str, int chr)
{
char *
r1bindex(char *str, int chr)
{
- char *cp;
-
- /* find null at the end of the string */
- for (cp = str; *cp; cp++)
- continue;
+ char *cp;
- /* backup to the rightmost character */
- --cp;
+ /* find null at the end of the string */
+ for (cp = str; *cp; cp++)
+ continue;
- /* now search for the rightmost occurrence of the character */
- while (cp >= str && *cp != chr)
+ /* backup to the rightmost character */
--cp;
--cp;
- /* now move one to the right */
- return (++cp);
+ /* now search for the rightmost occurrence of the character */
+ while (cp >= str && *cp != chr)
+ --cp;
+
+ /* now move one to the right */
+ return (++cp);
}
}