Changeset a35b458 in mainline for uspace/app/vlaunch/vlaunch.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

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

    r3061bc1 ra35b458  
    6363{
    6464        printf("%s: Spawning %s %s \n", NAME, app, winreg);
    65        
     65
    6666        task_id_t id;
    6767        task_wait_t wait;
     
    7272                return -1;
    7373        }
    74        
     74
    7575        task_exit_t texit;
    7676        int retval;
     
    8181                return -1;
    8282        }
    83        
     83
    8484        return retval;
    8585}
     
    9797                return 1;
    9898        }
    99        
     99
    100100        surface_t *logo = decode_tga((void *) helenos_tga, helenos_tga_size, 0);
    101101        if (!logo) {
     
    103103                return 1;
    104104        }
    105        
     105
    106106        winreg = argv[1];
    107107        window_t *main_window = window_open(argv[1], NULL,
     
    111111                return 1;
    112112        }
    113        
     113
    114114        pixel_t grd_bg = PIXEL(255, 255, 255, 255);
    115        
     115
    116116        pixel_t btn_bg = PIXEL(255, 255, 255, 255);
    117117        pixel_t btn_fg = PIXEL(255, 186, 186, 186);
    118118        pixel_t btn_text = PIXEL(255, 0, 0, 0);
    119        
     119
    120120        pixel_t lbl_bg = PIXEL(255, 255, 255, 255);
    121121        pixel_t lbl_text = PIXEL(255, 0, 0, 0);
    122        
     122
    123123        canvas_t *logo_canvas = create_canvas(NULL, NULL, LOGO_WIDTH, LOGO_HEIGHT,
    124124            logo);
     
    134134            16, btn_bg, btn_fg, btn_text);
    135135        grid_t *grid = create_grid(window_root(main_window), NULL, 1, 6, grd_bg);
    136        
     136
    137137        if ((!logo_canvas) || (!lbl_caption) || (!btn_vterm) ||
    138138            (!btn_vcalc) || (!btn_vdemo) || (!btn_vlaunch) || (!grid)) {
     
    141141                return 1;
    142142        }
    143        
     143
    144144        sig_connect(&btn_vterm->clicked, &btn_vterm->widget, on_btn_click);
    145145        sig_connect(&btn_vcalc->clicked, &btn_vcalc->widget, on_btn_click);
    146146        sig_connect(&btn_vdemo->clicked, &btn_vdemo->widget, on_btn_click);
    147147        sig_connect(&btn_vlaunch->clicked, &btn_vlaunch->widget, on_btn_click);
    148        
     148
    149149        grid->add(grid, &logo_canvas->widget, 0, 0, 1, 1);
    150150        grid->add(grid, &lbl_caption->widget, 0, 1, 1, 1);
     
    153153        grid->add(grid, &btn_vdemo->widget, 0, 4, 1, 1);
    154154        grid->add(grid, &btn_vlaunch->widget, 0, 5, 1, 1);
    155        
     155
    156156        window_resize(main_window, 0, 0, 210, 164 + LOGO_HEIGHT,
    157157            WINDOW_PLACEMENT_RIGHT | WINDOW_PLACEMENT_TOP);
    158158        window_exec(main_window);
    159        
     159
    160160        task_retval(0);
    161161        async_manager();
    162        
     162
    163163        return 0;
    164164}
Note: See TracChangeset for help on using the changeset viewer.