repo stringlengths 1 152 ⌀ | file stringlengths 14 221 | code stringlengths 501 25k | file_length int64 501 25k | avg_line_length float64 20 99.5 | max_line_length int64 21 134 | extension_type stringclasses 2
values |
|---|---|---|---|---|---|---|
cctools | cctools-master/dttools/src/full_io.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#define _XOPEN_SOURCE 500
#define _LARGEFILE64_SOURCE 1
#include <fcntl.h>
#include <unistd.h... | 2,172 | 20.514851 | 76 | c |
cctools | cctools-master/dttools/src/rmsummary.h | /*
Copyright (C) 2022 The University of Notre Dame This software is
distributed under the GNU General Public License. See the file
COPYING for details.
*/
#ifndef __RMSUMMARY_H
#define __RMSUMMARY_H
#include <stdio.h>
#include <stdlib.h>
#include "jx.h"
#include "int_sizes.h"
#include "buffer.h"
/* Environment var... | 4,107 | 29.887218 | 109 | h |
cctools | cctools-master/dttools/src/jx_test.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
/*
This is a test program for the jx library.
It first reads in one JX expression which is used as the evaluation context.
Then, each successive expression is parse... | 1,550 | 20.84507 | 79 | c |
cctools | cctools-master/dttools/src/string_set.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef STRING_SET_H
#define STRING_SET_H
#include "int_sizes.h"
#include "hash_table.h"
/** @file string_set.h A string_set data structure.
Strings that are equa... | 4,903 | 29.842767 | 131 | h |
cctools | cctools-master/dttools/src/jx_match.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
/** @file jx_match.h Unwrap JX types
*
* The functions in this header are intended to make JX types more usable
* from C code. All unwrap JX values in some manne... | 7,015 | 32.730769 | 79 | h |
cctools | cctools-master/dttools/src/domain_name.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "domain_name.h"
#include "link.h"
#include "stringtools.h"
#include "debug.h"
#includ... | 1,902 | 20.873563 | 104 | c |
cctools | cctools-master/dttools/src/path.h | /*
* Copyright (C) 2022 The University of Notre Dame
* This software is distributed under the GNU General Public License.
* See the file COPYING for details.
*/
#ifndef PATH_H
#define PATH_H
#include "buffer.h"
void path_absolute (const char *src, char *dest, int exist);
const char *path_basename (const char * p... | 2,926 | 33.435294 | 93 | h |
cctools | cctools-master/dttools/src/get_line.h | /*
Copyright (C) 2022 The University of Notre Dame
Originally written by Kevin Partington (27 January 2009)
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef __LINEREADER_H__
#define __LINEREADER_H__
#include <stdio.h>
#define LARGE_LINE_MAX 1048576
/** ... | 602 | 26.409091 | 121 | h |
cctools | cctools-master/dttools/src/sort_dir.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef SORT_DIR_H
#define SORT_DIR_H
/** @file sort_dir.h Obtain a sorted directory listing.... | 1,242 | 28.595238 | 113 | h |
cctools | cctools-master/dttools/src/fd.h | /*
* Copyright (C) 2022 The University of Notre Dame
* This software is distributed under the GNU General Public License.
* See the file COPYING for details.
*/
#ifndef FD_H
#define FD_H
/** Get the maximum number of open file descriptors to a process.
*
* @return n Maximum number of file descriptors.
*/
int f... | 689 | 22.793103 | 69 | h |
cctools | cctools-master/dttools/src/fast_popen.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef FAST_POPEN_H
#define FAST_POPEN_H
#include <stdio.h>
/** @file fast_popen.h Fast process invocation.*/
/** Fast process invocation.
@ref fast_popen opens... | 996 | 29.212121 | 78 | h |
cctools | cctools-master/dttools/src/clean_dir.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef CLEAN_DIR_H
#define CLEAN_DIR_H
/** @file clean_dir.h */
/** Recursively remove all ... | 554 | 25.428571 | 82 | h |
cctools | cctools-master/dttools/src/watchdog.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "stringtools.h"
#include "cctools.h"
#include "debug.h"
#include "random.h"
#include... | 7,987 | 22.22093 | 119 | c |
cctools | cctools-master/dttools/src/set.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef SET_H
#define SET_H
#include "int_sizes.h"
#include "list.h"
/** @file set.h A set data structure.
Arbitrary objects that are equal (the same location in ... | 4,488 | 25.720238 | 124 | h |
cctools | cctools-master/dttools/src/catalog_query.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <string.h>
#include <errno.h>
#include <sys/wait.h>
#include "catalog_query.h"
#incl... | 11,403 | 24.398664 | 115 | c |
cctools | cctools-master/dttools/src/tlq_config.c | #include "tlq_config.h"
#include "debug.h"
#include "link.h"
#include "xxmalloc.h"
#include <errno.h>
#include <time.h>
#include <string.h>
char *tlq_config_url( int port, const char *log_path, time_t stoptime ) {
char buffer[256];
struct link *server;
strcpy(buffer, log_path);
server = link_connect("127.0.0.1", p... | 930 | 31.103448 | 108 | c |
cctools | cctools-master/dttools/src/ppoll_compat.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <assert.h>
#include <signal.h>
#include <poll.h>
#include <time.h>
#include <errno.h>
#include "ppoll_compat.h"
static void noop(int sig) {}
int ppoll_c... | 1,001 | 20.319149 | 66 | c |
cctools | cctools-master/dttools/src/file_link_recursive.h | #ifndef FILE_LINK_RECURSIVE_H
#define FILE_LINK_RECURSIVE_H
/** @file file_link_recursive.h Make deep links to directories. */
/** Make a hard link from source to target.
If source is a directory, do it recursively.
@param source The source path to link to.
@param target The target path to create.
@param allow_symlin... | 508 | 28.941176 | 85 | h |
cctools | cctools-master/dttools/src/sha1.c | /*
This file is derived from work in the public domain.
Edited lightly for compatibility by Douglas Thain.
Original authorship notices follow:
*/
/* sha1.c:Implementation of the Secure Hash Algorithm */
/* SHA: NIST's Secure Hash Algorithm */
/* This version written November 2000 by David Ireland of
DI Management Se... | 14,687 | 31.567627 | 83 | c |
cctools | cctools-master/dttools/src/hash_cache.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef HASH_CACHE_H
#define HASH_CACHE_H
#include "hash_table.h"
/*
A hash_cache is like a ... | 1,119 | 31 | 95 | h |
cctools | cctools-master/dttools/src/string_array.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "xxmalloc.h"
#include <assert.h>
#include <stddef.h>
#include <string.h>
/* Format:
<NULL terminated array of char *>
<size_t size of entire memory... | 1,537 | 28.576923 | 124 | c |
cctools | cctools-master/dttools/src/s3_file_io.h |
/*
*
* Author: Vlad Korolev, <vlad[@]v-lad.org >
* Modified s3_get and s3_put. Also added s3_check: Nicholas Potteiger
*
*/
void aws_init ();
void aws_set_key ( char * const str );
void aws_set_keyid ( char * const str );
void aws_set_debug (int d);
void s3_set_bucket ( char * const str );
int s3_get ( FILE ... | 542 | 22.608696 | 70 | h |
cctools | cctools-master/dttools/src/string_array.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef STRING_ARRAY_H
#define STRING_ARRAY_H
/** @file string_array.h Single Memory Block String Array.
Allows the creation of string array inside a single memor... | 783 | 25.133333 | 74 | h |
cctools | cctools-master/dttools/src/mq_wait_test.c | #include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <string.h>
#include "mq.h"
#include "buffer.h"
#include "xxmalloc.h"
int main (int argc, char *argv[]) {
const char *string1 = "test message";
const char *string2 = "another one";
buffer_t *test1 = xxmalloc(sizeof(*test1));
b... | 1,630 | 20.746667 | 56 | c |
cctools | cctools-master/dttools/src/auth.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef AUTH_H
#define AUTH_H
#include "link.h"
struct auth_state;
#define AUTH_SUBJECT_MAX... | 1,010 | 27.885714 | 80 | h |
cctools | cctools-master/dttools/src/cctools.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef CCTOOLS_H
#define CCTOOLS_H
#include <stdio.h>
#include <stdint.h>
/** @file cctools.h Common CCTools functions for version and common
output management.... | 815 | 23.727273 | 67 | h |
cctools | cctools-master/dttools/src/hash_table.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "hash_table.h"
#include <stdlib.h>
#include <string.h>
#define DEFAULT_SIZE 127
#de... | 9,370 | 23.028205 | 125 | c |
cctools | cctools-master/dttools/src/category_test.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <stdio.h>
#include <string.h>
#include "category_internal.h"
#include "rmsummary.h"
#include "hash_table.h"
#include "debug.h"
const char *ca... | 2,859 | 26.76699 | 127 | c |
cctools | cctools-master/dttools/src/envtools.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef ENVTOOLS_H
#define ENVTOOLS_H
int find_executable(const char *exe_name, const char *env_path_var, char *exe_path, int max_length);
/** Takes an infile and... | 1,023 | 34.310345 | 100 | h |
cctools | cctools-master/dttools/src/rmonitor_types.h | #if defined(CCTOOLS_OPSYS_DARWIN)
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/resource.h>
#else
#include <sys/vfs.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAS_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#ifdef HAS_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif
#include "... | 3,164 | 20.241611 | 98 | h |
cctools | cctools-master/dttools/src/path_disk_size_info.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "path_disk_size_info.h"
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <sys/stat.h>
#include "debug.h"
#include ... | 4,813 | 25.021622 | 111 | c |
cctools | cctools-master/dttools/src/jx_canonicalize.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <assert.h>
#include <stdbool.h>
#include "jx.h"
#include "jx_print.h"
#include "jx_canonicalize.h"
#include "list.h"
static bool jx_canonicalize_buffer(s... | 2,501 | 20.568966 | 73 | c |
cctools | cctools-master/dttools/src/full_io.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef FULL_IO_H
#define FULL_IO_H
#include <sys/types.h>
#include <stdint.h>
#include <std... | 3,489 | 35.736842 | 81 | h |
cctools | cctools-master/dttools/src/file_cache.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef FILE_CACHE_H
#define FILE_CACHE_H
#include <sys/types.h>
#include "int_sizes.h"
str... | 958 | 33.25 | 112 | h |
cctools | cctools-master/dttools/src/link_auth.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "link_auth.h"
#include "link.h"
#include "debug.h"
#include "stringtools.h"
#include "sha1.h"
#include "full_io.h"
#include <string.h>
/*
This function p... | 3,517 | 30.132743 | 88 | c |
cctools | cctools-master/dttools/src/bitmap.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifdef HAS_LIBJPEG
#include "jinclude.h"
#include "jpeglib.h"
#endif /* */
#include <stdlib.... | 15,619 | 20.907433 | 100 | c |
cctools | cctools-master/dttools/src/auth_ticket.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "auth_ticket.h"
#include "auth.h"
#include "buffer.h"
#include "catch.h"
#include "debug.h"
#include "dpopen.h"
#include "full_io.h"
#include "hash_table.... | 10,214 | 28.523121 | 131 | c |
cctools | cctools-master/dttools/src/timestamp.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
/** @file timestamp.h
Portable routines for high reso... | 1,443 | 25.740741 | 116 | h |
cctools | cctools-master/dttools/src/catalog_query_tool.c | /*
Copyright (C) 2016 Douglas Thain and the University of Wisconsin
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "catalog_query.h"
#include "jx_pretty_print.h"
#include "jx_print.h"
#include "jx_parse.h"
#include "jx_eval.h"
#include "cctools.h"
#incl... | 4,751 | 22.294118 | 127 | c |
cctools | cctools-master/dttools/src/jx_getopt.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
/** @file jx_getopt.h Pull command line args from a JSON document.
*
* This is a wrapper around getopt_long that supports reading arguments
* from a JX object du... | 1,506 | 32.488889 | 114 | h |
cctools | cctools-master/dttools/src/cctools.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "cctools.h"
#include "debug.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
void cctools_version_print (FILE *stream, const char *cmd)
{
f... | 1,443 | 29.723404 | 94 | c |
cctools | cctools-master/dttools/src/pattern.h | /* Copyright (C) 2022 The University of Notre Dame
* This software is distributed under the GNU General Public License.
* See the file COPYING for details.
*/
#ifndef PATTERN_H
#define PATTERN_H
#include <stdarg.h>
#include <stddef.h>
/** @file pattern.h Pattern Matching Facilities.
*
* Lua 5.2 pattern matching... | 825 | 27.482759 | 73 | h |
cctools | cctools-master/dttools/src/file_cache.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "file_cache.h"
#include "create_dir.h"
#include "hash_table.h"
#include "debug.h"
#in... | 6,602 | 20.163462 | 111 | c |
cctools | cctools-master/dttools/src/sh_popen.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef SH_POPEN_H
#define SH_POPEN_H
#include <stdio.h>
#include "process.h"
/** @file sh_popen.h Non Terminal-Stealing popen implementation.*/
/** Non Termina... | 1,461 | 30.106383 | 78 | h |
cctools | cctools-master/dttools/src/histogram.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
#include "int_sizes.h"
/** @file histogram.h Keep counts of doubles that fall in some given bucket size.
<pre>
struct hist... | 4,182 | 23.605882 | 95 | h |
cctools | cctools-master/dttools/src/jx_binary.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "jx_binary.h"
#include "jx.h"
#include "debug.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/*
Rather than relying on the enumeration in ... | 7,794 | 22.765244 | 76 | c |
cctools | cctools-master/dttools/src/ppoll_compat.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef PPOLL_COMPAT_H
#define PPOLL_COMPAT_H
#include <poll.h>
/** Wait for some event on file descriptors.
*
* While Linux provides ppoll() natively, other pl... | 1,513 | 35.926829 | 79 | h |
cctools | cctools-master/dttools/src/stats.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef STATS_H
#define STATS_H
#include <stdio.h>
#include <stdint.h>
#include "jx.h"
/** Collect statistics for the current program.
*/
void stats_enable (void... | 1,513 | 26.527273 | 77 | h |
cctools | cctools-master/dttools/src/pattern.c | #include "debug.h"
#include <ctype.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#undef lua_State
#define lua_State void
#undef LUA_MAXCAPTURES
#define LUA_MAXCAPTURES 256
#undef MAXCCALLS
#define MAXCCALLS 200
#undef LUA_QL
#define LUA_QL(x) "'" x "'"
#undef uchar
#define uchar(c... | 1,741 | 20.506173 | 72 | c |
cctools | cctools-master/dttools/src/histogram_test.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "histogram.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
// use bucket size of .5
struct histogram *h = histogram_create... | 1,653 | 22.295775 | 88 | c |
cctools | cctools-master/dttools/src/catalog_update.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "jx_print.h"
#include "jx_parse.h"
#include "catalog_query.h"
#include "debug.h"
#include "int_sizes.h"
#include "load_average.h"
#include "host_memory_in... | 3,257 | 23.133333 | 125 | c |
cctools | cctools-master/dttools/src/get_line.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "get_line.h"
#include "xxmalloc.h"
char *get_line(FILE * fp)
{
static char buffer[LARGE_LINE_... | 1,644 | 21.22973 | 71 | c |
cctools | cctools-master/dttools/src/b64.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "b64.h"
#include "buffer.h"
#include "catch.h"
#include "debug.h"
#include <assert.h>
#include <stddef.h>
int b64_encode(const void *blob, size_t bloblen... | 4,013 | 29.876923 | 76 | c |
cctools | cctools-master/dttools/src/cctools_endian.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <stdint.h>
#include "cctools_endian.h"
uint64_t cctools_htonll(uint64_t hostlonglong) {
uint64_t out = 0;
uint8_t *d = (uint8_t *) &out;
d[7] = hostlo... | 880 | 22.184211 | 66 | c |
cctools | cctools-master/dttools/src/jx_canonicalize.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef JX_CANONICALIZE_H
#define JX_CANONICALIZE_H
/** @file jx_canonicalize.h Print a JX structure in canonical form.
* Canonical form is not particularly reada... | 829 | 24.9375 | 78 | h |
cctools | cctools-master/dttools/src/display_size.c | #include "display_size.h"
static const char *unit_names[] = {"GB", "MB", "KB", "B"};
static const int num_units = sizeof(unit_names)/sizeof(*(unit_names));
static const UINT64_T gigabytes = 1000 * 1000 * 1000;
char * human_readable_size(UINT64_T size){
char *result = (char *) malloc(sizeof(char) * 21);
UINT64_T mul... | 675 | 26.04 | 70 | c |
cctools | cctools-master/dttools/src/elfheader.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef ELFHEADER_H
#define ELFHEADER_H
#include <limits.h>
/** Get the interpreter (PT_INTERP) for the executable.
*
* @param fd The open file descriptor to th... | 767 | 25.482759 | 66 | h |
cctools | cctools-master/dttools/src/twister.c | /*
A C-program for MT19937-64 (2004/9/29 version).
Coded by Takuji Nishimura and Makoto Matsumoto.
This is a 64-bit version of Mersenne Twister pseudorandom number
generator.
Before using, initialize the state by using init_genrand64(seed)
or init_by_array64(init_key, key_length).
Copyright (C) ... | 5,240 | 30.011834 | 81 | c |
cctools | cctools-master/dttools/src/xxmalloc.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <sys/types.h>
#ifndef XXMALLOC_H
#define XXMALLOC_H
/** @file xxmalloc.h
Brittle me... | 1,163 | 30.459459 | 87 | h |
cctools | cctools-master/dttools/src/auth_ticket.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef AUTH_TICKET_H
#define AUTH_TICKET_H
typedef char * (*auth_ticket_server_callback_t)(const char *);
int auth_ticket_register(void);
/* Callback to lookup ... | 611 | 25.608696 | 81 | h |
cctools | cctools-master/dttools/src/bitmap.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef BITMAP_H
#define BITMAP_H
struct bitmap *bitmap_create(int w, int h);
void bitmap_del... | 2,288 | 32.661765 | 102 | h |
cctools | cctools-master/dttools/src/console_login.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef CONSOLE_LOGIN_H
#define CONSOLE_LOGIN_H
/** @file console_login.h
Read a name and pas... | 1,457 | 37.368421 | 95 | h |
cctools | cctools-master/dttools/src/link_auth.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef LINK_AUTH_H
#define LINK_AUTH_H
#include "link.h"
/* @file link_auth.h Simple authentication routines. */
/** Authenticate a link based on the contents o... | 660 | 26.541667 | 100 | h |
cctools | cctools-master/dttools/src/mq.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <fcntl.h>
#incl... | 24,249 | 24 | 86 | c |
cctools | cctools-master/dttools/src/memfdexe.c | #include "debug.h"
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#if defined(__linux__)
# include <syscall.h>
#endif
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int memfdexe (const char *name, const char *extradir)
{
int fd;
... | 1,922 | 23.341772 | 115 | c |
cctools | cctools-master/dttools/src/getopt.h | /*
We include a standard implementation of getopt.c,
so as to support platforms where it is not available.
Amazingly, this version appears to result in SIGBUS
errors when used on Darwin. In that case, we just
make use of the local implementation.
*/
#if defined(CCTOOLS_OPSYS_DARWIN)
#if defined(CCTOOLS_OSX_GETOPT_FR... | 6,588 | 33.317708 | 83 | h |
cctools | cctools-master/dttools/src/hdfs_library.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef HDFS_LIBRARY_H
#define HDFS_LIBRARY_H
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "int_sizes.h"
#ifndef HDFS_EINTERNAL
#define HDFS... | 2,307 | 26.807229 | 84 | h |
cctools | cctools-master/dttools/src/sleeptools.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef SLEEPTOOLS_H
#define SLEEPTOOLS_H
#include <time.h>
/** @file sleeptools.h
Sleep for... | 760 | 24.366667 | 79 | h |
cctools | cctools-master/dttools/src/auth_all.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef AUTH_ALL_H
#define AUTH_ALL_H
/** @file auth_all.h Global authentication controls.
Ch... | 1,348 | 24.942308 | 69 | h |
cctools | cctools-master/dttools/src/jx_sub.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef JX_SUB_H
#define JX_SUB_H
#include "jx.h"
/** @file jx_sub.h Implements context substitution of JX expressions.
*/
/** Substitute symbols from context.
T... | 786 | 28.148148 | 85 | h |
cctools | cctools-master/dttools/src/auth_test.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "auth.h"
#include "link.h"
#include "getopt.h"
#include "debug.h"
#include "domain_na... | 3,690 | 24.108844 | 120 | c |
cctools | cctools-master/dttools/src/compat-at.c | /*
* Copyright (C) 2022 The University of Notre Dame
* This software is distributed under the GNU General Public License.
* See the file COPYING for details.
*/
#if !defined(HAS_OPENAT) || !defined(HAS_UTIMENSAT)
#include "compat-at.h"
#include "debug.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.... | 4,296 | 23.554286 | 93 | c |
cctools | cctools-master/dttools/src/chunk.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "get_line.h"
#include "ha... | 4,631 | 21.930693 | 118 | c |
cctools | cctools-master/dttools/src/username.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef USERNAME_H
#define USERNAME_H
/** @file username.h
Obtain information about the curre... | 1,137 | 25.465116 | 69 | h |
cctools | cctools-master/dttools/src/auth_hostname.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "auth.h"
#include "catch.h"
#include "debug.h"
#include "domain_name_cache.h"
#inclu... | 1,575 | 20.297297 | 83 | c |
cctools | cctools-master/dttools/src/mq_poll_test.c | #include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <string.h>
#include "mq.h"
#include "xxmalloc.h"
#include "buffer.h"
// 10 MiB (should be bigger than any send/recv buffers)
#define MSG_SIZE 10485760
int main (int argc, char *argv[]) {
char *string1 = xxmalloc(MSG_SIZE + 1);
... | 2,034 | 20.421053 | 66 | c |
cctools | cctools-master/dttools/src/jx_eval.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef JX_EVAL_H
#define JX_EVAL_H
#include "jx.h"
/** @file jx_eval.h Implements evaluation of JX expressions.
*/
/** Evaluate an expression.
Traverses the exp... | 1,677 | 35.478261 | 85 | h |
cctools | cctools-master/dttools/src/unlink_recursive.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "unlink_recursive.h"
#include "debug.h"
#include <dirent.h>
#include <fcntl.h>
#incl... | 2,394 | 22.95 | 92 | c |
cctools | cctools-master/dttools/src/debug_file.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "catch.h"
#include "debug.h"
#include "full_io.h"
#include "stringtools.h"
#include "path.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>... | 2,908 | 21.376923 | 108 | c |
cctools | cctools-master/dttools/src/uptime.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "uptime.h"
#include "debug.h"
#if defined(CCTOOLS_OPSYS_DARWIN)
#include <sys/sysctl.h>
#include <time.h>
#elif defined(CCTOOLS_OPSYS_LINUX)
#include <sys... | 1,166 | 20.611111 | 75 | c |
cctools | cctools-master/dttools/src/jx_binary.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef JX_BINARY_H
#define JX_BINARY_H
/** @file jx_binary.h Binary format encode/decode for JX expressions.
These routines allow for JX expressions to be read/wr... | 999 | 26.777778 | 69 | h |
cctools | cctools-master/dttools/src/mkdir_recursive.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef MKDIR_RECURSIVE_H
#define MKDIR_RECURSIVE_H
#include "compat-at.h"
#include <fcntl.h>
#include <sys/stat.h>
/** @file mkdir_recursive.h Create a new dire... | 1,633 | 29.830189 | 103 | h |
cctools | cctools-master/dttools/src/jx_table.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "jx_table.h"
#include "jx_print.h"
#include "stringtools.h"
#include "macros.h"
#include <stdlib.h>
#include <string.h>
static char *fill_string(const c... | 3,407 | 20.987097 | 113 | c |
cctools | cctools-master/dttools/src/jx_canonicalize_test.c | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "jx.h"
#include "jx_canonicalize.h"
int main(int argc, char **argv) {
char *s;
struct jx *x_null = jx_null();
struct jx *x_true = jx_boolean(1);
struct jx *x_false = jx_boolean(0);
struct jx *x_integer = jx_integer(42);
st... | 2,302 | 21.359223 | 51 | c |
cctools | cctools-master/dttools/src/auth_unix.c | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "auth.h"
#include "catch.h"
#include "debug.h"
#include "xxmalloc.h"
#include "string... | 5,110 | 20.748936 | 94 | c |
cctools | cctools-master/dttools/src/compat-at.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef COMPAT_AT_H
#define COMPAT_AT_H
/** @file compat-at.h at syscall compatibility layer.
*/
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#inc... | 2,075 | 30.938462 | 95 | h |
cctools | cctools-master/dttools/src/jx_pretty_print.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef JX_PPRINT_H
#define JX_PPRINT_H
/** @file jx_print.h Print JX expressions to strings, files, and buffers. */
#include "jx.h"
#include "buffer.h"
#include ... | 533 | 22.217391 | 116 | h |
cctools | cctools-master/dttools/src/host_disk_info.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef DISK_INFO_H
#define DISK_INFO_H
#ifdef HAS_SYS_STATFS_H
#include <sys/statfs.h>
#endi... | 1,422 | 28.645833 | 100 | h |
cctools | cctools-master/dttools/src/mq_store_test.c | #include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "mq.h"
#include "buffer.h"
#include "xxmalloc.h"
int main (int argc, char *argv[]) {
const char *string1 = "test message";
int srcfd = open(arg... | 2,998 | 20.890511 | 59 | c |
cctools | cctools-master/dttools/src/password_cache.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the password COPYING for details.
*/
#ifndef PASSWORD_CACHE_H
#define PASSWORD_CACHE_H
#include <sys/types.h>
#include "int_s... | 730 | 26.074074 | 90 | h |
cctools | cctools-master/dttools/src/jx_print.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "jx_print.h"
#include "jx_parse.h"
#include <assert.h>
#include <ctype.h>
void jx_comprehension_print(struct jx_comprehension *comp, buffer_t *b) {
if (... | 5,999 | 20.66065 | 102 | c |
cctools | cctools-master/dttools/src/nvpair.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef NVPAIR_H
#define NVPAIR_H
#include <stdio.h>
#include "int_sizes.h"
#include "hash_t... | 4,663 | 30.945205 | 89 | h |
cctools | cctools-master/dttools/src/copy_stream.h | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef COPY_STREAM_H
#define COPY_STREAM_H
#include <stdint.h>
#include <stdio.h>
#include <... | 749 | 27.846154 | 74 | h |
cctools | cctools-master/dttools/src/address.c | #include "address.h"
#include "debug.h"
#include "xxmalloc.h"
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <unistd.h>
int address_check_mode( struct addrinfo *info ) {
assert(info);
const char *mode_str = ge... | 4,123 | 24.614907 | 125 | c |
cctools | cctools-master/dttools/src/jx_repl.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
/*
This is a program to explore the jx library.
It reads in a JX expression, evaluates it, prints out the result, then saves it to the context.
Results of previous ... | 5,890 | 26.022936 | 102 | c |
cctools | cctools-master/dttools/src/bucketing_manager.c | #include <stdlib.h>
#include "bucketing_manager.h"
#include "xxmalloc.h"
#include "debug.h"
/* Begin: internals */
/* List of default parameters for a bucketing manager */
static const double default_cores = 1;
static const double default_mem = 1000;
static const double default_disk = 1000;
static const double defaul... | 10,787 | 30.269565 | 132 | c |
cctools | cctools-master/dttools/src/elfheader.c | #include "catch.h"
#include "debug.h"
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
typedef uint32_t Elf32_Addr;
typedef uint16_t Elf32_Half... | 5,385 | 21.164609 | 82 | c |
cctools | cctools-master/dttools/src/jx_binary_test.c | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "jx_binary.h"
#include "jx_parse.h"
#include "jx_print.h"
#include "timestamp.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#define TIMEI... | 1,537 | 20.971429 | 77 | c |
cctools | cctools-master/dttools/src/random.c | /*
* Copyright (C) 2022 The University of Notre Dame
* This software is distributed under the GNU General Public License.
* See the file COPYING for details.
*/
#include "full_io.h"
#include "random.h"
#include "twister.h"
#include "debug.h"
#include <fcntl.h>
#include <unistd.h>
#include <assert.h>
#include <in... | 1,768 | 20.313253 | 69 | c |
cctools | cctools-master/dttools/src/b64.h | /*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef B64_H
#define B64_H
#include "buffer.h"
#include <stddef.h>
/** @file b64.h Base64 Encoding Operations.
*
*/
/** Compute the size of the base64 encod... | 1,443 | 24.333333 | 75 | h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.