<commit_before>/* Jaguar C library */
/* Copyright (C) 2006 Seb/<NAME> */
/* http://removers.atari.org/ */

/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public */
/* License as published by the Free Software Foundation; either */
/* version 2.1 of the License, or (at your option) any later version. */

/* This library is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA */

/** \file stdio.h
 * \brief Standard Input/Output functions.
 *
 * This part is experimental and still work in progress.  It will be
 * completed when the JagCF is released.
 */
#ifndef __STDIO_H
#define __STDIO_H

#include <stddef.h>
#include <stdarg.h>

#define EOF (-1)

#define SEEK_SET        0       /* Seek from beginning of file.  */
#define SEEK_CUR        1       /* Seek from current position.  */
#define SEEK_END        2       /* Seek from end of file.  */

typedef struct FILE {
  void *data;
  /* input */
  size_t (*read)(struct FILE *self, void *ptr, size_t size, size_t nmemb);
  int (*getc)(struct FILE *self);
  char *(*gets)(struct FILE *self, char *s, int size);
  /* output */
  size_t (*write)(struct FILE *self,const void *ptr, size_t size, size_t nmemb);
  int (*putc)(struct FILE *self, int c);
  int (*puts)(struct FILE *self,const char *s);
  /* general purpose */
  int (*seek)(struct FILE *self, long offset, int whence);
  long (*tell)(struct FILE *self);
  int (*flush)(struct FILE *self);
  int (*close)(struct FILE *self);
  int (*eof)(struct FILE *self);
} FILE;

/** Is end of file? */
int feof(FILE *stream);

/** Put a character in the given file */
int fputc(int c, FILE *stream);

/** Write a string in the given file */
int fputs(const char *s, FILE *stream);

/** Printf a string in the given file */
int fprintf(FILE *stream, const char *fmt, ...);
int sprintf(char *str, const char *fmt, ...);
int vfprintf(FILE *stream, const char *fmt, va_list ap);
int vsprintf(char *str, const char *fmt, va_list ap);<commit_msg>rename struct FILE => struct _FILE<commit_after>/* Jaguar C library */
/* Copyright (C) 2006 <NAME> */
/* http://removers.atari.org/ */

/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public */
/* License as published by the Free Software Foundation; either */
/* version 2.1 of the License, or (at your option) any later version. */

/* This library is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA */

/** \file stdio.h
 * \brief Standard Input/Output functions.
 *
 * This part is experimental and still work in progress.  It will be
 * completed when the JagCF is released.
 */
#ifndef __STDIO_H
#define __STDIO_H

#include <stddef.h>
#include <stdarg.h>

#define EOF (-1)

#define SEEK_SET        0       /* Seek from beginning of file.  */
#define SEEK_CUR        1       /* Seek from current position.  */
#define SEEK_END        2       /* Seek from end of file.  */

typedef struct _FILE {
  void *data;
  /* input */
  size_t (*read)(struct _FILE *self, void *ptr, size_t size, size_t nmemb);
  int (*getc)(struct _FILE *self);
  char *(*gets)(struct _FILE *self, char *s, int size);
  /* output */
  size_t (*write)(struct _FILE *self,const void *ptr, size_t size, size_t nmemb);
  int (*putc)(struct _FILE *self, int c);
  int (*puts)(struct _FILE *self,const char *s);
  /* general purpose */
  int (*seek)(struct _FILE *self, long offset, int whence);
  long (*tell)(struct _FILE *self);
  int (*flush)(struct _FILE *self);
  int (*close)(struct _FILE *self);
  int (*eof)(struct _FILE *self);
} FILE;

/** Is end of file? */
int feof(FILE *stream);

/** Put a character in the given file */
int fputc(int c, FILE *stream);

/** Write a string in the given file */
int fputs(const char *s, FILE *stream);

/** Printf a string in the given file */
int fprintf(FILE *stream, const char *fmt, ...);
int sprintf(char *str, const char *fmt, ...);
int vfprintf(FILE *stream, const char *fmt, va_list ap);
int vsprintf(char *str, const char *fmt, va_list ap);
{'fraction_non_alphanumeric': 0.13052331500712686, 'fraction_numerical': 0.00855222968845449, 'mean_word_length': 3.3739982190560998, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1596579', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1496, 'n_words': 659}