Changes in / [b487b956:2ef2a0d] in mainline


Ignore:
Files:
5 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rb487b956 r2ef2a0d  
    99tools/xcw/demo/viewer
    1010/.cache
    11 /PKG
    12 /downloads
    13 /amd64-helenos
    14 .cursorignore
  • uspace/app/aboutos/aboutos.c

    rb487b956 r2ef2a0d  
    167167        ui_wnd_params_init(&params);
    168168        params.caption = "About HelenOS";
    169         params.placement = ui_wnd_place_center;
    170169
    171170        /* FIXME: Auto layout */
  • uspace/app/date/date.c

    rb487b956 r2ef2a0d  
    11/*
    2  * Copyright (c) 2025 Wayne Michael Thornton (WMT) <wmthornton-dev@outlook.com>
    32 * Copyright (c) 2012 Maurizio Lombardi
    43 * All rights reserved.
     
    196195
    197196/** Read the day, month and year from a string
    198  *  with the following format: DD/MM/YYYY or MM/DD/YYYY
     197 *  with the following format: DD/MM/YYYY
    199198 */
    200199static errno_t
     
    203202        errno_t rc;
    204203        uint32_t tmp;
    205         uint32_t first_num;
    206         uint32_t second_num;
    207204
    208205        if (str_size(wdate) != 10) /* str_size("DD/MM/YYYY") == 10 */
     
    214211        }
    215212
    216         /* Parse first number */
    217         rc = str_uint32_t(&wdate[0], NULL, 10, false, &first_num);
     213        rc = str_uint32_t(&wdate[0], NULL, 10, false, &tmp);
    218214        if (rc != EOK)
    219215                return rc;
    220216
    221         /* Parse second number */
    222         rc = str_uint32_t(&wdate[3], NULL, 10, false, &second_num);
     217        t->tm_mday = tmp;
     218
     219        rc = str_uint32_t(&wdate[3], NULL, 10, false, &tmp);
    223220        if (rc != EOK)
    224221                return rc;
    225222
    226         /* Determine format based on first number */
    227         if (first_num > 12) {
    228                 /* First number is day (DD/MM/YYYY format) */
    229                 t->tm_mday = first_num;
    230                 t->tm_mon = second_num - 1;
    231         } else if (second_num > 12) {
    232                 /* Second number is day (MM/DD/YYYY format) */
    233                 t->tm_mon = first_num - 1;
    234                 t->tm_mday = second_num;
    235         } else {
    236                 /* Ambiguous case - assume DD/MM/YYYY format */
    237                 t->tm_mday = first_num;
    238                 t->tm_mon = second_num - 1;
    239         }
     223        t->tm_mon = tmp - 1;
    240224
    241225        rc = str_uint32_t(&wdate[6], NULL, 10, false, &tmp);
    242         if (rc != EOK)
    243                 return rc;
    244 
    245226        t->tm_year = tmp - 1900;
    246227
    247         return EOK;
     228        return rc;
    248229}
    249230
     
    350331usage(void)
    351332{
    352         printf("Usage: date [-d DD/MM/YYYY|MM/DD/YYYY] [-t HH:MM[:SS]]\n");
    353         printf("       -d   Change the current date (supports both DD/MM/YYYY and MM/DD/YYYY formats)\n");
     333        printf("Usage: date [-d DD/MM/YYYY] [-t HH:MM[:SS]]\n");
     334        printf("       -d   Change the current date\n");
    354335        printf("       -t   Change the current time\n");
    355336        printf("       -h   Display this information\n");
  • uspace/app/meson.build

    rb487b956 r2ef2a0d  
    3737        'cpptest',
    3838        'date',
    39         'date_cfg',
    4039        'devctl',
    4140        'df',
  • uspace/app/taskbar/clock.c

    rb487b956 r2ef2a0d  
    219219}
    220220
    221 /** Launch date configuration application */
    222 static errno_t taskbar_clock_launch_date_cfg(void)
    223 {
    224         task_id_t id;
    225         const char *args[] = { "/app/date_cfg", NULL };
    226         return task_spawnv(&id, NULL, args[0], args);
    227 }
    228 
    229221/** Handle taskbar clock position event.
    230222 *
     
    241233        if (!gfx_pix_inside_rect(&pos, &clock->rect))
    242234                return ui_unclaimed;
    243 
    244         if (event->type == POS_PRESS) {
    245                 taskbar_clock_launch_date_cfg();
    246         }
    247235
    248236        return ui_claimed;
Note: See TracChangeset for help on using the changeset viewer.