/external/chromium_org/tools/json_to_struct/ |
element_generator_test.py | 12 lines = []; 13 GenerateFieldContent('', {'type': 'int', 'default': 5}, None, lines) 14 self.assertEquals([' 5,'], lines) 15 lines = []; 16 GenerateFieldContent('', {'type': 'int', 'default': 5}, 12, lines) 17 self.assertEquals([' 12,'], lines) 18 lines = []; 19 GenerateFieldContent('', {'type': 'int'}, -3, lines) 20 self.assertEquals([' -3,'], lines) 23 lines = [] [all...] |
element_generator.py | 25 def _GenerateString(content, lines): 30 lines.append(' NULL,') 33 lines.append(' %s,' % json.dumps(content)) 35 def _GenerateString16(content, lines): 40 lines.append(' NULL,') 43 lines.append(' L%s,' % _JSONToCString16(json.dumps(content))) 45 def _GenerateArray(element_name, field_info, content, lines): 51 lines.append(' NULL,') 52 lines.append(' 0,') # Size of the array. 59 lines.append(' %s,' % var [all...] |
struct_generator.py | 38 lines = []; 39 lines.append('struct %s {' % type_name) 41 lines.append(' ' + GenerateField(field_info) + ';') 42 lines.append('};'); 43 return '\n'.join(lines) + '\n';
|
/external/openssh/regress/ |
yes-head.sh | 7 lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)` 10 lines = 0; 12 if [ $lines -ne 2000 ]; then 13 fail "yes|head returns $lines lines instead of 2000"
|
/external/chromium/net/ftp/ |
ftp_directory_listing_parser_vms_unittest.cc | 54 std::vector<string16> lines(GetSingleLineTestCase(good_cases[i].input)); 57 lines.insert(lines.begin(), 61 lines.insert(lines.end(), 65 EXPECT_TRUE(ParseFtpDirectoryListingVms(lines, 108 std::vector<string16> lines(GetSingleLineTestCase(bad_cases[i])); 111 lines.insert(lines.begin(), 115 lines.insert(lines.end() [all...] |
/external/elfutils/libdw/ |
dwarf_onesrcline.c | 1 /* Return one of the sources lines of a CU. 59 dwarf_onesrcline (Dwarf_Lines *lines, size_t idx) 61 if (lines == NULL) 64 if (idx >= lines->nlines) 70 return &lines->info[idx];
|
dwarf_getsrc_die.c | 62 Dwarf_Lines *lines; local 65 if (INTUSE(dwarf_getsrclines) (cudie, &lines, &nlines) != 0) 68 /* The lines are sorted by address, so we can use binary search. */ 73 if (addr < lines->info[idx].addr) 75 else if (addr > lines->info[idx].addr || lines->info[idx].end_sequence) 78 return &lines->info[idx]; 82 assert (lines->info[nlines - 1].end_sequence); 89 if (u > 0 && u < nlines && addr > lines->info[u - 1].addr) 91 while (lines->info[u - 1].end_sequence && u > 0 [all...] |
/external/elfutils/libdwfl/ |
lines.c | 57 if (cu->lines == NULL) 59 Dwarf_Lines *lines; local 61 if (INTUSE(dwarf_getsrclines) (&cu->die, &lines, &nlines) != 0) 64 cu->lines = malloc (offsetof (struct Dwfl_Lines, idx[nlines])); 65 if (cu->lines == NULL) 67 cu->lines->cu = cu; 69 cu->lines->idx[i].idx = i;
|
dwfl_module_getsrc.c | 69 /* The lines are sorted by address, so we can use binary search. */ 70 size_t l = 0, u = cu->die.cu->lines->nlines; 74 if (addr < cu->die.cu->lines->info[idx].addr) 76 else if (addr > cu->die.cu->lines->info[idx].addr) 79 return &cu->lines->idx[idx]; 82 if (cu->die.cu->lines->nlines > 0) 83 assert (cu->die.cu->lines->info 84 [cu->die.cu->lines->nlines - 1].end_sequence); 89 if (u > 0 && u < cu->die.cu->lines->nlines 90 && addr > cu->die.cu->lines->info[u - 1].addr [all...] |
dwfl_onesrcline.c | 1 /* Return one of the sources lines of a CU. 60 if (cu->lines == NULL) 70 if (idx >= cu->die.cu->lines->nlines) 76 return &cu->lines->idx[idx];
|
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/ |
common.py | 43 def check(self, lines): 44 """Check for and strip trailing carriage returns from lines.""" 45 for line_number in range(len(lines)): 46 if not lines[line_number].endswith("\r"): 55 lines[line_number] = lines[line_number].rstrip("\r") 57 return lines 68 def check(self, lines): 70 for line_number, line in enumerate(lines):
|
text.py | 36 """Processes text lines for checking style.""" 43 def check(self, lines): 44 self._tab_checker.check(lines) 48 def process_file_data(filename, lines, error): 50 checker.check(lines)
|
/external/chromium_org/net/ftp/ |
ftp_directory_listing_parser_vms_unittest.cc | 57 std::vector<base::string16> lines( 61 lines.insert(lines.begin(), 65 lines.insert(lines.end(), 69 EXPECT_TRUE(ParseFtpDirectoryListingVms(lines, 112 std::vector<base::string16> lines(GetSingleLineTestCase(bad_cases[i])); 115 lines.insert(lines.begin(), 119 lines.insert(lines.end() [all...] |
ftp_directory_listing_parser_unittest.cc | 58 std::vector<std::string> lines; local 59 base::SplitStringUsingSubstr(expected_listing, "\r\n", &lines); 62 if (lines.size() == 1 && lines[0].empty()) 63 lines.clear(); 65 ASSERT_EQ(9 * entries.size(), lines.size()); 67 for (size_t i = 0; i < lines.size() / 9; i++) { 68 std::string type(lines[9 * i]); 69 std::string name(lines[9 * i + 1]); 71 base::StringToInt64(lines[9 * i + 2], &size) [all...] |
/packages/apps/Calendar/src/com/android/calendar/ |
ColorChipView.java | 116 float[] lines = new float[16]; local 118 lines [ptr++] = 0; 119 lines [ptr++] = top; 120 lines [ptr++] = right; 121 lines [ptr++] = top; 122 lines [ptr++] = 0; 123 lines [ptr++] = bottom - halfBorderWidth; 124 lines [ptr++] = right; 125 lines [ptr++] = bottom - halfBorderWidth; 126 lines [ptr++] = left [all...] |
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/common/net/ |
file_uploader.py | 56 lines = [] 59 lines.append('--' + BOUNDARY) 60 lines.append('Content-Disposition: form-data; name="%s"' % key) 61 lines.append('') 64 lines.append(value) 67 lines.append('--' + BOUNDARY) 68 lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename)) 69 lines.append('Content-Type: %s' % get_mime_type(filename)) 70 lines.append('') 73 lines.append(value [all...] |
/bionic/libc/tools/ |
generate-NOTICE.py | 36 def ExtractCopyrightAt(lines, i): 37 hash = lines[i].startswith("#") 43 if "/*" in lines[start - 1]: 47 # Read comment lines until we hit something that terminates a 49 while i < len(lines): 50 if "*/" in lines[i]: 52 if hash and len(lines[i]) == 0: 54 if "\t@(#)" in lines[i] or "\tfrom: @(#)" in lines[i] or "From: @(#)" in lines[i] or "from OpenBSD:" in lines[i] 125 lines = content.split("\\n") variable [all...] |
/external/chromium_org/v8/tools/ |
js2c.py | 39 def ToCAsciiArray(lines): 41 for chr in lines: 48 def ToCArray(lines): 50 for chr in lines: 55 def RemoveCommentsAndTrailingWhitespace(lines): 56 lines = re.sub(r'//.*\n', '\n', lines) # end-of-line comments 57 lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) # comments. 58 lines = re.sub(r'\s+\n+', '\n', lines) # trailing whitespac [all...] |
/external/v8/tools/ |
js2c.py | 39 def ToCAsciiArray(lines): 41 for chr in lines: 48 def ToCArray(lines): 50 for chr in lines: 55 def RemoveCommentsAndTrailingWhitespace(lines): 56 lines = re.sub(r'//.*\n', '\n', lines) # end-of-line comments 57 lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) # comments. 58 lines = re.sub(r'\s+\n+', '\n', lines) # trailing whitespac [all...] |
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/ |
commitmessage.py | 33 def _first_non_empty_line_after_index(lines, index=0): 35 for line in lines[index:]: 48 lines = self.message_lines[_first_non_empty_line_after_index(self.message_lines, 1):] 50 lines = [line.lstrip() for line in lines] 51 return "\n".join(lines) + "\n"
|
/external/llvm/utils/lint/ |
generic_lint.py | 12 def RunOnFile(self, filename, lines): 13 common_lint.VerifyLineLength(filename, lines, 15 common_lint.VerifyTrailingWhitespace(filename, lines)
|
common_lint.py | 7 def VerifyLineLength(filename, lines, max_length): 8 """Checks to make sure the file has no lines with lines exceeding the length 13 lines: contents of the file as string array 22 for line in lines: 30 def VerifyTabs(filename, lines): 35 lines: contents of the file as string array 44 for line in lines: 51 def VerifyTrailingWhitespace(filename, lines): 52 """Checks to make sure the file has no lines with trailing whitespace [all...] |
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/ |
diff_parser_unittest.py | 46 self.assertEqual(7, len(diff.lines)) 47 # The first two unchaged lines. 48 self.assertEqual((47, 47), diff.lines[0][0:2]) 49 self.assertEqual('', diff.lines[0][2]) 50 self.assertEqual((48, 48), diff.lines[1][0:2]) 51 self.assertEqual(' unsigned align : 3; // EBoxAlignment', diff.lines[1][2]) 53 self.assertEqual((50, 0), diff.lines[3][0:2]) 54 self.assertEqual(' unsigned orient: 1; // EBoxOrient', diff.lines[3][2]) 60 self.assertEqual(7 + 7 + 9, len(diff.lines)) 62 self.assertEqual((60, 61), diff.lines[9][0:2] [all...] |
/build/tools/ |
post_process_props.py | 43 def __init__(self, lines): 44 self.lines = [s[:-1] for s in lines] 48 for line in self.lines: 55 for i in range(0,len(self.lines)): 56 if self.lines[i].startswith(key): 57 self.lines[i] = key + value 59 self.lines.append(key + value) 62 f.write("\n".join(self.lines)) 68 lines = f.readlines( [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ |
MimeWriter.py | 105 lines = value.split("\n") 106 while lines and not lines[-1]: del lines[-1] 107 while lines and not lines[0]: del lines[0] 108 for i in range(1, len(lines)): 109 lines[i] = " " + lines[i].strip( [all...] |