Changeset b0b4592e in mainline for uspace/app


Ignore:
Timestamp:
2014-03-15T19:21:53Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c773adc
Parents:
2034f98 (diff), 8cffdf5 (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:

Merge mainline changes

Location:
uspace/app
Files:
14 added
22 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    r2034f98 rb0b4592e  
    336336                srv_start("/srv/tmpfs");
    337337       
     338        srv_start("/srv/klog");
    338339        srv_start("/srv/locfs");
    339340        srv_start("/srv/taskmon");
  • uspace/app/kio/Makefile

    r2034f98 rb0b4592e  
    3131LIBS = $(LIBCLUI_PREFIX)/libclui.a
    3232EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX)
    33 BINARY = klog
     33BINARY = kio
    3434
    3535SOURCES = \
    36         klog.c
     36        kio.c
    3737
    3838include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/kio/kio.c

    r2034f98 rb0b4592e  
    2727 */
    2828
    29 /** @addtogroup klog KLog
    30  * @brief HelenOS KLog
     29/** @addtogroup kio KIO
     30 * @brief HelenOS KIO
    3131 * @{
    3232 */
     
    4242#include <errno.h>
    4343#include <str_error.h>
    44 #include <io/klog.h>
     44#include <io/kio.h>
    4545#include <sysinfo.h>
    4646#include <malloc.h>
     
    5050#include <tinput.h>
    5151
    52 #define NAME       "klog"
    53 #define LOG_FNAME  "/log/klog"
     52#define NAME       "kio"
     53#define LOG_FNAME  "/log/kio"
    5454
    5555/* Producer/consumer buffers */
     
    6262static prodcons_t pc;
    6363
    64 /* Pointer to klog area */
    65 static wchar_t *klog;
    66 static size_t klog_length;
     64/* Pointer to kio area */
     65static wchar_t *kio;
     66static size_t kio_length;
    6767
    6868/* Notification mutex */
     
    7575 *
    7676 * @param length Number of characters to copy.
    77  * @param data   Pointer to the kernel klog buffer.
     77 * @param data   Pointer to the kernel kio buffer.
    7878 *
    7979 */
     
    142142/** Kernel notification handler
    143143 *
    144  * Receives kernel klog notifications.
     144 * Receives kernel kio notifications.
    145145 *
    146146 * @param callid IPC call ID
     
    156156         * starving.
    157157         *
    158          * Note: Usually the automatic masking of the klog
     158         * Note: Usually the automatic masking of the kio
    159159         * notifications on the kernel side does the trick
    160160         * of limiting the chance of accidentally copying
    161161         * the same data multiple times. However, due to
    162          * the non-blocking architecture of klog notifications,
     162         * the non-blocking architecture of kio notifications,
    163163         * this possibility cannot be generally avoided.
    164164         */
     
    166166        fibril_mutex_lock(&mtx);
    167167       
    168         size_t klog_start = (size_t) IPC_GET_ARG1(*call);
    169         size_t klog_len = (size_t) IPC_GET_ARG2(*call);
    170         size_t klog_stored = (size_t) IPC_GET_ARG3(*call);
    171        
    172         size_t offset = (klog_start + klog_len - klog_stored) % klog_length;
     168        size_t kio_start = (size_t) IPC_GET_ARG1(*call);
     169        size_t kio_len = (size_t) IPC_GET_ARG2(*call);
     170        size_t kio_stored = (size_t) IPC_GET_ARG3(*call);
     171       
     172        size_t offset = (kio_start + kio_len - kio_stored) % kio_length;
    173173       
    174174        /* Copy data from the ring buffer */
    175         if (offset + klog_stored >= klog_length) {
    176                 size_t split = klog_length - offset;
    177                
    178                 producer(split, klog + offset);
    179                 producer(klog_stored - split, klog);
     175        if (offset + kio_stored >= kio_length) {
     176                size_t split = kio_length - offset;
     177               
     178                producer(split, kio + offset);
     179                producer(kio_stored - split, kio);
    180180        } else
    181                 producer(klog_stored, klog + offset);
    182        
    183         event_unmask(EVENT_KLOG);
     181                producer(kio_stored, kio + offset);
     182       
     183        event_unmask(EVENT_KIO);
    184184        fibril_mutex_unlock(&mtx);
    185185}
     
    188188{
    189189        size_t pages;
    190         int rc = sysinfo_get_value("klog.pages", &pages);
    191         if (rc != EOK) {
    192                 fprintf(stderr, "%s: Unable to get number of klog pages\n",
     190        int rc = sysinfo_get_value("kio.pages", &pages);
     191        if (rc != EOK) {
     192                fprintf(stderr, "%s: Unable to get number of kio pages\n",
    193193                    NAME);
    194194                return rc;
     
    196196       
    197197        uintptr_t faddr;
    198         rc = sysinfo_get_value("klog.faddr", &faddr);
    199         if (rc != EOK) {
    200                 fprintf(stderr, "%s: Unable to get klog physical address\n",
     198        rc = sysinfo_get_value("kio.faddr", &faddr);
     199        if (rc != EOK) {
     200                fprintf(stderr, "%s: Unable to get kio physical address\n",
    201201                    NAME);
    202202                return rc;
     
    204204       
    205205        size_t size = pages * PAGE_SIZE;
    206         klog_length = size / sizeof(wchar_t);
     206        kio_length = size / sizeof(wchar_t);
    207207       
    208208        rc = physmem_map(faddr, pages, AS_AREA_READ | AS_AREA_CACHEABLE,
    209             (void *) &klog);
    210         if (rc != EOK) {
    211                 fprintf(stderr, "%s: Unable to map klog\n", NAME);
     209            (void *) &kio);
     210        if (rc != EOK) {
     211                fprintf(stderr, "%s: Unable to map kio\n", NAME);
    212212                return rc;
    213213        }
     
    215215        prodcons_initialize(&pc);
    216216        async_set_interrupt_received(notification_received);
    217         rc = event_subscribe(EVENT_KLOG, 0);
    218         if (rc != EOK) {
    219                 fprintf(stderr, "%s: Unable to register klog notifications\n",
     217        rc = event_subscribe(EVENT_KIO, 0);
     218        if (rc != EOK) {
     219                fprintf(stderr, "%s: Unable to register kio notifications\n",
    220220                    NAME);
    221221                return rc;
     
    236236
    237237        fibril_add_ready(fid);
    238         event_unmask(EVENT_KLOG);
    239         klog_update();
    240        
    241         tinput_set_prompt(input, "klog> ");
     238        event_unmask(EVENT_KIO);
     239        kio_update();
     240       
     241        tinput_set_prompt(input, "kio> ");
    242242
    243243        char *str;
     
    248248                }
    249249
    250                 klog_command(str, str_size(str));
     250                kio_command(str, str_size(str));
    251251                free(str);
    252252        }
  • uspace/app/mkbd/Makefile

    r2034f98 rb0b4592e  
    3434        $(LIBUSBDEV_PREFIX)/libusbdev.a \
    3535        $(LIBUSB_PREFIX)/libusb.a \
    36         $(LIBDRV_PREFIX)/libdrv.a
     36        $(LIBDRV_PREFIX)/libdrv.a
     37
    3738EXTRA_CFLAGS = \
    3839        -I$(LIBUSB_PREFIX)/include \
  • uspace/app/mkbd/main.c

    r2034f98 rb0b4592e  
    4545#include <loc.h>
    4646#include <usb/dev/hub.h>
    47 #include <usb/hid/iface.h>
     47#include <usbhid_iface.h>
    4848#include <usb/dev/pipes.h>
    4949#include <async.h>
  • uspace/app/sportdmp/Makefile

    r2034f98 rb0b4592e  
    2828
    2929USPACE_PREFIX = ../..
    30 #LIBS =
    31 #EXTRA_CFLAGS =
     30LIBS = $(LIBDRV_PREFIX)/libdrv.a
     31EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
    3232BINARY = sportdmp
    3333
  • uspace/app/sportdmp/sportdmp.c

    r2034f98 rb0b4592e  
    2727 */
    2828
    29 #include <device/char_dev.h>
     29#include <char_dev_iface.h>
    3030#include <errno.h>
    3131#include <ipc/serial_ctl.h>
  • uspace/app/tester/Makefile

    r2034f98 rb0b4592e  
    2929
    3030USPACE_PREFIX = ../..
    31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBSOFTFLOAT_PREFIX)
     31
     32LIBS = \
     33        $(LIBBLOCK_PREFIX)/libblock.a \
     34        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \
     35        $(LIBDRV_PREFIX)/libdrv.a
     36
     37EXTRA_CFLAGS = \
     38        -I$(LIBBLOCK_PREFIX) \
     39        -I$(LIBSOFTFLOAT_PREFIX) \
     40        -I$(LIBDRV_PREFIX)/include
     41
    3342BINARY = tester
     43MATH = y
    3444
    3545SOURCES = \
     
    5363        fault/fault3.c \
    5464        float/float1.c \
     65        float/float2.c \
    5566        float/softfloat1.c \
    5667        vfs/vfs1.c \
  • uspace/app/tester/float/softfloat1.c

    r2034f98 rb0b4592e  
    3939#include "../tester.h"
    4040
    41 #define OPERANDS  10
     41#define OPERANDS   10
    4242#define PRECISION  10000
    4343
     
    5656    cmptype_t *);
    5757
    58 #define NUMBERS \
     58#define NUMBERS \
    5959        3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.499999, -600.0, 1.0
    6060
     
    6363};
    6464
    65 static double dop_a[OPERANDS] = {
     65static double dop_a[OPERANDS] = {
    6666        NUMBERS
    6767};
     
    8383        if (a < b)
    8484                return -1;
    85         else if (a > b)
     85       
     86        if (a > b)
    8687                return 1;
    87 
     88       
    8889        return 0;
    8990}
    9091
    91 static void
    92 uint_to_double_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc)
    93 {
     92static void uint_to_double_template(void *f, unsigned i, cmptype_t *pic,
     93    cmptype_t *pisc)
     94{
     95        uint_to_double_op_t op = (uint_to_double_op_t) f;
     96       
    9497        double c;
    9598        double_t sc;
    96 
    97         uint_to_double_op_t op = (uint_to_double_op_t) f;
    98        
    9999        op(uop_a[i], &c, &sc);
    100 
     100       
    101101        *pic = (cmptype_t) (c * PRECISION);
    102102        *pisc = (cmptype_t) (sc.val * PRECISION);
    103103}
    104104
    105 static void
    106 double_to_uint_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc)
    107 {
     105static void double_to_uint_template(void *f, unsigned i, cmptype_t *pic,
     106    cmptype_t *pisc)
     107{
     108        double_to_uint_op_t op = (double_to_uint_op_t) f;
     109       
    108110        unsigned int c;
    109111        unsigned int sc;
    110 
    111         double_to_uint_op_t op = (double_to_uint_op_t) f;
    112        
    113112        op(dop_a[i], &c, &sc);
    114 
     113       
    115114        *pic = (cmptype_t) c;
    116115        *pisc = (cmptype_t) sc;
     
    118117
    119118
    120 static void
    121 float_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic,
    122     cmptype_t *pisc)
    123 {
     119static void float_template_binary(void *f, unsigned i, unsigned j,
     120    cmptype_t *pic, cmptype_t *pisc)
     121{
     122        float_binary_op_t op = (float_binary_op_t) f;
     123       
    124124        float c;
    125125        float_t sc;
    126 
    127         float_binary_op_t op = (float_binary_op_t) f;
    128        
    129126        op(fop_a[i], fop_a[j], &c, &sc);
    130 
     127       
    131128        *pic = (cmptype_t) (c * PRECISION);
    132129        *pisc = (cmptype_t) (sc.val * PRECISION);
    133130}
    134131
    135 static void
    136 double_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic,
    137     cmptype_t *pisc)
    138 {
     132static void double_template_binary(void *f, unsigned i, unsigned j,
     133    cmptype_t *pic, cmptype_t *pisc)
     134{
     135        double_binary_op_t op = (double_binary_op_t) f;
     136       
    139137        double c;
    140138        double_t sc;
    141 
    142         double_binary_op_t op = (double_binary_op_t) f;
    143        
    144139        op(dop_a[i], dop_a[j], &c, &sc);
    145 
     140       
    146141        *pic = (cmptype_t) (c * PRECISION);
    147142        *pisc = (cmptype_t) (sc.val * PRECISION);
    148143}
    149144
    150 static void
    151 double_compare_template(void *f, unsigned i, unsigned j, cmptype_t *pis,
    152     cmptype_t *piss)
     145static void double_compare_template(void *f, unsigned i, unsigned j,
     146    cmptype_t *pis, cmptype_t *piss)
    153147{
    154148        double_cmp_op_t op = (double_cmp_op_t) f;
     
    164158                cmptype_t ic;
    165159                cmptype_t isc;
    166 
    167                 template(f, i, &ic, &isc);     
     160               
     161                template(f, i, &ic, &isc);
    168162                cmptype_t diff = cmpabs(ic - isc);
    169                        
     163               
    170164                if (diff != 0) {
    171165                        TPRINTF("i=%u diff=%" PRIdCMPTYPE "\n", i, diff);
     
    182176       
    183177        for (unsigned int i = 0; i < OPERANDS; i++) {
    184                 for (unsigned int j = 0; j < OPERANDS; j++) {                   
     178                for (unsigned int j = 0; j < OPERANDS; j++) {
    185179                        cmptype_t ic;
    186180                        cmptype_t isc;
    187 
    188                         template(f, i, j, &ic, &isc);   
     181                       
     182                        template(f, i, j, &ic, &isc);
    189183                        cmptype_t diff = cmpabs(ic - isc);
    190184                       
     
    206200}
    207201
    208 static void
    209 double_to_uint_operator(double a, unsigned int *pc, unsigned int *psc)
    210 {
    211         double_t sa;
    212 
    213         sa.val = a;
    214 
     202static void double_to_uint_operator(double a, unsigned int *pc,
     203    unsigned int *psc)
     204{
     205        double_t sa;
     206       
     207        sa.val = a;
     208       
    215209        *pc = (unsigned int) a;
    216210        *psc = double_to_uint(sa.data);
    217211}
    218212
    219 static void
    220 double_to_int_operator(double a, unsigned int *pc, unsigned int *psc)
    221 {
    222         double_t sa;
    223 
    224         sa.val = a;
    225 
     213static void double_to_int_operator(double a, unsigned int *pc,
     214    unsigned int *psc)
     215{
     216        double_t sa;
     217       
     218        sa.val = a;
     219       
    226220        *pc = (int) a;
    227221        *psc = double_to_int(sa.data);
     
    237231        sa.val = a;
    238232        sb.val = b;
    239         if (sa.data.parts.sign == sb.data.parts.sign)
     233       
     234        if (sa.data.parts.sign == sb.data.parts.sign) {
    240235                psc->data = add_float(sa.data, sb.data);
    241         else if (sa.data.parts.sign) {
     236        } else if (sa.data.parts.sign) {
    242237                sa.data.parts.sign = 0;
    243238                psc->data = sub_float(sb.data, sa.data);
     
    267262                return;
    268263        }
    269 
     264       
    270265        *pc = a / b;
    271266       
     
    287282        sa.val = a;
    288283        sb.val = b;
    289         if (sa.data.parts.sign == sb.data.parts.sign)
     284       
     285        if (sa.data.parts.sign == sb.data.parts.sign) {
    290286                psc->data = add_double(sa.data, sb.data);
    291         else if (sa.data.parts.sign) {
     287        } else if (sa.data.parts.sign) {
    292288                sa.data.parts.sign = 0;
    293289                psc->data = sub_double(sb.data, sa.data);
     
    317313                return;
    318314        }
    319 
     315       
    320316        *pc = a / b;
    321317       
     
    328324}
    329325
    330 static void
    331 double_cmp_operator(double a, double b, cmptype_t *pis, cmptype_t *piss)
     326static void double_cmp_operator(double a, double b, cmptype_t *pis,
     327    cmptype_t *piss)
    332328{
    333329        *pis = dcmp(a, b);
    334 
     330       
    335331        double_t sa;
    336332        double_t sb;
    337 
    338         sa.val = a;
    339         sb.val = b;
    340 
     333       
     334        sa.val = a;
     335        sb.val = b;
     336       
    341337        if (is_double_lt(sa.data, sb.data))
    342338                *piss = -1;
     
    352348{
    353349        const char *err = NULL;
    354 
     350       
    355351        if (!test_template_binary(float_template_binary, float_add_operator)) {
    356352                err = "Float addition failed";
    357353                TPRINTF("%s\n", err);
    358354        }
     355       
    359356        if (!test_template_binary(float_template_binary, float_mul_operator)) {
    360357                err = "Float multiplication failed";
    361358                TPRINTF("%s\n", err);
    362359        }
     360       
    363361        if (!test_template_binary(float_template_binary, float_div_operator)) {
    364362                err = "Float division failed";
    365363                TPRINTF("%s\n", err);
    366364        }
     365       
    367366        if (!test_template_binary(double_template_binary, double_add_operator)) {
    368367                err = "Double addition failed";
    369368                TPRINTF("%s\n", err);
    370369        }
     370       
    371371        if (!test_template_binary(double_template_binary, double_mul_operator)) {
    372372                err = "Double multiplication failed";
    373373                TPRINTF("%s\n", err);
    374374        }
     375       
    375376        if (!test_template_binary(double_template_binary, double_div_operator)) {
    376377                err = "Double division failed";
    377378                TPRINTF("%s\n", err);
    378379        }
     380       
    379381        if (!test_template_binary(double_compare_template, double_cmp_operator)) {
    380382                err = "Double comparison failed";
    381383                TPRINTF("%s\n", err);
    382384        }
     385       
    383386        if (!test_template_unary(uint_to_double_template,
    384387            uint_to_double_operator)) {
     
    386389                TPRINTF("%s\n", err);
    387390        }
     391       
    388392        if (!test_template_unary(double_to_uint_template,
    389393            double_to_uint_operator)) {
     
    391395                TPRINTF("%s\n", err);
    392396        }
     397       
    393398        if (!test_template_unary(double_to_uint_template,
    394399            double_to_int_operator)) {
     
    399404        return err;
    400405}
    401 
  • uspace/app/tester/hw/misc/virtchar1.c

    r2034f98 rb0b4592e  
    4040#include <sys/types.h>
    4141#include <async.h>
    42 #include <device/char_dev.h>
     42#include <char_dev_iface.h>
    4343#include <str.h>
    4444#include <vfs/vfs.h>
  • uspace/app/tester/hw/serial/serial1.c

    r2034f98 rb0b4592e  
    4343#include <ipc/services.h>
    4444#include <loc.h>
    45 #include <device/char_dev.h>
     45#include <char_dev_iface.h>
    4646#include <str.h>
    4747#include <ipc/serial_ctl.h>
  • uspace/app/tester/tester.c

    r2034f98 rb0b4592e  
    6464#include "fault/fault3.def"
    6565#include "float/float1.def"
     66#include "float/float2.def"
    6667#include "float/softfloat1.def"
    6768#include "vfs/vfs1.def"
  • uspace/app/tester/tester.h

    r2034f98 rb0b4592e  
    9797extern const char *test_fault3(void);
    9898extern const char *test_float1(void);
     99extern const char *test_float2(void);
    99100extern const char *test_softfloat1(void);
    100101extern const char *test_vfs1(void);
  • uspace/app/trace/syscalls.c

    r2034f98 rb0b4592e  
    3838
    3939const sc_desc_t syscall_desc[] = {
    40     [SYS_KLOG] ={ "klog",                               3,      V_INT_ERRNO },
     40    [SYS_KIO] ={ "kio",                                 3,      V_INT_ERRNO },
    4141    [SYS_TLS_SET] = { "tls_set",                        1,      V_ERRNO },
    4242
  • uspace/app/vdemo/Makefile

    r2034f98 rb0b4592e  
    2828
    2929USPACE_PREFIX = ../..
    30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \
    31         $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \
     30
     31LIBS = \
     32        $(LIBGUI_PREFIX)/libgui.a \
     33        $(LIBDRAW_PREFIX)/libdraw.a \
     34        $(LIBSOFTREND_PREFIX)/libsoftrend.a \
     35        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
     36
     37EXTRA_CFLAGS += \
     38        -I$(LIBGUI_PREFIX) \
     39        -I$(LIBDRAW_PREFIX) \
    3340        -I$(LIBSOFTREND_PREFIX)
     41
    3442BINARY = vdemo
     43MATH = y
    3544
    3645SOURCES = \
  • uspace/app/vdemo/vdemo.c

    r2034f98 rb0b4592e  
    110110{
    111111        if (argc >= 2) {
    112                 window_t *main_window = window_open(argv[1], true, true, "vdemo", 0, 0);
     112                window_t *main_window = window_open(argv[1], true, true, "vdemo");
    113113                if (!main_window) {
    114114                        printf("Cannot open main window.\n");
     
    117117
    118118                pixel_t grd_bg = PIXEL(255, 240, 240, 240);
    119                 pixel_t btn_bg = PIXEL(255, 0, 0, 0);
    120                 pixel_t btn_fg = PIXEL(255, 240, 240, 240);
     119               
     120                pixel_t btn_bg = PIXEL(255, 240, 240, 240);
     121                pixel_t btn_fg = PIXEL(255, 186, 186, 186);
     122                pixel_t btn_text = PIXEL(255, 0, 0, 0);
     123               
    121124                pixel_t lbl_bg = PIXEL(255, 240, 240, 240);
    122                 pixel_t lbl_fg = PIXEL(255, 0, 0, 0);
     125                pixel_t lbl_text = PIXEL(255, 0, 0, 0);
    123126
    124                 my_label_t *lbl_action = create_my_label(NULL, "Hello there!", 16, lbl_bg, lbl_fg);
    125                 button_t *btn_confirm = create_button(NULL, "Confirm", 16, btn_bg, btn_fg);
    126                 button_t *btn_cancel = create_button(NULL, "Cancel", 16, btn_bg, btn_fg);
     127                my_label_t *lbl_action = create_my_label(NULL, "Hello there!", 16,
     128                    lbl_bg, lbl_text);
     129                button_t *btn_confirm = create_button(NULL, "Confirm", 16, btn_bg,
     130                    btn_fg, btn_text);
     131                button_t *btn_cancel = create_button(NULL, "Cancel", 16, btn_bg,
     132                    btn_fg, btn_text);
    127133                grid_t *grid = create_grid(window_root(main_window), 2, 2, grd_bg);
    128134                if (!lbl_action || !btn_confirm || !btn_cancel || !grid) {
     
    144150                grid->add(grid, &btn_confirm->widget, 0, 1, 1, 1);
    145151                grid->add(grid, &btn_cancel->widget, 1, 1, 1, 1);
    146                 window_resize(main_window, 200, 76);
     152                window_resize(main_window, 0, 0, 200, 76,
     153                    WINDOW_PLACEMENT_CENTER);
    147154
    148155                window_exec(main_window);
  • uspace/app/viewer/Makefile

    r2034f98 rb0b4592e  
    2828
    2929USPACE_PREFIX = ../..
    30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \
    31         $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \
     30
     31LIBS = \
     32        $(LIBGUI_PREFIX)/libgui.a \
     33        $(LIBDRAW_PREFIX)/libdraw.a \
     34        $(LIBSOFTREND_PREFIX)/libsoftrend.a \
     35        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
     36
     37EXTRA_CFLAGS += \
     38        -I$(LIBGUI_PREFIX) \
     39        -I$(LIBDRAW_PREFIX) \
    3340        -I$(LIBSOFTREND_PREFIX)
     41
    3442BINARY = viewer
     43MATH = y
    3544
    3645SOURCES = \
  • uspace/app/viewer/viewer.c

    r2034f98 rb0b4592e  
    166166        }
    167167       
    168         main_window = window_open(argv[1], true, false, "viewer", 0, 0);
     168        main_window = window_open(argv[1], true, false, "viewer");
    169169        if (!main_window) {
    170170                printf("Cannot open main window.\n");
     
    192192        }
    193193       
    194         window_resize(main_window, WINDOW_WIDTH, WINDOW_HEIGHT);
     194        window_resize(main_window, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT,
     195            WINDOW_PLACEMENT_ABSOLUTE);
    195196        window_exec(main_window);
    196197       
  • uspace/app/vlaunch/Makefile

    r2034f98 rb0b4592e  
    2828
    2929USPACE_PREFIX = ../..
    30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \
    31         $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \
     30
     31LIBS = \
     32        $(LIBGUI_PREFIX)/libgui.a \
     33        $(LIBDRAW_PREFIX)/libdraw.a \
     34        $(LIBSOFTREND_PREFIX)/libsoftrend.a \
     35        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
     36
     37EXTRA_CFLAGS += \
     38        -I$(LIBGUI_PREFIX) \
     39        -I$(LIBDRAW_PREFIX) \
    3340        -I$(LIBSOFTREND_PREFIX)
     41
    3442BINARY = vlaunch
     43MATH = y
    3544
    3645SOURCES = \
  • uspace/app/vlaunch/vlaunch.c

    r2034f98 rb0b4592e  
    115115       
    116116        winreg = argv[1];
    117         window_t *main_window = window_open(argv[1], true, true, "vlaunch", 0, 0);
     117        window_t *main_window = window_open(argv[1], true, true, "vlaunch");
    118118        if (!main_window) {
    119119                printf("Cannot open main window.\n");
     
    122122       
    123123        pixel_t grd_bg = PIXEL(255, 255, 255, 255);
    124         pixel_t btn_bg = PIXEL(255, 0, 0, 0);
    125         pixel_t btn_fg = PIXEL(255, 240, 240, 240);
     124       
     125        pixel_t btn_bg = PIXEL(255, 255, 255, 255);
     126        pixel_t btn_fg = PIXEL(255, 186, 186, 186);
     127        pixel_t btn_text = PIXEL(255, 0, 0, 0);
     128       
    126129        pixel_t lbl_bg = PIXEL(255, 255, 255, 255);
    127         pixel_t lbl_fg = PIXEL(255, 0, 0, 0);
     130        pixel_t lbl_text = PIXEL(255, 0, 0, 0);
    128131       
    129132        canvas_t *logo_canvas = create_canvas(NULL, LOGO_WIDTH, LOGO_HEIGHT,
    130133            logo);
    131134        label_t *lbl_caption = create_label(NULL, "Launch application:", 16,
    132             lbl_bg, lbl_fg);
     135            lbl_bg, lbl_text);
    133136        button_t *btn_vterm = create_button(NULL, "vterm", 16, btn_bg,
    134             btn_fg);
     137            btn_fg, btn_text);
    135138        button_t *btn_vdemo = create_button(NULL, "vdemo", 16, btn_bg,
    136             btn_fg);
     139            btn_fg, btn_text);
    137140        button_t *btn_vlaunch = create_button(NULL, "vlaunch", 16, btn_bg,
    138             btn_fg);
     141            btn_fg, btn_text);
    139142        grid_t *grid = create_grid(window_root(main_window), 1, 5, grd_bg);
    140143       
     
    156159        grid->add(grid, &btn_vlaunch->widget, 0, 4, 1, 1);
    157160       
    158         window_resize(main_window, 210, 130 + LOGO_HEIGHT);
     161        window_resize(main_window, 0, 0, 210, 130 + LOGO_HEIGHT,
     162            WINDOW_PLACEMENT_RIGHT | WINDOW_PLACEMENT_TOP);
    159163        window_exec(main_window);
    160164       
  • uspace/app/vterm/Makefile

    r2034f98 rb0b4592e  
    2828
    2929USPACE_PREFIX = ../..
    30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \
    31         $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBGRAPH_PREFIX)/libgraph.a \
     30
     31LIBS = \
     32        $(LIBGUI_PREFIX)/libgui.a \
     33        $(LIBDRAW_PREFIX)/libdraw.a \
     34        $(LIBSOFTREND_PREFIX)/libsoftrend.a \
     35        $(LIBGRAPH_PREFIX)/libgraph.a \
    3236        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
    33 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \
    34         -I$(LIBSOFTREND_PREFIX) -I$(LIBGRAPH_PREFIX)
     37
     38EXTRA_CFLAGS += \
     39        -I$(LIBGUI_PREFIX) \
     40        -I$(LIBDRAW_PREFIX) \
     41        -I$(LIBSOFTREND_PREFIX) \
     42        -I$(LIBGRAPH_PREFIX)
     43
    3544BINARY = vterm
     45MATH = y
    3646
    3747SOURCES = \
  • uspace/app/vterm/vterm.c

    r2034f98 rb0b4592e  
    4949        }
    5050       
    51         window_t *main_window = window_open(argv[1], true, true, "vterm", 0, 0);
     51        window_t *main_window = window_open(argv[1], true, true, "vterm");
    5252        if (!main_window) {
    5353                printf("%s: Cannot open main window.\n", NAME);
     
    5555        }
    5656       
    57         window_resize(main_window, 650, 510);
     57        window_resize(main_window, 0, 0, 648, 508, WINDOW_PLACEMENT_ANY);
    5858        terminal_t *terminal_widget =
    5959            create_terminal(window_root(main_window), 640, 480);
  • uspace/app/wavplay/dplay.c

    r2034f98 rb0b4592e  
    4141#include <fibril_synch.h>
    4242#include <pcm/format.h>
    43 #include <sys/mman.h>
     43#include <as.h>
    4444#include <sys/time.h>
    4545#include <inttypes.h>
     
    397397cleanup:
    398398        fclose(pb.source);
    399         munmap(pb.buffer.base, pb.buffer.size);
     399        as_area_destroy(pb.buffer.base);
    400400        audio_pcm_release_buffer(pb.device);
    401401close_session:
  • uspace/app/wavplay/drec.c

    r2034f98 rb0b4592e  
    4040#include <pcm/format.h>
    4141#include <stdio.h>
    42 #include <sys/mman.h>
     42#include <as.h>
    4343#include <inttypes.h>
    4444
     
    229229cleanup:
    230230        fclose(rec.file);
    231         munmap(rec.buffer.base, rec.buffer.size);
     231        as_area_destroy(rec.buffer.base);
    232232        audio_pcm_release_buffer(rec.device);
    233233close_session:
Note: See TracChangeset for help on using the changeset viewer.