Home
last modified time | relevance | path

Searched refs:cursor (Results 1 – 25 of 706) sorted by relevance

12345678910>>...29

/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/
DAbstractCursorTest.java24 private TestCursor cursor; field in AbstractCursorTest
28 cursor = new TestCursor(); in setUp()
33 cursor.theTable.add("Foobar"); in testMoveToFirst()
34 assertThat(cursor.moveToFirst(), equalTo(true)); in testMoveToFirst()
35 assertThat(cursor.getCount(), equalTo(1)); in testMoveToFirst()
40 assertThat(cursor.moveToFirst(), equalTo(false)); in testMoveToFirstEmptyList()
41 assertThat(cursor.getCount(), equalTo(0)); in testMoveToFirstEmptyList()
46 cursor.theTable.add("Foobar"); in testMoveToLast()
47 cursor.theTable.add("Bletch"); in testMoveToLast()
49 assertThat(cursor.moveToLast(), equalTo(true)); in testMoveToLast()
[all …]
DSQLiteCursorTest.java27 private SQLiteCursor cursor; field in SQLiteCursorTest
49 String[] columnNames = cursor.getColumnNames(); in testGetColumnNames()
57 String[] columnNames = cursor.getColumnNames(); in testGetColumnNamesEmpty()
66 assertThat(cursor.getColumnIndex("id"), equalTo(0)); in testGetColumnIndex()
67 assertThat(cursor.getColumnIndex("name"), equalTo(1)); in testGetColumnIndex()
72 assertThat(cursor.getColumnIndex("Fred"), equalTo(-1)); in testGetColumnIndexNotFound()
79 assertThat(cursor.getColumnIndex("id"), equalTo(0)); in testGetColumnIndexEmpty()
80 assertThat(cursor.getColumnIndex("name"), equalTo(1)); in testGetColumnIndexEmpty()
85 assertThat(cursor.getColumnIndexOrThrow("id"), equalTo(0)); in testGetColumnIndexOrThrow()
86 assertThat(cursor.getColumnIndexOrThrow("name"), equalTo(1)); in testGetColumnIndexOrThrow()
[all …]
DMatrixCursorTest.java32 MatrixCursor cursor = new MatrixCursor(new String[]{"a", "b", "c"}); in shouldAddRows() local
33 cursor.addRow(new Object[]{"foo", 10L, 0.1f}); in shouldAddRows()
34 cursor.addRow(new Object[]{"baz", 20L, null}); in shouldAddRows()
35 assertThat(cursor.getCount(), equalTo(2)); in shouldAddRows()
37 assertTrue(cursor.moveToFirst()); in shouldAddRows()
39 assertThat(cursor.getString(0), equalTo("foo")); in shouldAddRows()
40 assertThat(cursor.getLong(1), equalTo(10L)); in shouldAddRows()
41 assertThat(cursor.getFloat(2), equalTo(0.1f)); in shouldAddRows()
43 assertTrue(cursor.moveToNext()); in shouldAddRows()
45 assertThat(cursor.getString(0), equalTo("baz")); in shouldAddRows()
[all …]
DDatabaseTestBase.java93 …Cursor cursor = database.query("table_name", new String[]{"second_column", "first_column"}, null, … in testInsertAndQuery() local
95 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertAndQuery()
97 byte[] byteValueFromDatabase = cursor.getBlob(0); in testInsertAndQuery()
98 String stringValueFromDatabase = cursor.getString(1); in testInsertAndQuery()
116 … Cursor cursor = database.rawQuery("select second_column, first_column from table_name", null); in testInsertAndRawQuery() local
118 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertAndRawQuery()
120 byte[] byteValueFromDatabase = cursor.getBlob(0); in testInsertAndRawQuery()
121 String stringValueFromDatabase = cursor.getString(1); in testInsertAndRawQuery()
142 … Cursor cursor = database.rawQuery("select second_column, first_column from table_name", null); in testInsertOrThrow() local
143 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertOrThrow()
[all …]
/external/syslinux/gpxe/src/crypto/
Dasn1.c49 static int asn1_start ( struct asn1_cursor *cursor, in asn1_start() argument
56 if ( cursor->len < 2 /* Tag byte and first length byte */ ) { in asn1_start()
57 if ( cursor->len ) in asn1_start()
58 DBGC ( cursor, "ASN1 %p too short\n", cursor ); in asn1_start()
64 if ( *( ( uint8_t * ) cursor->data ) != type ) { in asn1_start()
65 DBGC ( cursor, "ASN1 %p type mismatch (expected %d, got %d)\n", in asn1_start()
66 cursor, type, *( ( uint8_t * ) cursor->data ) ); in asn1_start()
70 cursor->data++; in asn1_start()
71 cursor->len--; in asn1_start()
74 len_len = *( ( uint8_t * ) cursor->data ); in asn1_start()
[all …]
/external/libdrm/tests/modetest/
Dcursor.c48 struct cursor { struct
61 static struct cursor cursors[MAX_CURSORS]; argument
73 void (*run)(struct cursor *cursor, const struct cursor_step *step);
81 static void set_cursor(struct cursor *cursor, const struct cursor_step *step) in set_cursor() argument
87 handle = cursor->bo_handle; in set_cursor()
89 cursor->enabled = enabled; in set_cursor()
91 drmModeSetCursor(cursor->fd, cursor->crtc_id, handle, cursor->w, cursor->h); in set_cursor()
94 static void move_cursor(struct cursor *cursor, const struct cursor_step *step) in move_cursor() argument
96 int x = cursor->x; in move_cursor()
97 int y = cursor->y; in move_cursor()
[all …]
/external/google-breakpad/src/common/
Dbyte_cursor_unittest.cc61 ByteCursor cursor(&buffer); in TEST() local
62 EXPECT_EQ(0U, cursor.Available()); in TEST()
68 ByteCursor cursor(&buffer); in TEST() local
69 EXPECT_TRUE(cursor.AtEnd()); in TEST()
75 ByteCursor cursor(&buffer); in TEST() local
76 EXPECT_TRUE(cursor); in TEST()
82 ByteCursor cursor(&buffer); in TEST() local
83 EXPECT_EQ(10U, cursor.Available()); in TEST()
89 ByteCursor cursor(&buffer); in TEST() local
90 EXPECT_FALSE(cursor.AtEnd()); in TEST()
[all …]
/external/libunwind_llvm/src/
Dlibunwind.cpp46 _LIBUNWIND_EXPORT int unw_init_local(unw_cursor_t *cursor, in unw_init_local() argument
49 static_cast<void *>(cursor), in unw_init_local()
53 new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_x86>( in unw_init_local()
56 new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_x86_64>( in unw_init_local()
59 new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_ppc>( in unw_init_local()
62 new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_arm64>( in unw_init_local()
65 new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_arm>( in unw_init_local()
70 AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; in unw_init_local()
78 _LIBUNWIND_EXPORT int unw_init_remote_thread(unw_cursor_t *cursor, in unw_init_remote_thread() argument
83 return unw_init_local(cursor, NULL); //FIXME in unw_init_remote_thread()
[all …]
/external/bison/lib/
Dhash.c183 struct hash_entry const *cursor = bucket; in hash_get_max_bucket_length() local
186 while (cursor = cursor->next, cursor) in hash_get_max_bucket_length()
211 struct hash_entry const *cursor = bucket; in hash_table_ok() local
218 while (cursor = cursor->next, cursor) in hash_table_ok()
264 struct hash_entry const *cursor; in hash_lookup() local
269 for (cursor = bucket; cursor; cursor = cursor->next) in hash_lookup()
270 if (entry == cursor->data || table->comparator (entry, cursor->data)) in hash_lookup()
271 return cursor->data; in hash_lookup()
310 struct hash_entry const *cursor; in hash_get_next() local
313 cursor = bucket; in hash_get_next()
[all …]
/external/syslinux/com32/elflink/ldlinux/
Dcli.c60 static const char * cmd_reverse_search(int *cursor, clock_t *kbd_to, in cmd_reverse_search() argument
109 *cursor = p - last_good->command; in cmd_reverse_search()
129 int key, len, prev_len, cursor; in edit_cmdline() local
145 len = cursor = 0; in edit_cmdline()
193 dy = y - (cursor + strlen(input) + 1) / width; in edit_cmdline()
194 x = (cursor + strlen(input) + 1) % width; in edit_cmdline()
227 if (cursor) { in edit_cmdline()
228 memmove(cmdline + cursor - 1, cmdline + cursor, in edit_cmdline()
229 len - cursor + 1); in edit_cmdline()
231 cursor--; in edit_cmdline()
[all …]
/external/clang/test/Index/
Dget-cursor-macro-args.m2 // RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \
3 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \
4 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:9 \
5 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:22 \
6 // RUN: -cursor-at=%S/get-cursor-macro-args.h:15:12 \
7 // RUN: -cursor-at=%S/get-cursor-macro-args.h:15:20 \
8 // RUN: %s -include %S/get-cursor-macro-args.h | FileCheck %s
11 // RUN: c-index-test -write-pch %t.pch -x objective-c-header %S/get-cursor-macro-args.h
12 // RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \
13 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \
[all …]
Dget-cursor.m133 // RUN: c-index-test -cursor-at=%s:4:28 -cursor-at=%s:5:28 %s | FileCheck -check-prefix=CHECK-PROP …
137 // RUN: c-index-test -cursor-at=%s:11:11 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-pr…
140 // RUN: c-index-test -cursor-at=%s:20:10 %s | FileCheck -check-prefix=CHECK-METHOD %s
143 // RUN: c-index-test -cursor-at=%s:37:17 %s | FileCheck -check-prefix=CHECK-IN-IMPL %s
146 // RUN: c-index-test -cursor-at=%s:38:6 -cursor-at=%s:40:11 \
147 // RUN: -cursor-at=%s:50:20 -cursor-at=%s:51:15 -cursor-at=%s:52:20 %s | FileCheck -check-prefix=…
154 // RUN: c-index-test -cursor-at=%s:56:24 -cursor-at=%s:60:14 \
155 // RUN: -cursor-at=%s:65:20 -cursor-at=%s:67:25 \
156 // RUN: -cursor-at=%s:70:10 -cursor-at=%s:70:16 -cursor-at=%s:70:25 \
167 // RUN: c-index-test -cursor-at=%s:83:15 -cursor-at=%s:83:21 \
[all …]
/external/libunwind/src/ia64/
Dmk_Gcursor_i.c42 OFFSET("IP_OFF", offsetof (struct cursor, ip)); in main()
43 OFFSET("PR_OFF", offsetof (struct cursor, pr)); in main()
44 OFFSET("BSP_OFF", offsetof (struct cursor, bsp)); in main()
45 OFFSET("PSP_OFF", offsetof (struct cursor, psp)); in main()
46 OFFSET("PFS_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_PFS])); in main()
47 OFFSET("RNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_RNAT])); in main()
48 OFFSET("UNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_UNAT])); in main()
49 OFFSET("LC_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_LC])); in main()
50 OFFSET("FPSR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_FPSR])); in main()
51 OFFSET("B1_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B1])); in main()
[all …]
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/tester/android/database/
DSimpleTestCursorTest.java21 private SimpleTestCursor cursor; field in SimpleTestCursorTest
29 cursor = new SimpleTestCursor(); in setup()
30 shadowContentResolver.setCursor(uri, cursor); in setup()
34 cursor.setColumnNames(columnNames); in setup()
40 assertThat(cursor.uri, equalTo(uri)); in doingQueryShouldMakeQueryParamsAvailable()
41 assertThat(cursor.projection[0], equalTo("projection")); in doingQueryShouldMakeQueryParamsAvailable()
42 assertThat(cursor.selection, equalTo("selection")); in doingQueryShouldMakeQueryParamsAvailable()
43 assertThat(cursor.selectionArgs[0], equalTo("selection")); in doingQueryShouldMakeQueryParamsAvailable()
44 assertThat(cursor.sortOrder, equalTo("sortOrder")); in doingQueryShouldMakeQueryParamsAvailable()
49 cursor.setResults(new Object[][]{new Object[]{"aString", 1234L}}); in canGetStringsAndLongs()
[all …]
/external/libvncserver/libvncserver/
Dcursor.c257 rfbCursorPtr cursor = (rfbCursorPtr)calloc(1,sizeof(rfbCursor)); in rfbMakeXCursor() local
261 cursor->cleanup=TRUE; in rfbMakeXCursor()
262 cursor->width=width; in rfbMakeXCursor()
263 cursor->height=height; in rfbMakeXCursor()
265 cursor->foreRed=cursor->foreGreen=cursor->foreBlue=0xffff; in rfbMakeXCursor()
267 cursor->source = (unsigned char*)calloc(w,height); in rfbMakeXCursor()
268 cursor->cleanupSource = TRUE; in rfbMakeXCursor()
271 if(*cp!=' ') cursor->source[j*w+i/8]|=bit; in rfbMakeXCursor()
274 cursor->mask = (unsigned char*)calloc(w,height); in rfbMakeXCursor()
277 if(*cp!=' ') cursor->mask[j*w+i/8]|=bit; in rfbMakeXCursor()
[all …]
/external/libedit/src/
Demacs.c58 if (el->el_line.cursor == el->el_line.lastchar) { in em_delete_or_list()
60 if (el->el_line.cursor == el->el_line.buffer) { in em_delete_or_list()
77 if (el->el_line.cursor > el->el_line.lastchar) in em_delete_or_list()
78 el->el_line.cursor = el->el_line.lastchar; in em_delete_or_list()
95 if (el->el_line.cursor == el->el_line.lastchar) in em_delete_next_word()
98 cp = c__next_word(el->el_line.cursor, el->el_line.lastchar, in em_delete_next_word()
101 for (p = el->el_line.cursor, kp = el->el_chared.c_kill.buf; p < cp; p++) in em_delete_next_word()
106 c_delafter(el, (int)(cp - el->el_line.cursor)); /* delete after dot */ in em_delete_next_word()
107 if (el->el_line.cursor > el->el_line.lastchar) in em_delete_next_word()
108 el->el_line.cursor = el->el_line.lastchar; in em_delete_next_word()
[all …]
/external/apache-http/src/org/apache/http/message/
DBasicHeaderValueParser.java112 ParserCursor cursor = new ParserCursor(0, value.length()); in parseElements() local
113 return parser.parseElements(buffer, cursor); in parseElements()
119 final ParserCursor cursor) { in parseElements() argument
124 if (cursor == null) { in parseElements()
129 while (!cursor.atEnd()) { in parseElements()
130 HeaderElement element = parseHeaderElement(buffer, cursor); in parseElements()
163 ParserCursor cursor = new ParserCursor(0, value.length()); in parseHeaderElement() local
164 return parser.parseHeaderElement(buffer, cursor); in parseHeaderElement()
170 final ParserCursor cursor) { in parseHeaderElement() argument
175 if (cursor == null) { in parseHeaderElement()
[all …]
DBasicLineParser.java127 ParserCursor cursor = new ParserCursor(0, value.length()); in parseProtocolVersion() local
128 return parser.parseProtocolVersion(buffer, cursor); in parseProtocolVersion()
134 final ParserCursor cursor) in parseProtocolVersion() argument
140 if (cursor == null) { in parseProtocolVersion()
147 int indexFrom = cursor.getPos(); in parseProtocolVersion()
148 int indexTo = cursor.getUpperBound(); in parseProtocolVersion()
150 skipWhitespace(buffer, cursor); in parseProtocolVersion()
152 int i = cursor.getPos(); in parseProtocolVersion()
206 cursor.updatePos(blank); in parseProtocolVersion()
230 final ParserCursor cursor) { in hasProtocolVersion() argument
[all …]
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DContactsFacade.java109 Cursor cursor = mService.getContentResolver().query(phoneData, null, null, null, null); in contactsDisplayPhonePickList() local
110 if (cursor != null) { in contactsDisplayPhonePickList()
111 if (cursor.moveToFirst()) { in contactsDisplayPhonePickList()
113 cursor.getString(cursor.getColumnIndexOrThrow(ContactsContract.PhoneLookup.NUMBER)); in contactsDisplayPhonePickList()
115 cursor.close(); in contactsDisplayPhonePickList()
124 Cursor cursor = mContentResolver.query(CONTACTS_URI, null, null, null, null); in contactsGetAttributes() local
125 if (cursor != null) { in contactsGetAttributes()
126 String[] columns = cursor.getColumnNames(); in contactsGetAttributes()
130 cursor.close(); in contactsGetAttributes()
139 Cursor cursor = mContentResolver.query(CONTACTS_URI, columns, null, null, null); in contactsGetContactIds() local
[all …]
/external/ims/rcs/presencepolling/src/com/android/service/ims/presence/
DEABProvider.java290 Cursor cursor = db.rawQuery(rawquery, null); in queryInternal() local
291 if (cursor != null && cursor.moveToFirst()) { in queryInternal()
294 String contactId = cursor.getString(cursor in queryInternal()
297 } while (cursor.moveToNext()); in queryInternal()
299 if (cursor != null) cursor.close(); in queryInternal()
428 Cursor cursor = getContext().getContentResolver().query(EABContract.EABColumns.CONTENT_URI, in verifyIfMdnExists() local
430 if ((null != cursor) && (cursor.getCount() > 0)) { in verifyIfMdnExists()
431 logger.debug("Cursor count is " + cursor.getCount()); in verifyIfMdnExists()
433 while (cursor.moveToNext()) { in verifyIfMdnExists()
435 String eabFormattedNumber = cursor.getString( in verifyIfMdnExists()
[all …]
/external/syslinux/gpxe/src/hci/
Deditstring.c54 assert ( string->cursor <= old_len ); in insert_delete()
55 max_delete_len = ( old_len - string->cursor ); in insert_delete()
65 string->mod_start = string->cursor; in insert_delete()
69 memmove ( ( string->buf + string->cursor + insert_len ), in insert_delete()
70 ( string->buf + string->cursor + delete_len ), in insert_delete()
74 memcpy ( ( string->buf + string->cursor ), insert_text, insert_len ); in insert_delete()
75 string->cursor += insert_len; in insert_delete()
105 if ( string->cursor > 0 ) { in backspace()
106 string->cursor--; in backspace()
142 string->last_cursor = string->cursor; in edit_string()
[all …]
Dreadline.c47 unsigned int cursor = string->last_cursor; in sync_console() local
55 if ( mod_end < string->cursor ) in sync_console()
56 mod_end = string->cursor; in sync_console()
59 while ( cursor > mod_start ) { in sync_console()
61 cursor--; in sync_console()
65 while ( cursor < mod_end ) { in sync_console()
66 putchar ( ( cursor >= len ) ? ' ' : string->buf[cursor] ); in sync_console()
67 cursor++; in sync_console()
71 while ( cursor > string->cursor ) { in sync_console()
73 cursor--; in sync_console()
/external/clang/tools/libclang/
DCIndexHigh.cpp147 static enum CXChildVisitResult findFileIdRefVisit(CXCursor cursor, in findFileIdRefVisit() argument
150 CXCursor declCursor = clang_getCursorReferenced(cursor); in findFileIdRefVisit()
160 cursor = cxcursor::getSelectorIdentifierCursor(data->SelectorIdIdx, cursor); in findFileIdRefVisit()
164 if ((cursor.kind == CXCursor_ObjCClassMethodDecl || in findFileIdRefVisit()
165 cursor.kind == CXCursor_ObjCInstanceMethodDecl) && in findFileIdRefVisit()
166 cxcursor::getSelectorIdentifierIndex(cursor) == -1) in findFileIdRefVisit()
169 if (clang_isExpression(cursor.kind)) { in findFileIdRefVisit()
170 if (cursor.kind == CXCursor_DeclRefExpr || in findFileIdRefVisit()
171 cursor.kind == CXCursor_MemberRefExpr) { in findFileIdRefVisit()
174 } else if (cursor.kind == CXCursor_ObjCMessageExpr && in findFileIdRefVisit()
[all …]
/external/libchrome/base/
Dsha1_portable.cc63 uint32_t cursor; member in base::SecureHashAlgorithm
107 cursor = 0; in Init()
127 M[cursor++] = *d++; in Update()
128 if (cursor >= 64) in Update()
135 M[cursor++] = 0x80; in Pad()
137 if (cursor > 64-8) { in Pad()
139 while (cursor < 64) in Pad()
140 M[cursor++] = 0; in Pad()
145 while (cursor < 64-8) in Pad()
146 M[cursor++] = 0; in Pad()
[all …]
/external/jline/src/src/main/java/jline/
DCursorBuffer.java16 public int cursor = 0; field in CursorBuffer
27 if (cursor <= 0) { in current()
31 return buffer.charAt(cursor - 1); in current()
40 cursor = 0; in clearBuffer()
53 buffer.insert(cursor++, c); in write()
54 if (isOvertyping() && cursor < buffer.length()) { in write()
55 buffer.deleteCharAt(cursor); in write()
70 buffer.insert(cursor, str); in write()
73 cursor += str.length(); in write()
75 if (isOvertyping() && cursor < buffer.length()) { in write()
[all …]

12345678910>>...29