Commit 31b8fc0e authored by Matthew Burket's avatar Matthew Burket

Save output to a file

parent 1819c13c
Pipeline #341 passed with stage
in 14 seconds
......@@ -12,7 +12,6 @@
</component>
<component name="ChangeListManager">
<list default="true" id="36048fb3-fc75-499f-9004-4a458a9d082e" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/connect.c" beforeDir="false" afterPath="$PROJECT_DIR$/connect.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/main.c" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/cmake-build-debug/" />
......@@ -29,7 +28,7 @@
<file leaf-file-name="buffer.c" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/buffer.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1116">
<state relative-caret-position="539">
<caret line="62" column="9" selection-start-line="62" selection-start-column="9" selection-end-line="62" selection-end-column="9" />
<folding>
<element signature="e#40#59#0" expanded="true" />
......@@ -38,7 +37,7 @@
</provider>
</entry>
</file>
<file leaf-file-name="urlParse.c" pinned="false" current-in-tab="true">
<file leaf-file-name="urlParse.c" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/urlParse.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
......@@ -56,11 +55,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="main.c" pinned="false" current-in-tab="false">
<file leaf-file-name="main.c" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/main.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="56" column="48" selection-start-line="56" selection-start-column="48" selection-end-line="56" selection-end-column="48" />
<state relative-caret-position="509">
<caret line="75" column="24" selection-start-line="75" selection-start-column="24" selection-end-line="75" selection-end-column="24" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
......@@ -118,8 +117,8 @@
<option value="$PROJECT_DIR$/,gitignore" />
<option value="$PROJECT_DIR$/urlParse.h" />
<option value="$PROJECT_DIR$/connect.c" />
<option value="$PROJECT_DIR$/main.c" />
<option value="$PROJECT_DIR$/urlParse.c" />
<option value="$PROJECT_DIR$/main.c" />
</list>
</option>
</component>
......@@ -212,7 +211,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="24915000" />
<option name="totallyTimeSpent" value="26090000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="27" width="2560" height="1573" extended-state="6" />
......@@ -613,16 +612,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/buffer.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1116">
<caret line="62" column="9" selection-start-line="62" selection-start-column="9" selection-end-line="62" selection-end-column="9" />
<folding>
<element signature="e#40#59#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/connect.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
......@@ -654,20 +643,30 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.c">
<entry file="file://$PROJECT_DIR$/urlParse.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="29" selection-start-line="29" selection-end-line="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/buffer.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="56" column="48" selection-start-line="56" selection-start-column="48" selection-end-line="56" selection-end-column="48" />
<state relative-caret-position="539">
<caret line="62" column="9" selection-start-line="62" selection-start-column="9" selection-end-line="62" selection-end-column="9" />
<folding>
<element signature="e#0#19#0" expanded="true" />
<element signature="e#40#59#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/urlParse.c">
<entry file="file://$PROJECT_DIR$/main.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="29" selection-start-line="29" selection-end-line="29" />
<state relative-caret-position="509">
<caret line="75" column="24" selection-start-line="75" selection-start-column="24" selection-end-line="75" selection-end-column="24" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......
......@@ -71,7 +71,13 @@ int main (int argc, char **argv) {
GrowthBuffer gp;
initBuffer(&gp, 50);
get_result(sockfd, &gp, RECV_SIZE);
printf("%s", gp.array);
// Save to file
FILE *fp;
fp = fopen("response", "w");
fwrite(gp.array, 1, strlen(gp.array), fp);
fclose(fp);
}
/// Show help
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment