[llvm-commits] CVS: llvm/test/Programs/SingleSource/Shootout/lists.c
Chris Lattner
lattner at cs.uiuc.edu
Fri Dec 13 05:01:01 PST 2002
Changes in directory llvm/test/Programs/SingleSource/Shootout:
lists.c updated: 1.3 -> 1.4
---
Log message:
Remove references to stdout and stderr
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/Shootout/lists.c
diff -u llvm/test/Programs/SingleSource/Shootout/lists.c:1.3 llvm/test/Programs/SingleSource/Shootout/lists.c:1.4
--- llvm/test/Programs/SingleSource/Shootout/lists.c:1.3 Fri Aug 9 15:06:18 2002
+++ llvm/test/Programs/SingleSource/Shootout/lists.c Fri Dec 13 05:00:38 2002
@@ -1,5 +1,5 @@
/* -*- mode: c -*-
- * $Id: lists.c,v 1.3 2002/08/09 20:06:18 lattner Exp $
+ * $Id: lists.c,v 1.4 2002/12/13 11:00:38 lattner Exp $
* http://www.bagley.org/~doug/shootout/
*/
@@ -75,7 +75,7 @@
void list_print(char *msg, DLL *x) {
DLL *xp, *first = x->next;
int i = 0;
- fputs(msg, stdout);
+ puts(msg);
printf("length: %d\n", list_length(x));
for (xp=x->next; xp->next != first; xp=xp->next) {
printf("i:%3d v:%3d n:%3d p:%3d\n", ++i,
@@ -150,7 +150,7 @@
DLL *li3 = list_new();
/* compare li2 and li1 for equality*/
if (!list_equal(li2, li1)) {
- fprintf(stderr, "li2 and li1 are not equal\n");
+ printf("li2 and li1 are not equal\n");
exit(1);
}
while (!list_empty(li2)) {
@@ -158,7 +158,7 @@
}
/* li2 must now be empty*/
if (!list_empty(li2)) {
- fprintf(stderr, "li2 should be empty now\n");
+ printf("li2 should be empty now\n");
exit(1);
}
/* remove each individual item from right side of li3 and
@@ -168,44 +168,44 @@
}
/* li3 must now be empty */
if (!list_empty(li3)) {
- fprintf(stderr, "li3 should be empty now\n");
+ printf("li3 should be empty now\n");
exit(1);
}
/* reverse li1 in place */
list_reverse(li1);
/* check that li1's first item is now SIZE */
if (list_first(li1)->val != SIZE) {
- fprintf(stderr, "li1 first value wrong, wanted %d, got %d\n",
+ printf("li1 first value wrong, wanted %d, got %d\n",
SIZE, list_first(li1)->val);
exit(1);
}
/* check that li1's last item is now 1 */
if (list_last(li1)->val != 1) {
- fprintf(stderr, "last value wrong, wanted %d, got %d\n",
+ printf("last value wrong, wanted %d, got %d\n",
SIZE, list_last(li1)->val);
exit(1);
}
/* check that li2's first item is now SIZE */
if (list_first(li2)->val != SIZE) {
- fprintf(stderr, "li2 first value wrong, wanted %d, got %d\n",
+ printf("li2 first value wrong, wanted %d, got %d\n",
SIZE, list_first(li2)->val);
exit(1);
}
/* check that li2's last item is now 1 */
if (list_last(li2)->val != 1) {
- fprintf(stderr, "last value wrong, wanted %d, got %d\n",
+ printf("last value wrong, wanted %d, got %d\n",
SIZE, list_last(li2)->val);
exit(1);
}
/* check that li1's length is still SIZE */
if (list_length(li1) != SIZE) {
- fprintf(stderr, "li1 size wrong, wanted %d, got %d\n",
+ printf("li1 size wrong, wanted %d, got %d\n",
SIZE, list_length(li1));
exit(1);
}
/* compare li1 and li2 for equality */
if (!list_equal(li1, li2)) {
- fprintf(stderr, "li1 and li2 are not equal\n");
+ printf("li1 and li2 are not equal\n");
exit(1);
}
len = list_length(li1);
More information about the llvm-commits
mailing list