Changeset c739102 in mainline for uspace/app


Ignore:
Timestamp:
2012-11-21T23:26:22Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

Mainline changes.

Location:
uspace/app
Files:
2 added
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/config.h

    rbebf97d rc739102  
    5555#define PACKAGE_STRING "The brain dead shell"
    5656#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  
    2929
    3030USPACE_PREFIX = ../..
    31 LIBS = $(LIBEXT2_PREFIX)/libext2.a $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBEXT2_PREFIX) -I$(LIBSOFTFLOAT_PREFIX)
     31LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
     32EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBSOFTFLOAT_PREFIX)
    3333BINARY = tester
    3434
     
    4242        print/print4.c \
    4343        print/print5.c \
     44        print/print6.c \
    4445        console/console1.c \
    4546        stdio/stdio1.c \
     
    6263        mm/mapping1.c \
    6364        hw/misc/virtchar1.c \
    64         hw/serial/serial1.c \
    65         ext2/ext2_1.c
     65        hw/serial/serial1.c
    6666
    6767include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/tester/float/softfloat1.c

    rbebf97d rc739102  
    3434#include <mul.h>
    3535#include <div.h>
     36#include <comparison.h>
    3637#include <bool.h>
    3738#include "../tester.h"
     
    4546typedef void (* float_op_t)(float, float, float *, float_t *);
    4647typedef void (* double_op_t)(double, double, double *, double_t *);
     48typedef void (* double_cmp_op_t)(double, double, cmptype_t *, cmptype_t *);
    4749typedef void (* template_t)(void *, unsigned, unsigned, cmptype_t *,
    4850    cmptype_t *);
     
    6668       
    6769        return -a;
     70}
     71
     72static 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;
    6880}
    6981
     
    96108        *pic = (cmptype_t) (c * PRECISION);
    97109        *pisc = (cmptype_t) (sc.val * PRECISION);
     110}
     111
     112static void
     113double_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);
    98119}
    99120
     
    221242}
    222243
     244static void
     245double_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
    223265const char *test_softfloat1(void)
    224266{
     
    249291                TPRINTF("%s\n", err);
    250292        }
     293        if (!test_template(double_compare_template, double_cmp_operator)) {
     294                err = "Double comparison failed";
     295                TPRINTF("%s\n", err);
     296        }
    251297       
    252298        return err;
  • uspace/app/tester/print/print5.def

    rbebf97d rc739102  
    11{
    2         "print1",
    3         "String printf test",
    4         &test_print1,
     2        "print5",
     3        "Char printf test",
     4        &test_print5,
    55        true
    66},
  • uspace/app/tester/tester.c

    rbebf97d rc739102  
    5353#include "print/print4.def"
    5454#include "print/print5.def"
     55#include "print/print6.def"
    5556#include "console/console1.def"
    5657#include "stdio/stdio1.def"
     
    7374#include "hw/serial/serial1.def"
    7475#include "hw/misc/virtchar1.def"
    75 #include "ext2/ext2_1.def"
    7676        {NULL, NULL, NULL, false}
    7777};
  • uspace/app/tester/tester.h

    rbebf97d rc739102  
    8585extern const char *test_print4(void);
    8686extern const char *test_print5(void);
     87extern const char *test_print6(void);
    8788extern const char *test_console1(void);
    8889extern const char *test_stdio1(void);
     
    105106extern const char *test_serial1(void);
    106107extern const char *test_virtchar1(void);
    107 extern const char *test_ext2_1(void);
    108108extern const char *test_devman1(void);
    109109extern const char *test_devman2(void);
Note: See TracChangeset for help on using the changeset viewer.