projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use symbolic names instead of magic values for the position parameter of get_irn_n().
[libfirm]
/
ir
/
be
/
test
/
fehler118.c
diff --git
a/ir/be/test/fehler118.c
b/ir/be/test/fehler118.c
index
27d7819
..
26d3432
100644
(file)
--- a/
ir/be/test/fehler118.c
+++ b/
ir/be/test/fehler118.c
@@
-1,3
+1,4
@@
+/*$ -fcombo $*/
#include <stdlib.h>
char *test(char *name) {
#include <stdlib.h>
char *test(char *name) {
@@
-5,13
+6,11
@@
char *test(char *name) {
int plen;
int min_part = 3;
do {
int plen;
int min_part = 3;
do {
- p = strrchr(name, '.');
- p = p ? p+1 : name;
+ p = name;
while (*p) {
while (*p) {
- plen =
strcspn(p, '.')
;
+ plen =
3
;
p += plen;
if (plen > min_part) trunc = p-1;
p += plen;
if (plen > min_part) trunc = p-1;
- if (*p) p++;
}
} while (trunc == NULL && --min_part != 0);
return p;
}
} while (trunc == NULL && --min_part != 0);
return p;