Changeset 3bacee1 in mainline for uspace/lib/draw


Ignore:
Timestamp:
2018-04-12T16:27:17Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/lib/draw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/drawctx.c

    r76d0981d r3bacee1  
    155155                        for (sysarg_t _x = x; _x < x + width; ++_x) {
    156156                                if (context->shall_clip) {
    157                                         clipped = _x < context->clip_x && _x >= context->clip_width
    158                                             && _y < context->clip_y && _y >= context->clip_height;
     157                                        clipped = _x < context->clip_x && _x >= context->clip_width &&
     158                                            _y < context->clip_y && _y >= context->clip_height;
    159159                                }
    160160
  • uspace/lib/draw/font/bitmap_backend.c

    r76d0981d r3bacee1  
    244244                data->scale = false;
    245245                data->scale_ratio = 1.0;
    246         }
    247         else {
     246        } else {
    248247                data->scale = true;
    249248                data->scale_ratio = ((double) points) / ((double) line_height);
  • uspace/lib/draw/font/pcf.c

    r76d0981d r3bacee1  
    113113        if (format & PCF_FORMAT_MSBYTE_FIRST) {
    114114                return uint32_t_be2host(val);
    115         }
    116         else {
     115        } else {
    117116                return uint32_t_le2host(val);
    118117        }
     
    123122        if (format & PCF_FORMAT_MSBYTE_FIRST) {
    124123                return uint16_t_be2host(val);
    125         }
    126         else {
     124        } else {
    127125                return uint16_t_le2host(val);
    128126        }
     
    201199                pcf_compressed_metrics_t compressed_metrics;
    202200                records_read = fread(&compressed_metrics,
    203                     sizeof(pcf_compressed_metrics_t), 1,data->file);
     201                    sizeof(pcf_compressed_metrics_t), 1, data->file);
    204202                if (records_read != 1)
    205203                        return EINVAL;
     
    216214                    compressed2int(compressed_metrics.character_descent);
    217215                metrics->character_attributes = 0;
    218         }
    219         else {
     216        } else {
    220217                offset = table->offset + 2 * sizeof(uint32_t) +
    221218                    glyph_id * sizeof(pcf_default_metrics_t);
     
    227224                pcf_default_metrics_t uncompressed_metrics;
    228225                records_read = fread(&uncompressed_metrics,
    229                     sizeof(pcf_default_metrics_t), 1,data->file);
     226                    sizeof(pcf_default_metrics_t), 1, data->file);
    230227                if (records_read != 1)
    231228                        return EINVAL;
     
    281278
    282279        offset = data->bitmap_table.offset + (2 * sizeof(uint32_t)) +
    283             (data->glyph_count * sizeof(uint32_t)) + (4 * sizeof(uint32_t))
    284             + bitmap_offset;
     280            (data->glyph_count * sizeof(uint32_t)) + (4 * sizeof(uint32_t)) +
     281            bitmap_offset;
    285282
    286283        if (fseek(data->file, offset, SEEK_SET) < 0)
     
    314311                        size_t column_offset1 = word_index * word_size_bytes;
    315312                        size_t byte_index_within_word =
    316                                 (x % (word_size_bytes * 8)) / 8;
     313                            (x % (word_size_bytes * 8)) / 8;
    317314                        size_t column_offset2;
    318315                        if (data->bitmap_table.format & PCF_FORMAT_MSBYTE_FIRST) {
    319316                                column_offset2 = (word_size_bytes - 1) - byte_index_within_word;
    320                         }
    321                         else {
     317                        } else {
    322318                                column_offset2 = byte_index_within_word;
    323319                        }
     
    326322                        if (data->bitmap_table.format & PCF_FORMAT_MSBIT_FIRST) {
    327323                                set = (b >> (7 - (x % 8))) & 1;
    328                         }
    329                         else {
     324                        } else {
    330325                                set = (b >> (x % 8)) & 1;
    331326                        }
     
    433428                        found_bitmap_table = true;
    434429                        data->bitmap_table = toc_entry;
    435                 }
    436                 else if (toc_entry.type == PCF_TABLE_METRICS) {
     430                } else if (toc_entry.type == PCF_TABLE_METRICS) {
    437431                        if (found_metrics_table)
    438432                                return EINVAL;
    439433                        found_metrics_table = true;
    440434                        data->metrics_table = toc_entry;
    441                 }
    442                 else if (toc_entry.type == PCF_TABLE_ENCODINGS) {
     435                } else if (toc_entry.type == PCF_TABLE_ENCODINGS) {
    443436                        if (found_encodings_table)
    444437                                return EINVAL;
    445438                        found_encodings_table = true;
    446439                        data->encodings_table = toc_entry;
    447                 }
    448                 else if (toc_entry.type == PCF_TABLE_ACCELERATORS) {
     440                } else if (toc_entry.type == PCF_TABLE_ACCELERATORS) {
    449441                        if (found_accelerators_table)
    450442                                return EINVAL;
     
    516508                    data->metrics_table.format);
    517509                metrics_count = metrics_count_16;
    518         }
    519         else {
     510        } else {
    520511                records_read = fread(&metrics_count, sizeof(uint32_t), 1,
    521512                    data->file);
Note: See TracChangeset for help on using the changeset viewer.