Changeset c739102 in mainline for uspace/app
- Timestamp:
- 2012-11-21T23:26:22Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f2c80a
- Parents:
- bebf97d (diff), 1f7753a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 2 added
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/config.h
rbebf97d rc739102 55 55 #define PACKAGE_STRING "The brain dead shell" 56 56 #define PACKAGE_TARNAME "bdsh" 57 #define PACKAGE_VERSION "0.0.1" 58 59 60 57 #define PACKAGE_VERSION "0.1.0" -
uspace/app/tester/Makefile
rbebf97d rc739102 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIB EXT2_PREFIX)/libext2.a $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIB EXT2_PREFIX) -I$(LIBSOFTFLOAT_PREFIX)31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBSOFTFLOAT_PREFIX) 33 33 BINARY = tester 34 34 … … 42 42 print/print4.c \ 43 43 print/print5.c \ 44 print/print6.c \ 44 45 console/console1.c \ 45 46 stdio/stdio1.c \ … … 62 63 mm/mapping1.c \ 63 64 hw/misc/virtchar1.c \ 64 hw/serial/serial1.c \ 65 ext2/ext2_1.c 65 hw/serial/serial1.c 66 66 67 67 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/tester/float/softfloat1.c
rbebf97d rc739102 34 34 #include <mul.h> 35 35 #include <div.h> 36 #include <comparison.h> 36 37 #include <bool.h> 37 38 #include "../tester.h" … … 45 46 typedef void (* float_op_t)(float, float, float *, float_t *); 46 47 typedef void (* double_op_t)(double, double, double *, double_t *); 48 typedef void (* double_cmp_op_t)(double, double, cmptype_t *, cmptype_t *); 47 49 typedef void (* template_t)(void *, unsigned, unsigned, cmptype_t *, 48 50 cmptype_t *); … … 66 68 67 69 return -a; 70 } 71 72 static int dcmp(double a, double b) 73 { 74 if (a < b) 75 return -1; 76 else if (a > b) 77 return 1; 78 79 return 0; 68 80 } 69 81 … … 96 108 *pic = (cmptype_t) (c * PRECISION); 97 109 *pisc = (cmptype_t) (sc.val * PRECISION); 110 } 111 112 static void 113 double_compare_template(void *f, unsigned i, unsigned j, cmptype_t *pis, 114 cmptype_t *piss) 115 { 116 double_cmp_op_t op = (double_cmp_op_t) f; 117 118 op(dop_a[i], dop_b[j], pis, piss); 98 119 } 99 120 … … 221 242 } 222 243 244 static void 245 double_cmp_operator(double a, double b, cmptype_t *pis, cmptype_t *piss) 246 { 247 *pis = dcmp(a, b); 248 249 double_t sa; 250 double_t sb; 251 252 sa.val = a; 253 sb.val = b; 254 255 if (is_double_lt(sa.data, sb.data)) 256 *piss = -1; 257 else if (is_double_gt(sa.data, sb.data)) 258 *piss = 1; 259 else if (is_double_eq(sa.data, sb.data)) 260 *piss = 0; 261 else 262 *piss = 42; 263 } 264 223 265 const char *test_softfloat1(void) 224 266 { … … 249 291 TPRINTF("%s\n", err); 250 292 } 293 if (!test_template(double_compare_template, double_cmp_operator)) { 294 err = "Double comparison failed"; 295 TPRINTF("%s\n", err); 296 } 251 297 252 298 return err; -
uspace/app/tester/print/print5.def
rbebf97d rc739102 1 1 { 2 "print 1",3 " Stringprintf test",4 &test_print 1,2 "print5", 3 "Char printf test", 4 &test_print5, 5 5 true 6 6 }, -
uspace/app/tester/tester.c
rbebf97d rc739102 53 53 #include "print/print4.def" 54 54 #include "print/print5.def" 55 #include "print/print6.def" 55 56 #include "console/console1.def" 56 57 #include "stdio/stdio1.def" … … 73 74 #include "hw/serial/serial1.def" 74 75 #include "hw/misc/virtchar1.def" 75 #include "ext2/ext2_1.def"76 76 {NULL, NULL, NULL, false} 77 77 }; -
uspace/app/tester/tester.h
rbebf97d rc739102 85 85 extern const char *test_print4(void); 86 86 extern const char *test_print5(void); 87 extern const char *test_print6(void); 87 88 extern const char *test_console1(void); 88 89 extern const char *test_stdio1(void); … … 105 106 extern const char *test_serial1(void); 106 107 extern const char *test_virtchar1(void); 107 extern const char *test_ext2_1(void);108 108 extern const char *test_devman1(void); 109 109 extern const char *test_devman2(void);
Note:
See TracChangeset
for help on using the changeset viewer.