Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 12 of 12) sorted by relevance

/petsc/src/sys/webclient/
H A Dgoogle.c41 char buff[8 * 1024], body[1024]; in PetscGoogleDriveRefresh() local
70 …le.com/o/oauth2/token", NULL, "application/x-www-form-urlencoded", body, ssl, buff, sizeof(buff))); in PetscGoogleDriveRefresh()
74 PetscCall(PetscPullJSONValue(buff, "access_token", access_token, tokensize, &found)); in PetscGoogleDriveRefresh()
124 char head[1024], buff[8 * 1024], *body, *title; in PetscGoogleDriveUpload() local
171 …e/v2/files/", head, "multipart/related; boundary=\"foo_bar_baz\"", body, ssl, buff, sizeof(buff))); in PetscGoogleDriveUpload()
175 PetscCall(PetscStrstr(buff, "\"title\"", &title)); in PetscGoogleDriveUpload()
214 char buff[8 * 1024], *ptr, body[1024]; in PetscGoogleDriveAuthorize() local
230 ptr = fgets(buff, 1024, stdin); in PetscGoogleDriveAuthorize()
232 PetscCall(PetscStrlen(buff, &len)); in PetscGoogleDriveAuthorize()
233 buff[len - 1] = 0; /* remove carriage return at end of line */ in PetscGoogleDriveAuthorize()
[all …]
H A Dclient.c176 …const char header[], const char ctype[], const char body[], SSL *ssl, char buff[], size_t buffsize) in PetscHTTPSRequest() argument
197 PetscCall(PetscArrayzero(buff, buffsize)); in PetscHTTPSRequest()
205 r = SSL_read(ssl, buff + len, (int)buffsize); in PetscHTTPSRequest()
221 PetscCall(PetscStrstr(buff, "Content-Length: ", &clen)); in PetscHTTPSRequest()
227 PetscCall(PetscStrstr(buff, "\r\n\r\n", &clen)); in PetscHTTPSRequest()
238 PetscCall(PetscInfo(NULL, "HTTPS result follows: \n%s\n", buff)); in PetscHTTPSRequest()
264 …const char header[], const char ctype[], const char body[], int sock, char buff[], size_t buffsize) in PetscHTTPRequest() argument
275 PetscCall(PetscBinaryRead(sock, buff, buffsize, NULL, PETSC_CHAR)); in PetscHTTPRequest()
276 buff[buffsize - 1] = 0; in PetscHTTPRequest()
277 PetscCall(PetscInfo(NULL, "HTTP result follows: \n%s\n", buff)); in PetscHTTPRequest()
[all …]
H A Dglobus.c103 char buff[8 * 1024], *ptr, head[1024]; in PetscGlobusAuthorize() local
113 ptr = fgets(buff, 1024, stdin); in PetscGlobusAuthorize()
115 PetscCall(PetscStrlen(buff, &len)); in PetscGlobusAuthorize()
116 buff[len - 1] = ':'; /* remove carriage return at end of line */ in PetscGlobusAuthorize()
119 ptr = fgets(buff + len, 1024 - len, stdin); in PetscGlobusAuthorize()
121 PetscCall(PetscStrlen(buff, &len)); in PetscGlobusAuthorize()
122 buff[len - 1] = '\0'; /* remove carriage return at end of line */ in PetscGlobusAuthorize()
124 …PetscCall(base64_encode((const unsigned char *)buff, (unsigned char *)(head + 21), sizeof(head) - … in PetscGlobusAuthorize()
129 …pe=client_credentials", head, "application/x-www-form-urlencoded", NULL, ssl, buff, sizeof(buff))); in PetscGlobusAuthorize()
133 PetscCall(PetscPullJSONValue(buff, "access_token", access_token, tokensize, &found)); in PetscGlobusAuthorize()
[all …]
H A Dbox.c109 char buff[8 * 1024], body[1024]; in PetscBoxAuthorize() local
125 PetscCall(PetscStrncpy(buff, (const char *)result + 22, sizeof(buff))); in PetscBoxAuthorize()
130 PetscCall(PetscStrlcat(body, buff, sizeof(body))); in PetscBoxAuthorize()
137 ….com/api/oauth2/token", NULL, "application/x-www-form-urlencoded", body, ssl, buff, sizeof(buff))); in PetscBoxAuthorize()
141 PetscCall(PetscPullJSONValue(buff, "access_token", access_token, tokensize, &found)); in PetscBoxAuthorize()
143 PetscCall(PetscPullJSONValue(buff, "refresh_token", refresh_token, tokensize, &found)); in PetscBoxAuthorize()
178 char buff[8 * 1024], body[1024]; in PetscBoxRefresh() local
211 ….com/api/oauth2/token", NULL, "application/x-www-form-urlencoded", body, ssl, buff, sizeof(buff))); in PetscBoxRefresh()
215 PetscCall(PetscPullJSONValue(buff, "access_token", access_token, tokensize, &found)); in PetscBoxRefresh()
217 PetscCall(PetscPullJSONValue(buff, "refresh_token", new_refresh_token, tokensize, &found)); in PetscBoxRefresh()
[all …]
/petsc/src/sys/webclient/tutorials/
H A Dglobusobtaintransfers.c12 char buff[4096]; in main() local
16 PetscCall(PetscGlobusGetTransfers(PETSC_COMM_WORLD, NULL, buff, sizeof(buff))); in main()
17 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Transfers are %s\n", buff)); in main()
/petsc/src/sys/classes/viewer/impls/socket/mex-scripts/
H A Dbread.c17 static void SYByteSwapInt(int *buff, PetscCount n) in SYByteSwapInt() argument
22 ptr1 = (char *)(buff + j); in SYByteSwapInt()
24 buff[j] = tmp; in SYByteSwapInt()
30 static void SYByteSwapShort(short *buff, PetscCount n) in SYByteSwapShort() argument
35 ptr1 = (char *)(buff + j); in SYByteSwapShort()
37 buff[j] = tmp; in SYByteSwapShort()
44 static void SYByteSwapScalar(PetscScalar *buff, PetscCount n) in SYByteSwapScalar() argument
46 double tmp, *buff1 = (double *)buff; in SYByteSwapScalar()
/petsc/src/sys/dll/
H A Ddlimpl.c66 char *buff = NULL; in PetscDLOpen() local
68 …SSAGE_IGNORE_INSERTS, NULL, erc, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buff, 0, NULL); in PetscDLOpen()
69 …AT, "Unable to open dynamic library:\n %s\n Error message from LoadLibrary() %s\n", name, buff)); in PetscDLOpen()
70 LocalFree(buff); in PetscDLOpen()
146 char *buff = NULL; in PetscDLClose() local
148 …SSAGE_IGNORE_INSERTS, NULL, erc, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buff, 0, NULL); in PetscDLClose()
149 …PetscErrorPrintf("Error closing dynamic library:\n Error message from FreeLibrary() %s\n", buff)); in PetscDLClose()
150 LocalFree(buff); in PetscDLClose()
/petsc/src/sys/fileio/
H A Dsysio.c21 static PetscErrorCode PetscByteSwapEnum(PetscEnum *buff, PetscCount n) in PetscByteSwapEnum() argument
29 ptr1 = (char *)(buff + j); in PetscByteSwapEnum()
40 static PetscErrorCode PetscByteSwapBool(PetscBool *buff, PetscCount n) in PetscByteSwapBool() argument
48 ptr1 = (char *)(buff + j); in PetscByteSwapBool()
59 static PetscErrorCode PetscByteSwapInt(PetscInt *buff, PetscCount n) in PetscByteSwapInt() argument
67 ptr1 = (char *)(buff + j); in PetscByteSwapInt()
78 static PetscErrorCode PetscByteSwapInt64(PetscInt64 *buff, PetscCount n) in PetscByteSwapInt64() argument
86 ptr1 = (char *)(buff + j); in PetscByteSwapInt64()
97 static PetscErrorCode PetscByteSwapInt32(PetscInt32 *buff, PetscCount n) in PetscByteSwapInt32() argument
105 ptr1 = (char *)(buff + j); in PetscByteSwapInt32()
[all …]
H A Dmprint.c321 char *buff = str; in PetscVFPrintfDefault() local
333 PetscCall(PetscMalloc1(fullLength, &buff)); in PetscVFPrintfDefault()
335 PetscCall(PetscVSNPrintf(buff, fullLength, format, NULL, Argpcopy)); in PetscVFPrintfDefault()
349 err = fprintf(fd, "%s", buff); in PetscVFPrintfDefault()
355 if (buff != str) PetscCall(PetscFree(buff)); in PetscVFPrintfDefault()
/petsc/src/sys/utils/
H A Dsortso.c556 static inline PetscErrorCode PetscTimSortResizeBuffer_Private(PetscTimSortBuffer *buff, size_t newS… in PetscTimSortResizeBuffer_Private() argument
559 if (PetscLikely(newSize <= buff->size)) PetscFunctionReturn(PETSC_SUCCESS); in PetscTimSortResizeBuffer_Private()
562 size_t newMax = PetscMin(newSize * newSize, buff->maxsize); in PetscTimSortResizeBuffer_Private()
563 PetscCall(PetscFree(buff->ptr)); in PetscTimSortResizeBuffer_Private()
564 PetscCall(PetscMalloc1(newMax, &buff->ptr)); in PetscTimSortResizeBuffer_Private()
565 buff->size = newMax; in PetscTimSortResizeBuffer_Private()
570 …e(char *arr, size_t size, CompFunc cmp, PetscCtx ctx, PetscTimSortBuffer *buff, PetscTimSortStack … in PetscTimSortForceCollapse_Private() argument
582 PetscCall(PetscTimSortResizeBuffer_Private(buff, (m - l + 1) * size)); in PetscTimSortForceCollapse_Private()
583 PetscCall(PetscTimSortMergeLo_Private(arr, buff->ptr, size, cmp, ctx, l, m, r)); in PetscTimSortForceCollapse_Private()
585 PetscCall(PetscTimSortResizeBuffer_Private(buff, (r - m + 1) * size)); in PetscTimSortForceCollapse_Private()
[all …]
/petsc/src/ts/tutorials/
H A Dex48.c373 char buff[256]; in CreateMesh() local
388 …PetscCall(PetscSNPrintf(buff, sizeof(buff), "-dm_plex_box_faces %d,%d -petscpartitioner_type simpl… in CreateMesh()
389 PetscCall(PetscOptionsInsertString(NULL, buff)); in CreateMesh()
/petsc/doc/faq/
H A Dindex.md569 char buff[1024]; /* Make sure to assign a large enough buffer */
572 PetscCall(PetscVSNPrintf(buff, 1024, format, &length, Argp));
574 /* now send buff to whatever stream or whatever you want */