title: Typedef of a type defined in a separate header file
body: <p>I have two header files:</p>
  
  <p><code>src/util/buffer.h</code>:</p>
  
  <pre><code>//Namespace Src Util Buffer sub
  
  struct sub_buffer{
      size_t size;
      void *buf;
  };
  
  //tons of static inline functions
  </code></pre>
  
  <p><code>src/lib_context.h</code>:</p>
  
  <pre><code>   //Namespace Src Lib Context slc
  
     typedef struct sub_buffer slc_buffer; // Is this typedef ok?
  
     struct slc_context{
        //definition
     };
  
     void slc_set_buffer(slc_buffer *buf_ptr);
  
     //tons of other structs and functions
  </code></pre>
  
  <p>The thing that I was not sure about was the <code>typedef struct sub_buffer slc_buffer;</code>. There was a choice to include the <code>src/util/buffer.h</code>, but that would intoroduce tightly coupling to the header and it would be more difficult to replace it with e.g. another buffer definition containing flexible array member.</p>
  
  <p>Is it common to introduce such a <code>typedef</code> to the structure that is defined in another header file so its implementation will be provided in the <code>c</code> file when including the header (but not to include one header to another header file)?</p>