File: compiletest.cc

package info (click to toggle)
startpar 0.64-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 224 kB
  • sloc: ansic: 2,061; makefile: 87; sh: 59; cpp: 16
file content (20 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <cstring>

int testfunc(void)
{
  struct {
    char rID[4];
    char wID[4];
    char fId[4];
  } wav;

  std::strncpy(wav.rID, "RIFF", 4);
  std::strncpy(wav.wID, "WAVE", 4);
  std::strncpy(wav.fId, "fmt ", 4);

  std::memcpy(wav.rID, "RIFF", 4);
  std::memcpy(wav.wID, "WAVE", 4);
  std::memcpy(wav.fId, "fmt ", 4);

  return 0;
}