Changeset 8565a42 in mainline for uspace/app/viewer/viewer.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

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

    r3061bc1 r8565a42  
    7272        kbd_event_t *event = (kbd_event_t *) data;
    7373        bool update = false;
    74        
     74
    7575        if ((event->type == KEY_PRESS) && (event->c == 'q'))
    7676                exit(0);
    77        
     77
    7878        if ((event->type == KEY_PRESS) && (event->key == KC_PAGE_DOWN)) {
    7979                if (imgs_current == imgs_count - 1)
     
    8181                else
    8282                        imgs_current++;
    83                
     83
    8484                update = true;
    8585        }
    86        
     86
    8787        if ((event->type == KEY_PRESS) && (event->key == KC_PAGE_UP)) {
    8888                if (imgs_current == 0)
     
    9090                else
    9191                        imgs_current--;
    92                
     92
    9393                update = true;
    9494        }
    95        
     95
    9696        if (update) {
    9797                surface_t *lsface;
     
    114114        if (rc != EOK)
    115115                return false;
    116        
     116
    117117        vfs_stat_t stat;
    118118        rc = vfs_stat(fd, &stat);
     
    121121                return false;
    122122        }
    123        
     123
    124124        void *tga = malloc(stat.size);
    125125        if (tga == NULL) {
     
    135135                return false;
    136136        }
    137        
     137
    138138        vfs_put(fd);
    139        
     139
    140140        *p_local_surface = decode_tga(tga, stat.size, 0);
    141141        if (*p_local_surface == NULL) {
     
    143143                return false;
    144144        }
    145        
     145
    146146        free(tga);
    147147
    148148        surface_get_resolution(*p_local_surface, &img_width, &img_height);
    149        
     149
    150150        return true;
    151151}
     
    165165                        return false;
    166166                }
    167                
     167
    168168                sig_connect(&canvas->keyboard_event, NULL, on_keyboard_event);
    169169        }
    170        
     170
    171171        if (surface != NULL)
    172172                surface_destroy(surface);
    173        
     173
    174174        surface = local_surface;
    175175        return true;
     
    188188                return 1;
    189189        }
    190        
     190
    191191        if (argc < 3) {
    192192                printf("No image files specified.\n");
     
    200200                return 2;
    201201        }
    202        
     202
    203203        for (int i = 0; i < argc - 2; i++) {
    204204                imgs[i] = str_dup(argv[i + 2]);
     
    226226                return 5;
    227227        }
    228        
    229        
     228
     229
    230230        if (!img_setup(lsface)) {
    231231                printf("Cannot setup image \"%s\".\n", imgs[imgs_current]);
     
    244244            img_height + dheight, WINDOW_PLACEMENT_ANY);
    245245        window_exec(main_window);
    246        
     246
    247247        task_retval(0);
    248248        async_manager();
    249        
     249
    250250        return 0;
    251251}
Note: See TracChangeset for help on using the changeset viewer.