title: Pointer and array usage confusion
body: <p>There is a code excerpt from official <a href="https://github.com/id-Software/Quake-2/blob/master/qcommon/cmodel.c" rel="nofollow noreferrer">Quake 2 source code</a>:</p>
  <pre><code>unsigned        *buf;
  dheader_t       header;
  ...
  header = *(dheader_t *)buf; // #1
      for (i=0 ; i&lt;sizeof(dheader_t)/4 ; i++)
          ((int *)&amp;header)[i] = LittleLong ( ((int *)&amp;header)[i]); // #2
  </code></pre>
  <p>Can someone please explain me in the most possible details what do the line #1 and then #2 really do because I'm little or more confused...</p>
  <p>P.S</p>
  <p>Here is the rest of the definitions if it helps:</p>
  <pre><code>int     LittleLong (int l) {return _LittleLong(l);}
  ...
  typedef struct
  {
      int         ident;
      int         version;    
      lump_t      lumps[HEADER_LUMPS];
  } dheader_t;
  </code></pre>
  <p>P.S. 2</p>
  <p>I've linked above the original full source file code if needed.</p>