concept call in category c

appears as: call, calls, The call, calls, A call
Modern C

This is an excerpt from Manning's book Modern C.

We can easily identify within our program the parts of the text that this program outputs (printsC, in C jargon): the part of line 17 between quotes. The real action happens between that line and line 20. C calls this a statementC, which is a bit of a misnomer. Other languages would use the term instruction, which describes the purpose better. This particular statement is a callC to a functionC named printf:

  • Before and after calls to the comparison functions used for searching and sorting
  • Figure 17.1. Control flow of function calls: return jumps to the next instruction after the call.

    But here, because of the pointers, this principle is weakened. The data to which buffer and dp point is modified. For buffer, this is probably unavoidable: it will contain the data that we are reading. But dp could (and should) be replaced by a simple unsigned argument.[[Exs 1]] Our implementation only has dp as a pointer because we want to be able to track the depth of the nesting in case an error occurs. So if we abstract out the calls to longjmp that we did not yet explain, using such a pointer is bad. The state of the program is more difficult to follow, and we miss optimization opportunities.[[Exs 2]]

    Signal handlers are established by a call to signal, as we saw in our function signal_handler. Here, it is just used to reset the signal disposition to the default. signal is one of the two function interfaces that are provided by signal.h:

    sh_handler* signal(int, sh_handler*);
    int raise(int);
    
    
    !@%STYLE%@!
    {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":12},{\"line\":0,\"ch\":18}],[{\"line\":0,\"ch\":19},{\"line\":0,\"ch\":22}],[{\"line\":1,\"ch\":0},{\"line\":1,\"ch\":3}],[{\"line\":0,\"ch\":19},{\"line\":0,\"ch\":22}],[{\"line\":1,\"ch\":0},{\"line\":1,\"ch\":3}],[{\"line\":1,\"ch\":4},{\"line\":1,\"ch\":9}],[{\"line\":0,\"ch\":19},{\"line\":0,\"ch\":22}],[{\"line\":1,\"ch\":0},{\"line\":1,\"ch\":3}]]"}
    !@%STYLE%@!

    The return value of signal is the handler that was previously active for the signal, or the special value SIG_ERR if an error occurred. Inside a signal handler, signal should only be used to change the disposition of the same signal number that was received by the call. The following function has the same interface as signal but provides a bit more information about the success of the call:

    The function longjmp comes with a companion macro setjmp that is used to establish a jump target to which a call of longjmp may refer. The header setjmp.h provides the following prototypes: