Changeset 1b20da0 in mainline for tools


Ignore:
Timestamp:
2018-02-28T17:52:03Z (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:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

Location:
tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tools/autogen.py

    rdf6ded8 r1b20da0  
    11#!/usr/bin/env python
    22#
    3 # Copyright (c) 2014 Jakub Jermar 
     3# Copyright (c) 2014 Jakub Jermar
    44# All rights reserved.
    55#
     
    2929
    3030import sys
    31 import yaml 
     31import yaml
    3232import re
    3333
     
    6767                if 'elements' in member.keys():
    6868                        code = code + "\t%s %s[%d];\n" % (member['type'], member['name'], member['elements'])
    69                 else: 
     69                else:
    7070                        code = code + "\t%s %s;\n" % (member['type'], member['name'])
    7171        code = code + "} %s%s_t;" % (packed, struct['name'])
     
    124124def generate(struct, lines):
    125125        code = """
    126 /***************************************************************************** 
     126/*****************************************************************************
    127127 * AUTO-GENERATED FILE, DO NOT EDIT!!!
    128128 * Generated by: tools/autogen.py
  • tools/check.sh

    rdf6ded8 r1b20da0  
    22
    33#
    4 # Copyright (c) 2010 Jakub Jermar 
     4# Copyright (c) 2010 Jakub Jermar
    55# All rights reserved.
    66#
     
    5454                if [ `echo $H | grep "^$D\/.*"`x != "x"  ];
    5555                then
    56                         continue 2 
     56                        continue 2
    5757                fi
    5858        done
  • tools/config.py

    rdf6ded8 r1b20da0  
    270270# @param rules  Rules
    271271# @param start_index With which rule to start (initial call must specify 0 here).
    272 # @return True if able to find a valid configuration 
     272# @return True if able to find a valid configuration
    273273def random_choices(config, rules, start_index):
    274274        "Fill the configuration with random (but valid) values."
     
    278278        varname, vartype, name, choices, cond = rules[start_index]
    279279
    280         # First check that this rule would make sense   
     280        # First check that this rule would make sense
    281281        if cond:
    282282                if not check_condition(cond, config, rules):
     
    654654                create_output(MAKEFILE, MACROS, config, rules)
    655655               
    656                 return 0       
     656                return 0
    657657       
    658658        screen = xtui.screen_init()
  • tools/mkext2.py

    rdf6ded8 r1b20da0  
    127127"""
    128128
    129 class Filesystem:       
     129class Filesystem:
    130130        def __init__(self, filename, block_groups, blocks_per_group, inodes_per_group, block_size, inode_size, reserved_inode_count):
    131131                "Initialize the filesystem writer"
     
    215215                gde.free_inode_count -= 1
    216216                if directory:
    217                         gde.directory_inode_count += 1         
     217                        gde.directory_inode_count += 1
    218218       
    219219        def seek_to_block(self, block, offset=0):
     
    234234                offset = (index % self.inodes_per_group) * self.inode_size
    235235                block = base_block + (offset // self.block_size)
    236                 self.seek_to_block(block, offset % self.block_size)     
     236                self.seek_to_block(block, offset % self.block_size)
    237237       
    238238        def subtree_add(self, inode, parent_inode, dirpath, is_root=False):
    239239                "Recursively add files to the filesystem"
    240240               
    241                 dir_writer = DirWriter(inode)   
     241                dir_writer = DirWriter(inode)
    242242                dir_writer.add(inode.as_dirent('.'))
    243243                dir_writer.add(parent_inode.as_dirent('..'))
     
    454454       
    455455                # Navigate through other levels
    456                 while level > 0:               
     456                while level > 0:
    457457                        assert offset_in_block < self.fs.block_ids_per_block
    458458                       
     
    490490                "Write a piece of data (arbitrarily long) as the contents of the inode"
    491491               
    492                 data_pos = 0           
     492                data_pos = 0
    493493                while data_pos < len(data):
    494494                        bytes_remaining_in_block = self.fs.block_size - (self.pos % self.fs.block_size)
  • tools/mktmpfs.py

    rdf6ded8 r1b20da0  
    7070        "Recursive directory walk"
    7171       
    72         for item in listdir_items(root):               
    73                 if item.is_file:                       
     72        for item in listdir_items(root):
     73                if item.is_file:
    7474                        dentry = xstruct.create(DENTRY_FILE % len(item.name))
    7575                        dentry.kind = TMPFS_FILE
  • tools/travis.sh

    rdf6ded8 r1b20da0  
    186186            "$HOME/helenos-harbours/hsct.sh" update || exit 1
    187187
    188             FAILED_HARBOURS=""   
     188            FAILED_HARBOURS=""
    189189            for HARBOUR in $H_HARBOUR_LIST; do
    190190                "$HOME/helenos-harbours/hsct.sh" archive --no-deps "$HARBOUR" >"run-$HARBOUR.log" 2>&1
  • tools/xstruct.py

    rdf6ded8 r1b20da0  
    3939
    4040# Ensure that 's' format for struct receives correct data type depending
    41 # on Python version (needed due to different way to encode into bytes) 
     41# on Python version (needed due to different way to encode into bytes)
    4242ensure_string = \
    4343        (lambda value: value if type(value) is str else bytes(value)) \
     
    6666                                 (varname, str(type(value)), str(vartype)))
    6767        if value < varmin or value > varmax:
    68                 raise ValueError('Variable "%s" value %s out of range %s..%s' % 
     68                raise ValueError('Variable "%s" value %s out of range %s..%s' %
    6969                                 (varname, repr(value), repr(varmin), repr(varmax)))
    7070
     
    8888                                        value = ensure_string(value)
    8989                                check_range(variable, fmt, value)
    90                                 args.append(value)             
     90                                args.append(value)
    9191                return struct.pack(self._format_, *args)
    9292       
Note: See TracChangeset for help on using the changeset viewer.