/system/core/run-as/ |
D | package.c | 227 skip_spaces(const char* p, const char* end) in skip_spaces() argument 229 while (p < end && is_space(*p)) in skip_spaces() 230 p++; in skip_spaces() 232 return p; in skip_spaces() 239 skip_non_spaces(const char* p, const char* end) in skip_non_spaces() argument 241 while (p < end && !is_space(*p)) in skip_non_spaces() 242 p++; in skip_non_spaces() 244 return p; in skip_non_spaces() 251 find_first(const char* p, const char* end, char ch) in find_first() argument 253 while (p < end && *p != ch) in find_first() [all …]
|
/system/core/sh/ |
D | expand.c | 137 char *p; in expandarg() local 148 p = grabstackstr(expdest); in expandarg() 154 ifsbreakup(p, &exparg); in expandarg() 160 rmescapes(p); in expandarg() 162 sp->text = p; in expandarg() 183 argstr(char *p, int flag) in argstr() argument 194 if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE))) in argstr() 195 p = exptilde(p, flag); in argstr() 197 switch (c = *p++) { in argstr() 203 if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=') in argstr() [all …]
|
D | memalloc.h | 67 #define STARTSTACKSTR(p) p = stackblock(), sstrnleft = stackblocksize() argument 68 #define STPUTC(c, p) (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), *p++ = (c))) argument 69 #define CHECKSTRSPACE(n, p) { if (sstrnleft < n) p = makestrspace(); } argument 70 #define USTPUTC(c, p) (--sstrnleft, *p++ = (c)) argument 71 #define STACKSTRNUL(p) (sstrnleft == 0? (p = growstackstr(), *p = '\0') : (*p = '\0')) argument 72 #define STUNPUTC(p) (++sstrnleft, --p) argument 73 #define STTOPC(p) p[-1] argument 74 #define STADJUST(amount, p) (p += (amount), sstrnleft -= (amount)) argument 75 #define grabstackstr(p) stalloc(stackblocksize() - sstrnleft) argument 77 #define ckfree(p) free((pointer)(p)) argument
|
D | cd.c | 83 char *p, *d; in cdcmd() local 104 p = strstr(curdir, dest); in cdcmd() 105 if (!p) in cdcmd() 108 memcpy(d, curdir, p - curdir); in cdcmd() 109 strcpy(d + (p - curdir), argptr[1]); in cdcmd() 110 strcat(d, p + strlen(dest)); in cdcmd() 124 while ((p = padvance(&path, dest)) != NULL) { in cdcmd() 125 if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) { in cdcmd() 130 if (p[0] == '.' && p[1] == '/' && p[2] != '\0') in cdcmd() 131 p += 2; in cdcmd() [all …]
|
D | options.c | 125 shellparam.p = argptr; in procargs() 155 char *p; in options() local 161 while ((p = *argptr) != NULL) { in options() 163 if ((c = *p++) == '-') { in options() 165 if (p[0] == '\0' || (p[0] == '-' && p[1] == '\0')) { in options() 168 if (p[0] == '\0') in options() 182 while ((c = *p++) != '\0') { in options() 287 shellparam.p = newparam; in setparam() 302 for (ap = param->p ; *ap ; ap++) in freeparam() 304 ckfree(param->p); in freeparam() [all …]
|
D | memalloc.c | 61 pointer p; in ckmalloc() local 63 p = malloc(nbytes); in ckmalloc() 64 if (p == NULL) in ckmalloc() 66 return p; in ckmalloc() 75 ckrealloc(pointer p, int nbytes) in ckrealloc() argument 77 p = realloc(p, nbytes); in ckrealloc() 78 if (p == NULL) in ckrealloc() 80 return p; in ckrealloc() 91 char *p; in savestr() local 93 p = ckmalloc(strlen(s) + 1); in savestr() [all …]
|
D | show.c | 168 char *p; in sharg() local 177 for (p = arg->narg.text ; *p ; p++) { in sharg() 178 switch (*p) { in sharg() 180 putc(*++p, fp); in sharg() 185 subtype = *++p; in sharg() 189 while (*p != '=') in sharg() 190 putc(*p++, fp); in sharg() 242 putc(*p, fp); in sharg() 320 char *p; in trstring() local 326 for (p = s ; *p ; p++) { in trstring() [all …]
|
D | var.c | 222 const char *p; in setvar() local 231 p = name; in setvar() 232 if (! is_name(*p)) in setvar() 234 p++; in setvar() 236 if (! is_in_name(*p)) { in setvar() 237 if (*p == '\0' || *p == '=') in setvar() 241 p++; in setvar() 243 namelen = p - name; in setvar() 464 print_quoted(const char *p) in print_quoted() argument 468 if (strcspn(p, "|&;<>()$`\\\"' \t\n*?[]#~=%") == strlen(p)) { in print_quoted() [all …]
|
D | miscbltin.c | 96 char *p; in readcmd() local 125 STARTSTACKSTR(p); in readcmd() 139 STPUTC(c, p); in readcmd() 153 STPUTC(c, p); in readcmd() 160 STPUTC(c, p); in readcmd() 171 STPUTC(c, p); in readcmd() 181 STPUTC(c, p); in readcmd() 185 STACKSTRNUL(p); in readcmd() 188 STARTSTACKSTR(p); in readcmd() 190 STACKSTRNUL(p); in readcmd() [all …]
|
/system/wlan/ti/wilink_6_1/platforms/os/common/src/ |
D | osRgstry.c | 1033 TInitTable *p = (TInitTable *)pInitTable; in regFillInitTable() local 1038 if (!p) in regFillInitTable() 1042 NdisZeroMemory(p, sizeof(TInitTable)); in regFillInitTable() 1049 …initValusFromRgstryString( (TI_INT8*)(staArpIpAddress), (TI_INT8*)&p->twdInitParams.tArpIpFilter.a… in regFillInitTable() 1054 sizeof p->twdInitParams.tArpIpFilter.isFilterEnabled, in regFillInitTable() 1055 (TI_UINT8*)&p->twdInitParams.tArpIpFilter.isFilterEnabled ); in regFillInitTable() 1063 sizeof p->siteMgrInitParams.beaconFilterParams.desiredState, in regFillInitTable() 1064 (TI_UINT8*)&p->siteMgrInitParams.beaconFilterParams.desiredState ); in regFillInitTable() 1068 sizeof p->siteMgrInitParams.beaconFilterParams.numOfStored, in regFillInitTable() 1069 (TI_UINT8*)&p->siteMgrInitParams.beaconFilterParams.numOfStored ); in regFillInitTable() [all …]
|
/system/core/libzipfile/ |
D | centraldir.c | 67 const unsigned char* p; in read_central_directory_entry() local 88 p = *buf; in read_central_directory_entry() 95 if (read_le_int(&p[0x00]) != ENTRY_SIGNATURE) { in read_central_directory_entry() 100 versionMadeBy = read_le_short(&p[0x04]); in read_central_directory_entry() 101 versionToExtract = read_le_short(&p[0x06]); in read_central_directory_entry() 102 gpBitFlag = read_le_short(&p[0x08]); in read_central_directory_entry() 103 entry->compressionMethod = read_le_short(&p[0x0a]); in read_central_directory_entry() 104 lastModFileTime = read_le_short(&p[0x0c]); in read_central_directory_entry() 105 lastModFileDate = read_le_short(&p[0x0e]); in read_central_directory_entry() 106 crc32 = read_le_int(&p[0x10]); in read_central_directory_entry() [all …]
|
/system/wlan/ti/sta_dk_4_0_4_32/pform/common/src/ |
D | osRgstry.c | 1056 initTable_t* p = (initTable_t*) pInitTable; in regFillInitTable() local 1076 NdisZeroMemory(p, sizeof(initTable_t)); in regFillInitTable() 1086 sizeof p->TnetwDrv_InitParams.arpIpFilterParams.isFilterEnabled, in regFillInitTable() 1087 (PUCHAR)&p->TnetwDrv_InitParams.arpIpFilterParams.isFilterEnabled ); in regFillInitTable() 1090 …regConvertStringtoIpAddress(staArpIpAddress, (PUCHAR)&(p->TnetwDrv_InitParams.arpIpFilterParams.ar… in regFillInitTable() 1096 sizeof p->siteMgrInitParams.beaconFilterParams.desiredState, in regFillInitTable() 1097 (PUCHAR)&p->siteMgrInitParams.beaconFilterParams.desiredState ); in regFillInitTable() 1101 sizeof p->siteMgrInitParams.beaconFilterParams.numOfStored, in regFillInitTable() 1102 (PUCHAR)&p->siteMgrInitParams.beaconFilterParams.numOfStored ); in regFillInitTable() 1109 sizeof p->siteMgrInitParams.beaconFilterParams.IETableSize, in regFillInitTable() [all …]
|
/system/core/adb/ |
D | transport_usb.c | 33 static inline void fix_endians(apacket *p) in fix_endians() argument 35 p->msg.command = H4(p->msg.command); in fix_endians() 36 p->msg.arg0 = H4(p->msg.arg0); in fix_endians() 37 p->msg.arg1 = H4(p->msg.arg1); in fix_endians() 38 p->msg.data_length = H4(p->msg.data_length); in fix_endians() 39 p->msg.data_check = H4(p->msg.data_check); in fix_endians() 40 p->msg.magic = H4(p->msg.magic); in fix_endians() 47 #define fix_endians(p) do {} while (0) argument 54 static int remote_read(apacket *p, atransport *t) in remote_read() argument 56 if(usb_read(t->usb, &p->msg, sizeof(amessage))){ in remote_read() [all …]
|
D | transport_local.c | 30 static inline void fix_endians(apacket *p) in fix_endians() argument 32 p->msg.command = H4(p->msg.command); in fix_endians() 33 p->msg.arg0 = H4(p->msg.arg0); in fix_endians() 34 p->msg.arg1 = H4(p->msg.arg1); in fix_endians() 35 p->msg.data_length = H4(p->msg.data_length); in fix_endians() 36 p->msg.data_check = H4(p->msg.data_check); in fix_endians() 37 p->msg.magic = H4(p->msg.magic); in fix_endians() 40 #define fix_endians(p) do {} while (0) argument 55 static int remote_read(apacket *p, atransport *t) in remote_read() argument 57 if(readx(t->sfd, &p->msg, sizeof(amessage))){ in remote_read() [all …]
|
D | sockets.c | 127 static int local_socket_enqueue(asocket *s, apacket *p) in local_socket_enqueue() argument 129 D("LS(%d): enqueue %d\n", s->id, p->len); in local_socket_enqueue() 131 p->ptr = p->data; in local_socket_enqueue() 144 while(p->len > 0) { in local_socket_enqueue() 145 int r = adb_write(s->fd, p->ptr, p->len); in local_socket_enqueue() 147 p->len -= r; in local_socket_enqueue() 148 p->ptr += r; in local_socket_enqueue() 160 if(p->len == 0) { in local_socket_enqueue() 161 put_apacket(p); in local_socket_enqueue() 166 p->next = 0; in local_socket_enqueue() [all …]
|
D | transport.c | 93 char *p = (char*)ppacket; /* really read a packet address */ in read_packet() local 97 r = adb_read(fd, p, len); in read_packet() 100 p += r; in read_packet() 136 char *p = (char*) ppacket; /* we really write the packet address */ in write_packet() local 163 r = adb_write(fd, p, len); in write_packet() 166 p += r; in write_packet() 179 apacket *p = 0; in transport_socket_events() local 180 if(read_packet(fd, &p)){ in transport_socket_events() 183 handle_packet(p, (atransport *) _t); in transport_socket_events() 188 void send_packet(apacket *p, atransport *t) in send_packet() argument [all …]
|
/system/extras/showslab/ |
D | showslab.c | 62 struct slab_info *head = NULL, *p = NULL, *prev = NULL; in get_slabinfo() local 97 p = malloc(sizeof (struct slab_info)); in get_slabinfo() 98 if (!p) { in get_slabinfo() 104 head = prev = p; in get_slabinfo() 108 slabdata %lu %lu %*d", p->name, in get_slabinfo() 109 &p->nr_active_objs, &p->nr_objs, in get_slabinfo() 110 &p->obj_size, &p->objs_per_slab, in get_slabinfo() 113 &p->nr_slabs); in get_slabinfo() 121 if (p->obj_size < stats->min_obj_size) in get_slabinfo() 122 stats->min_obj_size = p->obj_size; in get_slabinfo() [all …]
|
/system/core/nexus/ |
D | SupplicantAssociatingEvent.cpp | 28 char *p = event; in SupplicantAssociatingEvent() local 40 strncpy(mBssid, p, 17); in SupplicantAssociatingEvent() 42 p += 25; in SupplicantAssociatingEvent() 47 char *q = index(p, '\''); in SupplicantAssociatingEvent() 49 LOGE("Unable to decode SSID (p = {%s})\n", p); in SupplicantAssociatingEvent() 52 mSsid = (char *) malloc((q - p) +1); in SupplicantAssociatingEvent() 53 strncpy(mSsid, p, q-p); in SupplicantAssociatingEvent() 54 mSsid[q-p] = '\0'; in SupplicantAssociatingEvent() 56 p = q + 7; in SupplicantAssociatingEvent() 61 if (!(q = index(p, ' '))) { in SupplicantAssociatingEvent() [all …]
|
D | ScanResult.cpp | 29 char *p = rawResult, *q = rawResult; in ScanResult() local 33 for (q = p; *q != '\t'; ++q); in ScanResult() 34 strncpy(tmp, p, (q - p)); in ScanResult() 35 tmp[q-p] = '\0'; in ScanResult() 40 for (p = q; *q != '\t'; ++q); in ScanResult() 41 strncpy(tmp, p, (q - p)); in ScanResult() 42 tmp[q-p] = '\0'; in ScanResult() 47 for (p = q; *q != '\t'; ++q); in ScanResult() 48 strncpy(tmp, p, (q - p)); in ScanResult() 49 tmp[q-p] = '\0'; in ScanResult() [all …]
|
D | SupplicantConnectedEvent.cpp | 26 char *p; in SupplicantConnectedEvent() local 30 if ((p = index(event + 2, ' ')) && (++p = index(p, ' '))) { in SupplicantConnectedEvent() 32 strncpy(mBssid, ++p, 17); in SupplicantConnectedEvent() 39 if ((p = index(p, ' ')) && ((++p = index(p, ' ')))) { in SupplicantConnectedEvent() 40 if (!strncmp(++p, "(auth)", 6)) in SupplicantConnectedEvent()
|
D | PropertyManager.cpp | 66 int PropertyManager::attachProperty(const char *ns_name, Property *p) { in attachProperty() argument 69 LOGD("Attaching property %s to namespace %s", p->getName(), ns_name); in attachProperty() 77 if (lookupProperty_UNLOCKED(ns, p->getName())) { in attachProperty() 81 ns_name, p->getName(), strerror(errno)); in attachProperty() 85 ns->getProperties()->push_back(p); in attachProperty() 90 int PropertyManager::detachProperty(const char *ns_name, Property *p) { in detachProperty() argument 93 LOGD("Detaching property %s from namespace %s", p->getName(), ns_name); in detachProperty() 105 if (!strcasecmp(p->getName(), (*it)->getName())) { in detachProperty() 113 LOGE("Property %s.%s not found", ns_name, p->getName()); in detachProperty() 119 int PropertyManager::doSet(Property *p, int idx, const char *value) { in doSet() argument [all …]
|
/system/media/opensles/tests/sandbox/ |
D | monkey.c | 54 State_t actionPause(Player_pt p) in actionPause() argument 56 assert(NULL != p->mPlay); in actionPause() 57 SLresult result = (*p->mPlay)->SetPlayState(p->mPlay, SL_PLAYSTATE_PAUSED); in actionPause() 62 State_t actionPlay(Player_pt p) in actionPlay() argument 64 assert(NULL != p->mPlay); in actionPlay() 65 SLresult result = (*p->mPlay)->SetPlayState(p->mPlay, SL_PLAYSTATE_PLAYING); in actionPlay() 70 State_t actionStop(Player_pt p) in actionStop() argument 72 assert(NULL != p->mPlay); in actionStop() 73 SLresult result = (*p->mPlay)->SetPlayState(p->mPlay, SL_PLAYSTATE_STOPPED); in actionStop() 78 State_t actionRewind(Player_pt p) in actionRewind() argument [all …]
|
D | multiplay.c | 149 Player *p; in main() local 155 p = &players[i]; in main() 161 result = (*engineEngine)->CreateAudioPlayer(engineEngine, &p->mPlayerObject, &audioSrc, in main() 164 result = (*p->mPlayerObject)->Realize(p->mPlayerObject, SL_BOOLEAN_FALSE); in main() 166 result = (*p->mPlayerObject)->GetInterface(p->mPlayerObject, SL_IID_PLAY, &p->mPlayerPlay); in main() 168 result = (*p->mPlayerObject)->GetInterface(p->mPlayerObject, SL_IID_VOLUME, in main() 169 &p->mPlayerVolume); in main() 171 result = (*p->mPlayerObject)->GetInterface(p->mPlayerObject, SL_IID_SEEK, &p->mPlayerSeek); in main() 173 result = (*p->mPlayerPlay)->GetDuration(p->mPlayerPlay, &p->mPlayerDuration); in main() 175 printf("player %d duration %d\n", (int) i, (int) p->mPlayerDuration); in main() [all …]
|
/system/core/sh/bltin/ |
D | echo.c | 62 char *p; in echocmd() local 72 if ((p = *ap) != NULL) { in echocmd() 73 if (equal(p, "-n")) { in echocmd() 76 } else if (equal(p, "-e")) { in echocmd() 82 while ((p = *ap++) != NULL) { in echocmd() 83 while ((c = *p++) != '\0') { in echocmd() 85 switch (*p++) { in echocmd() 99 while (--count >= 0 && (unsigned)(*p - '0') < 8) in echocmd() 100 c = (c << 3) + (*p++ - '0'); in echocmd() 104 p--; in echocmd()
|
/system/core/libsysutils/src/ |
D | FrameworkListener.cpp | 63 char *p = data; in dispatchCommand() local 71 while(*p) { in dispatchCommand() 72 if (*p == '\\') { in dispatchCommand() 78 p++; in dispatchCommand() 81 if (*p == '"') in dispatchCommand() 83 else if (*p == '\\') in dispatchCommand() 89 p++; in dispatchCommand() 94 if (*p == '"') { in dispatchCommand() 99 p++; in dispatchCommand() 103 *q = *p++; in dispatchCommand()
|