Introduce the notion of a 'sample comment'.
- presence of the sample's reported.by file is now mandatory.
- when saving a sample, reporter name & URL are queried, to avoid operator forget about creating the reported.by file.
- when saving a sample, one can store a few-liner comment.
- when recalling a sample, the reporter name, URL and comment (if present) are printed.
- update the powerpc-e500v2-linux-gnuspe sample to include Nate's comment (from his original mail).
- update all samples that were missing the reported.by file.
/trunk/scripts/saveSample.sh | 46 35 11 0 ++++++++++++++++++------
/trunk/scripts/showSamples.sh | 12 6 6 0 +++---
/trunk/samples/powerpc-e500v2-linux-gnuspe/reported.by | 15 15 0 0 ++++++++
/trunk/samples/samples.mk | 22 17 5 0 +++++++++--
4 files changed, 73 insertions(+), 22 deletions(-)
1 diff -durN gcc-4.2.1.orig/libmudflap/mf-hooks2.c gcc-4.2.1/libmudflap/mf-hooks2.c
2 --- gcc-4.2.1.orig/libmudflap/mf-hooks2.c 2005-09-23 23:58:39.000000000 +0200
3 +++ gcc-4.2.1/libmudflap/mf-hooks2.c 2007-08-03 20:35:09.000000000 +0200
6 TRACE ("%s\n", __PRETTY_FUNCTION__);
7 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
14 TRACE ("%s\n", __PRETTY_FUNCTION__);
15 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
16 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
17 - bcopy (src, dest, n);
18 + memmove (dest, src, n);
23 TRACE ("%s\n", __PRETTY_FUNCTION__);
24 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
25 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
26 - return bcmp (s1, s2, n);
27 + return n == 0 ? 0 : memcmp (s1, s2, n);
32 size_t n = strlen (s);
33 TRACE ("%s\n", __PRETTY_FUNCTION__);
34 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
35 - return index (s, c);
36 + return strchr (s, c);
41 size_t n = strlen (s);
42 TRACE ("%s\n", __PRETTY_FUNCTION__);
43 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
44 - return rindex (s, c);
45 + return strrchr (s, c);
48 /* XXX: stpcpy, memccpy */