File: toytest.c

package info (click to toggle)
secnet 0.6.8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: ansic: 15,234; python: 1,057; perl: 966; sh: 596; tcl: 484; java: 231; asm: 114; yacc: 89; php: 64; makefile: 48; awk: 40
file content (25 lines) | stat: -rw-r--r-- 425 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
21
22
23
24
25
/*
 * subdirmk - example code
 *  Copyright 2019 Mark Wooding
 * SPDX-License-Identifier: LGPL-2.0-or-later
 * There is NO WARRANTY.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "toylib.h"

int main(void)
{
  const char *p;

  p = greeting();
  if (STRNCMP(p, !=, "Hello", 5)) {
    fprintf(stderr, "greeting `%s' has bad salutation\n", p);
    exit(1);
  }
  printf("all ok\n");
  return (0);
}