<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Cyril,</p>
<p>About this statemement that you made:</p>
<blockquote>"Function signatures aren't needed when used just in one
file."
</blockquote>
<p>To whch I replied:</p>
<blockquote>"ARE required unless you reorganize you code to be all
in the order of called functions preceding called functions"<br>
</blockquote>
To which you replied:<br>
<blockquote>"Actually neither of that is true"<br>
</blockquote>
If you don't use prototypes you do have to reorganize the functions
in the order they are called.<br>
<br>
Are you really questioning that? I don't want to have to explain
that unless you don't understand why prototypes are required in some
cases.<br>
<br>
If you are not questioning that. Are you ok with me using
prototypes?<br>
<br>
I don't mind adding static, but do realize that that will indeed
mean that in some compilation systems the sysmbols won't be in the
symbol table and will make debugging harder. I don't care if you
question this statment, don't have time to explain that.<br>
<br>
regards,<br>
Ramon Pantin<br>
<br>
<div class="moz-cite-prefix">On 11/02/18 03:52, Cyril Hrubis wrote:<br>
</div>
<blockquote type="cite" cite="mid:20181102105206.GA22411@rei">
<blockquote type="cite" style="color: #000000;">
<blockquote type="cite" style="color: #000000;">
<blockquote type="cite" style="color: #000000;">
<pre wrap="">+int con_receive_iovec_boundary_checks(con_t *conp, int tn, size_t niov);
+int con_receive_iovec_boundary_checks_peeking(con_t *conp, int tn, size_t niov);
+int con_receive_file_descriptor(con_t *conp, int tn, int cloexec_flag,
+ bool some_data, ssize_t controllen_delta);
+int con_message_too_long_to_fit_might_discard_bytes(con_t *conp, int tn,
+ int type);
+int con_receive_waits_for_message(con_t *conp, int tn);
+int con_receiver_doesnt_wait_for_messages(con_t *conp, int tn);
+int con_receive_returns_what_is_available(con_t *conp, int tn);
+int con_empty_datagram_received_as_empty_datagram(con_t *conp, int tn);
</pre>
</blockquote>
<pre wrap="">Function signatures aren't needed when used just in one file.
Actually, in this case we declare functions as static.
</pre>
</blockquote>
<pre wrap="">The ARE required unless you reorganize you code to be all in the order of called functions preceding called functions, which is silly. Furthermore if there were mutually recursive functions you couldn???t do that either.
Having ???static??? for internal functions only matters if the test program is more than one source file. This is just one file. Its easier to debug when the symbols are visible to the debugger, with some compilers ???static??? functions can not be debugged because the symbols end up not being in the symbol table.
</pre>
</blockquote>
<pre wrap="">Actually neither of that is true.
Having static defined tells the compiler that the function is used only
in the local file, which can for example tell you that some of the
functions are unused.
</pre>
</blockquote>
<br>
</body>
</html>