Changeset b0b4592e in mainline for uspace/app
- Timestamp:
- 2014-03-15T19:21:53Z (12 years ago)
- 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. - Location:
- uspace/app
- Files:
-
- 14 added
- 22 edited
- 2 moved
-
hdisk/Makefile (added)
-
hdisk/common.h (added)
-
hdisk/func_gpt.c (added)
-
hdisk/func_gpt.h (added)
-
hdisk/func_mbr.c (added)
-
hdisk/func_mbr.h (added)
-
hdisk/func_none.c (added)
-
hdisk/func_none.h (added)
-
hdisk/hdisk.c (added)
-
hdisk/hdisk.h (added)
-
hdisk/input.c (added)
-
hdisk/input.h (added)
-
init/init.c (modified) (1 diff)
-
kio/Makefile (moved) (moved from uspace/app/klog/Makefile ) (1 diff)
-
kio/kio.c (moved) (moved from uspace/app/klog/klog.c ) (14 diffs)
-
mkbd/Makefile (modified) (1 diff)
-
mkbd/main.c (modified) (1 diff)
-
sportdmp/Makefile (modified) (1 diff)
-
sportdmp/sportdmp.c (modified) (1 diff)
-
tester/Makefile (modified) (2 diffs)
-
tester/float/float2.c (added)
-
tester/float/float2.def (added)
-
tester/float/softfloat1.c (modified) (17 diffs)
-
tester/hw/misc/virtchar1.c (modified) (1 diff)
-
tester/hw/serial/serial1.c (modified) (1 diff)
-
tester/tester.c (modified) (1 diff)
-
tester/tester.h (modified) (1 diff)
-
trace/syscalls.c (modified) (1 diff)
-
vdemo/Makefile (modified) (1 diff)
-
vdemo/vdemo.c (modified) (3 diffs)
-
viewer/Makefile (modified) (1 diff)
-
viewer/viewer.c (modified) (2 diffs)
-
vlaunch/Makefile (modified) (1 diff)
-
vlaunch/vlaunch.c (modified) (3 diffs)
-
vterm/Makefile (modified) (1 diff)
-
vterm/vterm.c (modified) (2 diffs)
-
wavplay/dplay.c (modified) (2 diffs)
-
wavplay/drec.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r2034f98 rb0b4592e 336 336 srv_start("/srv/tmpfs"); 337 337 338 srv_start("/srv/klog"); 338 339 srv_start("/srv/locfs"); 339 340 srv_start("/srv/taskmon"); -
uspace/app/kio/Makefile
r2034f98 rb0b4592e 31 31 LIBS = $(LIBCLUI_PREFIX)/libclui.a 32 32 EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX) 33 BINARY = k log33 BINARY = kio 34 34 35 35 SOURCES = \ 36 k log.c36 kio.c 37 37 38 38 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/kio/kio.c
r2034f98 rb0b4592e 27 27 */ 28 28 29 /** @addtogroup k log KLog30 * @brief HelenOS K Log29 /** @addtogroup kio KIO 30 * @brief HelenOS KIO 31 31 * @{ 32 32 */ … … 42 42 #include <errno.h> 43 43 #include <str_error.h> 44 #include <io/k log.h>44 #include <io/kio.h> 45 45 #include <sysinfo.h> 46 46 #include <malloc.h> … … 50 50 #include <tinput.h> 51 51 52 #define NAME "k log"53 #define LOG_FNAME "/log/k log"52 #define NAME "kio" 53 #define LOG_FNAME "/log/kio" 54 54 55 55 /* Producer/consumer buffers */ … … 62 62 static prodcons_t pc; 63 63 64 /* Pointer to k logarea */65 static wchar_t *k log;66 static size_t k log_length;64 /* Pointer to kio area */ 65 static wchar_t *kio; 66 static size_t kio_length; 67 67 68 68 /* Notification mutex */ … … 75 75 * 76 76 * @param length Number of characters to copy. 77 * @param data Pointer to the kernel k logbuffer.77 * @param data Pointer to the kernel kio buffer. 78 78 * 79 79 */ … … 142 142 /** Kernel notification handler 143 143 * 144 * Receives kernel k lognotifications.144 * Receives kernel kio notifications. 145 145 * 146 146 * @param callid IPC call ID … … 156 156 * starving. 157 157 * 158 * Note: Usually the automatic masking of the k log158 * Note: Usually the automatic masking of the kio 159 159 * notifications on the kernel side does the trick 160 160 * of limiting the chance of accidentally copying 161 161 * the same data multiple times. However, due to 162 * the non-blocking architecture of k lognotifications,162 * the non-blocking architecture of kio notifications, 163 163 * this possibility cannot be generally avoided. 164 164 */ … … 166 166 fibril_mutex_lock(&mtx); 167 167 168 size_t k log_start = (size_t) IPC_GET_ARG1(*call);169 size_t k log_len = (size_t) IPC_GET_ARG2(*call);170 size_t k log_stored = (size_t) IPC_GET_ARG3(*call);171 172 size_t offset = (k log_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; 173 173 174 174 /* Copy data from the ring buffer */ 175 if (offset + k log_stored >= klog_length) {176 size_t split = k log_length - offset;177 178 producer(split, k log+ offset);179 producer(k log_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); 180 180 } else 181 producer(k log_stored, klog+ offset);182 183 event_unmask(EVENT_K LOG);181 producer(kio_stored, kio + offset); 182 183 event_unmask(EVENT_KIO); 184 184 fibril_mutex_unlock(&mtx); 185 185 } … … 188 188 { 189 189 size_t pages; 190 int rc = sysinfo_get_value("k log.pages", &pages);191 if (rc != EOK) { 192 fprintf(stderr, "%s: Unable to get number of k logpages\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", 193 193 NAME); 194 194 return rc; … … 196 196 197 197 uintptr_t faddr; 198 rc = sysinfo_get_value("k log.faddr", &faddr);199 if (rc != EOK) { 200 fprintf(stderr, "%s: Unable to get k logphysical 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", 201 201 NAME); 202 202 return rc; … … 204 204 205 205 size_t size = pages * PAGE_SIZE; 206 k log_length = size / sizeof(wchar_t);206 kio_length = size / sizeof(wchar_t); 207 207 208 208 rc = physmem_map(faddr, pages, AS_AREA_READ | AS_AREA_CACHEABLE, 209 (void *) &k log);210 if (rc != EOK) { 211 fprintf(stderr, "%s: Unable to map k log\n", NAME);209 (void *) &kio); 210 if (rc != EOK) { 211 fprintf(stderr, "%s: Unable to map kio\n", NAME); 212 212 return rc; 213 213 } … … 215 215 prodcons_initialize(&pc); 216 216 async_set_interrupt_received(notification_received); 217 rc = event_subscribe(EVENT_K LOG, 0);218 if (rc != EOK) { 219 fprintf(stderr, "%s: Unable to register k lognotifications\n",217 rc = event_subscribe(EVENT_KIO, 0); 218 if (rc != EOK) { 219 fprintf(stderr, "%s: Unable to register kio notifications\n", 220 220 NAME); 221 221 return rc; … … 236 236 237 237 fibril_add_ready(fid); 238 event_unmask(EVENT_K LOG);239 k log_update();240 241 tinput_set_prompt(input, "k log> ");238 event_unmask(EVENT_KIO); 239 kio_update(); 240 241 tinput_set_prompt(input, "kio> "); 242 242 243 243 char *str; … … 248 248 } 249 249 250 k log_command(str, str_size(str));250 kio_command(str, str_size(str)); 251 251 free(str); 252 252 } -
uspace/app/mkbd/Makefile
r2034f98 rb0b4592e 34 34 $(LIBUSBDEV_PREFIX)/libusbdev.a \ 35 35 $(LIBUSB_PREFIX)/libusb.a \ 36 $(LIBDRV_PREFIX)/libdrv.a 36 $(LIBDRV_PREFIX)/libdrv.a 37 37 38 EXTRA_CFLAGS = \ 38 39 -I$(LIBUSB_PREFIX)/include \ -
uspace/app/mkbd/main.c
r2034f98 rb0b4592e 45 45 #include <loc.h> 46 46 #include <usb/dev/hub.h> 47 #include <usb /hid/iface.h>47 #include <usbhid_iface.h> 48 48 #include <usb/dev/pipes.h> 49 49 #include <async.h> -
uspace/app/sportdmp/Makefile
r2034f98 rb0b4592e 28 28 29 29 USPACE_PREFIX = ../.. 30 #LIBS = 31 #EXTRA_CFLAGS = 30 LIBS = $(LIBDRV_PREFIX)/libdrv.a 31 EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include 32 32 BINARY = sportdmp 33 33 -
uspace/app/sportdmp/sportdmp.c
r2034f98 rb0b4592e 27 27 */ 28 28 29 #include < device/char_dev.h>29 #include <char_dev_iface.h> 30 30 #include <errno.h> 31 31 #include <ipc/serial_ctl.h> -
uspace/app/tester/Makefile
r2034f98 rb0b4592e 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBSOFTFLOAT_PREFIX) 31 32 LIBS = \ 33 $(LIBBLOCK_PREFIX)/libblock.a \ 34 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \ 35 $(LIBDRV_PREFIX)/libdrv.a 36 37 EXTRA_CFLAGS = \ 38 -I$(LIBBLOCK_PREFIX) \ 39 -I$(LIBSOFTFLOAT_PREFIX) \ 40 -I$(LIBDRV_PREFIX)/include 41 33 42 BINARY = tester 43 MATH = y 34 44 35 45 SOURCES = \ … … 53 63 fault/fault3.c \ 54 64 float/float1.c \ 65 float/float2.c \ 55 66 float/softfloat1.c \ 56 67 vfs/vfs1.c \ -
uspace/app/tester/float/softfloat1.c
r2034f98 rb0b4592e 39 39 #include "../tester.h" 40 40 41 #define OPERANDS 1041 #define OPERANDS 10 42 42 #define PRECISION 10000 43 43 … … 56 56 cmptype_t *); 57 57 58 #define NUMBERS \58 #define NUMBERS \ 59 59 3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.499999, -600.0, 1.0 60 60 … … 63 63 }; 64 64 65 static double dop_a[OPERANDS] = {65 static double dop_a[OPERANDS] = { 66 66 NUMBERS 67 67 }; … … 83 83 if (a < b) 84 84 return -1; 85 else if (a > b) 85 86 if (a > b) 86 87 return 1; 87 88 88 89 return 0; 89 90 } 90 91 91 static void 92 uint_to_double_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc) 93 { 92 static 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 94 97 double c; 95 98 double_t sc; 96 97 uint_to_double_op_t op = (uint_to_double_op_t) f;98 99 99 op(uop_a[i], &c, &sc); 100 100 101 101 *pic = (cmptype_t) (c * PRECISION); 102 102 *pisc = (cmptype_t) (sc.val * PRECISION); 103 103 } 104 104 105 static void 106 double_to_uint_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc) 107 { 105 static 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 108 110 unsigned int c; 109 111 unsigned int sc; 110 111 double_to_uint_op_t op = (double_to_uint_op_t) f;112 113 112 op(dop_a[i], &c, &sc); 114 113 115 114 *pic = (cmptype_t) c; 116 115 *pisc = (cmptype_t) sc; … … 118 117 119 118 120 static void 121 float_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 122 cmptype_t *pisc) 123 { 119 static 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 124 124 float c; 125 125 float_t sc; 126 127 float_binary_op_t op = (float_binary_op_t) f;128 129 126 op(fop_a[i], fop_a[j], &c, &sc); 130 127 131 128 *pic = (cmptype_t) (c * PRECISION); 132 129 *pisc = (cmptype_t) (sc.val * PRECISION); 133 130 } 134 131 135 static void 136 double_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 137 cmptype_t *pisc) 138 { 132 static 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 139 137 double c; 140 138 double_t sc; 141 142 double_binary_op_t op = (double_binary_op_t) f;143 144 139 op(dop_a[i], dop_a[j], &c, &sc); 145 140 146 141 *pic = (cmptype_t) (c * PRECISION); 147 142 *pisc = (cmptype_t) (sc.val * PRECISION); 148 143 } 149 144 150 static void 151 double_compare_template(void *f, unsigned i, unsigned j, cmptype_t *pis, 152 cmptype_t *piss) 145 static void double_compare_template(void *f, unsigned i, unsigned j, 146 cmptype_t *pis, cmptype_t *piss) 153 147 { 154 148 double_cmp_op_t op = (double_cmp_op_t) f; … … 164 158 cmptype_t ic; 165 159 cmptype_t isc; 166 167 template(f, i, &ic, &isc); 160 161 template(f, i, &ic, &isc); 168 162 cmptype_t diff = cmpabs(ic - isc); 169 163 170 164 if (diff != 0) { 171 165 TPRINTF("i=%u diff=%" PRIdCMPTYPE "\n", i, diff); … … 182 176 183 177 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++) { 185 179 cmptype_t ic; 186 180 cmptype_t isc; 187 188 template(f, i, j, &ic, &isc); 181 182 template(f, i, j, &ic, &isc); 189 183 cmptype_t diff = cmpabs(ic - isc); 190 184 … … 206 200 } 207 201 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 202 static 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 215 209 *pc = (unsigned int) a; 216 210 *psc = double_to_uint(sa.data); 217 211 } 218 212 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 213 static 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 226 220 *pc = (int) a; 227 221 *psc = double_to_int(sa.data); … … 237 231 sa.val = a; 238 232 sb.val = b; 239 if (sa.data.parts.sign == sb.data.parts.sign) 233 234 if (sa.data.parts.sign == sb.data.parts.sign) { 240 235 psc->data = add_float(sa.data, sb.data); 241 else if (sa.data.parts.sign) {236 } else if (sa.data.parts.sign) { 242 237 sa.data.parts.sign = 0; 243 238 psc->data = sub_float(sb.data, sa.data); … … 267 262 return; 268 263 } 269 264 270 265 *pc = a / b; 271 266 … … 287 282 sa.val = a; 288 283 sb.val = b; 289 if (sa.data.parts.sign == sb.data.parts.sign) 284 285 if (sa.data.parts.sign == sb.data.parts.sign) { 290 286 psc->data = add_double(sa.data, sb.data); 291 else if (sa.data.parts.sign) {287 } else if (sa.data.parts.sign) { 292 288 sa.data.parts.sign = 0; 293 289 psc->data = sub_double(sb.data, sa.data); … … 317 313 return; 318 314 } 319 315 320 316 *pc = a / b; 321 317 … … 328 324 } 329 325 330 static void 331 double_cmp_operator(double a, double b, cmptype_t *pis,cmptype_t *piss)326 static void double_cmp_operator(double a, double b, cmptype_t *pis, 327 cmptype_t *piss) 332 328 { 333 329 *pis = dcmp(a, b); 334 330 335 331 double_t sa; 336 332 double_t sb; 337 338 sa.val = a; 339 sb.val = b; 340 333 334 sa.val = a; 335 sb.val = b; 336 341 337 if (is_double_lt(sa.data, sb.data)) 342 338 *piss = -1; … … 352 348 { 353 349 const char *err = NULL; 354 350 355 351 if (!test_template_binary(float_template_binary, float_add_operator)) { 356 352 err = "Float addition failed"; 357 353 TPRINTF("%s\n", err); 358 354 } 355 359 356 if (!test_template_binary(float_template_binary, float_mul_operator)) { 360 357 err = "Float multiplication failed"; 361 358 TPRINTF("%s\n", err); 362 359 } 360 363 361 if (!test_template_binary(float_template_binary, float_div_operator)) { 364 362 err = "Float division failed"; 365 363 TPRINTF("%s\n", err); 366 364 } 365 367 366 if (!test_template_binary(double_template_binary, double_add_operator)) { 368 367 err = "Double addition failed"; 369 368 TPRINTF("%s\n", err); 370 369 } 370 371 371 if (!test_template_binary(double_template_binary, double_mul_operator)) { 372 372 err = "Double multiplication failed"; 373 373 TPRINTF("%s\n", err); 374 374 } 375 375 376 if (!test_template_binary(double_template_binary, double_div_operator)) { 376 377 err = "Double division failed"; 377 378 TPRINTF("%s\n", err); 378 379 } 380 379 381 if (!test_template_binary(double_compare_template, double_cmp_operator)) { 380 382 err = "Double comparison failed"; 381 383 TPRINTF("%s\n", err); 382 384 } 385 383 386 if (!test_template_unary(uint_to_double_template, 384 387 uint_to_double_operator)) { … … 386 389 TPRINTF("%s\n", err); 387 390 } 391 388 392 if (!test_template_unary(double_to_uint_template, 389 393 double_to_uint_operator)) { … … 391 395 TPRINTF("%s\n", err); 392 396 } 397 393 398 if (!test_template_unary(double_to_uint_template, 394 399 double_to_int_operator)) { … … 399 404 return err; 400 405 } 401 -
uspace/app/tester/hw/misc/virtchar1.c
r2034f98 rb0b4592e 40 40 #include <sys/types.h> 41 41 #include <async.h> 42 #include < device/char_dev.h>42 #include <char_dev_iface.h> 43 43 #include <str.h> 44 44 #include <vfs/vfs.h> -
uspace/app/tester/hw/serial/serial1.c
r2034f98 rb0b4592e 43 43 #include <ipc/services.h> 44 44 #include <loc.h> 45 #include < device/char_dev.h>45 #include <char_dev_iface.h> 46 46 #include <str.h> 47 47 #include <ipc/serial_ctl.h> -
uspace/app/tester/tester.c
r2034f98 rb0b4592e 64 64 #include "fault/fault3.def" 65 65 #include "float/float1.def" 66 #include "float/float2.def" 66 67 #include "float/softfloat1.def" 67 68 #include "vfs/vfs1.def" -
uspace/app/tester/tester.h
r2034f98 rb0b4592e 97 97 extern const char *test_fault3(void); 98 98 extern const char *test_float1(void); 99 extern const char *test_float2(void); 99 100 extern const char *test_softfloat1(void); 100 101 extern const char *test_vfs1(void); -
uspace/app/trace/syscalls.c
r2034f98 rb0b4592e 38 38 39 39 const sc_desc_t syscall_desc[] = { 40 [SYS_K LOG] ={ "klog",3, V_INT_ERRNO },40 [SYS_KIO] ={ "kio", 3, V_INT_ERRNO }, 41 41 [SYS_TLS_SET] = { "tls_set", 1, V_ERRNO }, 42 42 -
uspace/app/vdemo/Makefile
r2034f98 rb0b4592e 28 28 29 29 USPACE_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 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = vdemo 43 MATH = y 35 44 36 45 SOURCES = \ -
uspace/app/vdemo/vdemo.c
r2034f98 rb0b4592e 110 110 { 111 111 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"); 113 113 if (!main_window) { 114 114 printf("Cannot open main window.\n"); … … 117 117 118 118 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 121 124 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); 123 126 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); 127 133 grid_t *grid = create_grid(window_root(main_window), 2, 2, grd_bg); 128 134 if (!lbl_action || !btn_confirm || !btn_cancel || !grid) { … … 144 150 grid->add(grid, &btn_confirm->widget, 0, 1, 1, 1); 145 151 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); 147 154 148 155 window_exec(main_window); -
uspace/app/viewer/Makefile
r2034f98 rb0b4592e 28 28 29 29 USPACE_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 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = viewer 43 MATH = y 35 44 36 45 SOURCES = \ -
uspace/app/viewer/viewer.c
r2034f98 rb0b4592e 166 166 } 167 167 168 main_window = window_open(argv[1], true, false, "viewer" , 0, 0);168 main_window = window_open(argv[1], true, false, "viewer"); 169 169 if (!main_window) { 170 170 printf("Cannot open main window.\n"); … … 192 192 } 193 193 194 window_resize(main_window, WINDOW_WIDTH, WINDOW_HEIGHT); 194 window_resize(main_window, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, 195 WINDOW_PLACEMENT_ABSOLUTE); 195 196 window_exec(main_window); 196 197 -
uspace/app/vlaunch/Makefile
r2034f98 rb0b4592e 28 28 29 29 USPACE_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 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = vlaunch 43 MATH = y 35 44 36 45 SOURCES = \ -
uspace/app/vlaunch/vlaunch.c
r2034f98 rb0b4592e 115 115 116 116 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"); 118 118 if (!main_window) { 119 119 printf("Cannot open main window.\n"); … … 122 122 123 123 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 126 129 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); 128 131 129 132 canvas_t *logo_canvas = create_canvas(NULL, LOGO_WIDTH, LOGO_HEIGHT, 130 133 logo); 131 134 label_t *lbl_caption = create_label(NULL, "Launch application:", 16, 132 lbl_bg, lbl_ fg);135 lbl_bg, lbl_text); 133 136 button_t *btn_vterm = create_button(NULL, "vterm", 16, btn_bg, 134 btn_fg );137 btn_fg, btn_text); 135 138 button_t *btn_vdemo = create_button(NULL, "vdemo", 16, btn_bg, 136 btn_fg );139 btn_fg, btn_text); 137 140 button_t *btn_vlaunch = create_button(NULL, "vlaunch", 16, btn_bg, 138 btn_fg );141 btn_fg, btn_text); 139 142 grid_t *grid = create_grid(window_root(main_window), 1, 5, grd_bg); 140 143 … … 156 159 grid->add(grid, &btn_vlaunch->widget, 0, 4, 1, 1); 157 160 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); 159 163 window_exec(main_window); 160 164 -
uspace/app/vterm/Makefile
r2034f98 rb0b4592e 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \ 31 $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBGRAPH_PREFIX)/libgraph.a \ 30 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBGRAPH_PREFIX)/libgraph.a \ 32 36 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 33 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \ 34 -I$(LIBSOFTREND_PREFIX) -I$(LIBGRAPH_PREFIX) 37 38 EXTRA_CFLAGS += \ 39 -I$(LIBGUI_PREFIX) \ 40 -I$(LIBDRAW_PREFIX) \ 41 -I$(LIBSOFTREND_PREFIX) \ 42 -I$(LIBGRAPH_PREFIX) 43 35 44 BINARY = vterm 45 MATH = y 36 46 37 47 SOURCES = \ -
uspace/app/vterm/vterm.c
r2034f98 rb0b4592e 49 49 } 50 50 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"); 52 52 if (!main_window) { 53 53 printf("%s: Cannot open main window.\n", NAME); … … 55 55 } 56 56 57 window_resize(main_window, 650, 510);57 window_resize(main_window, 0, 0, 648, 508, WINDOW_PLACEMENT_ANY); 58 58 terminal_t *terminal_widget = 59 59 create_terminal(window_root(main_window), 640, 480); -
uspace/app/wavplay/dplay.c
r2034f98 rb0b4592e 41 41 #include <fibril_synch.h> 42 42 #include <pcm/format.h> 43 #include < sys/mman.h>43 #include <as.h> 44 44 #include <sys/time.h> 45 45 #include <inttypes.h> … … 397 397 cleanup: 398 398 fclose(pb.source); 399 munmap(pb.buffer.base, pb.buffer.size);399 as_area_destroy(pb.buffer.base); 400 400 audio_pcm_release_buffer(pb.device); 401 401 close_session: -
uspace/app/wavplay/drec.c
r2034f98 rb0b4592e 40 40 #include <pcm/format.h> 41 41 #include <stdio.h> 42 #include < sys/mman.h>42 #include <as.h> 43 43 #include <inttypes.h> 44 44 … … 229 229 cleanup: 230 230 fclose(rec.file); 231 munmap(rec.buffer.base, rec.buffer.size);231 as_area_destroy(rec.buffer.base); 232 232 audio_pcm_release_buffer(rec.device); 233 233 close_session:
Note:
See TracChangeset
for help on using the changeset viewer.
