Lines Matching refs:buffer

751 int uv_cwd(char* buffer, size_t* size) {  in uv_cwd()  argument
754 if (buffer == NULL || size == NULL) in uv_cwd()
758 if (getcwd(buffer, *size) != NULL) in uv_cwd()
770 buffer = scratch; in uv_cwd()
774 *size = strlen(buffer); in uv_cwd()
776 if (*size > 1 && buffer[*size - 1] == '/') { in uv_cwd()
778 buffer[*size] = '\0'; in uv_cwd()
781 if (buffer == scratch) { in uv_cwd()
1126 int uv_os_homedir(char* buffer, size_t* size) { in uv_os_homedir() argument
1134 r = uv_os_getenv("HOME", buffer, size); in uv_os_homedir()
1154 memcpy(buffer, pwd.homedir, len + 1); in uv_os_homedir()
1162 int uv_os_tmpdir(char* buffer, size_t* size) { in uv_os_tmpdir() argument
1166 if (buffer == NULL || size == NULL || *size == 0) in uv_os_tmpdir()
1205 memcpy(buffer, buf, len + 1); in uv_os_tmpdir()
1206 buffer[len] = '\0'; in uv_os_tmpdir()
1441 int uv_os_getenv(const char* name, char* buffer, size_t* size) { in uv_os_getenv() argument
1445 if (name == NULL || buffer == NULL || size == NULL || *size == 0) in uv_os_getenv()
1460 memcpy(buffer, var, len + 1); in uv_os_getenv()
1489 int uv_os_gethostname(char* buffer, size_t* size) { in uv_os_gethostname() argument
1499 if (buffer == NULL || size == NULL || *size == 0) in uv_os_gethostname()
1513 memcpy(buffer, buf, len + 1); in uv_os_gethostname()
1701 int uv_os_uname(uv_utsname_t* buffer) { in uv_os_uname() argument
1705 if (buffer == NULL) in uv_os_uname()
1713 r = uv__strscpy(buffer->sysname, buf.sysname, sizeof(buffer->sysname)); in uv_os_uname()
1718 r = snprintf(buffer->release, in uv_os_uname()
1719 sizeof(buffer->release), in uv_os_uname()
1723 if (r >= sizeof(buffer->release)) { in uv_os_uname()
1728 r = uv__strscpy(buffer->release, buf.release, sizeof(buffer->release)); in uv_os_uname()
1733 r = uv__strscpy(buffer->version, buf.version, sizeof(buffer->version)); in uv_os_uname()
1738 r = uv__strscpy(buffer->machine, "ppc64", sizeof(buffer->machine)); in uv_os_uname()
1740 r = uv__strscpy(buffer->machine, buf.machine, sizeof(buffer->machine)); in uv_os_uname()
1749 buffer->sysname[0] = '\0'; in uv_os_uname()
1750 buffer->release[0] = '\0'; in uv_os_uname()
1751 buffer->version[0] = '\0'; in uv_os_uname()
1752 buffer->machine[0] = '\0'; in uv_os_uname()