File: vim3.c

package info (click to toggle)
chibicc 1.0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,832 kB
  • sloc: ansic: 62,911; sh: 275; makefile: 92
file content (18 lines) | stat: -rw-r--r-- 354 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdlib.h>
#include "test.h"

int main() {
  FILE *fp = popen("XXXX", "r");
  if (fp == NULL) {
    perror("popen");
    return 1;
  }
  char buf[128];
  while (fgets(buf, sizeof(buf), fp)) {
    printf("Output: %s", buf);
  }
  int status = pclose(fp);
  printf("Status: %d\n", status);
  ASSERT(32512, status);
  return 0;
}