Merge pull request #71 from tezc/doc-fix

documentation fix
This commit is contained in:
Ozan Tezcan 2021-04-14 02:11:36 +03:00 committed by GitHub
commit 8c8a3ede9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 9 deletions

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
sc_str_substring(&s1, 0, 5);
printf("%s \n", s1); // prints hello
sc_str_destroy(s1);
sc_str_destroy(&s1);
return 0;
}

View File

@ -21,7 +21,7 @@ int main()
sc_str_substring(&s1, 0, 5);
printf("%s \n", s1); // prints hello
sc_str_destroy(s1);
sc_str_destroy(&s1);
return 0;
}

View File

@ -82,7 +82,7 @@ if (SC_BUILD_TEST)
${CMAKE_CTEST_COMMAND} -C $<CONFIG> --verbose
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
# ----------------------- - Code Coverage Start ----------------------------- #
# ----------------------- - Code Coverage Start ----------------------------- #
if (${CMAKE_BUILD_TYPE} MATCHES "Coverage")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
@ -105,7 +105,7 @@ if (SC_BUILD_TEST)
add_dependencies(coverage_${PROJECT_NAME} check_${PROJECT_NAME})
# -------------------------- Code Coverage End ------------------------------ #
# -------------------------- Code Coverage End ------------------------------ #
endif ()
# ----------------------- Test Configuration End ---------------------------- #

View File

@ -29,7 +29,7 @@ int main(int argc, char *argv[])
printf("%s \n", uri->query); // prints "name=jane"
printf("%s \n", uri->fragment); // prints "doe"
sc_uri_destroy(uri);
sc_uri_destroy(&uri);
return 0;
}

View File

@ -7,9 +7,7 @@ int main()
struct sc_uri *uri;
uri = sc_uri_create("http://user:pass@any.com:8042/over/"
"there?name=jane#doe");
printf("%s \n",
uri->str); // prints
// "http://user:pass@any.com:8042/over/there?name=jane#doe"
printf("%s \n", uri->str); // prints "http://user:pass@any.com:8042/over/there?name=jane#doe"
printf("%s \n", uri->scheme); // prints "http"
printf("%s \n", uri->host); // prints "any.com"
printf("%s \n", uri->userinfo); // prints "user:pass"
@ -18,7 +16,7 @@ int main()
printf("%s \n", uri->query); // prints "name=jane"
printf("%s \n", uri->fragment); // prints "doe"
sc_uri_destroy(uri);
sc_uri_destroy(&uri);
return 0;
}