id int64 1 722k | file_path stringlengths 8 177 | funcs stringlengths 1 35.8M |
|---|---|---|
1 | ./reptyr/reptyr.c | /*
* Copyright (C) 2011 by Nelson Elhage
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pu... |
2 | ./reptyr/attach.c | /*
* Copyright (C) 2011 by Nelson Elhage
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pu... |
3 | ./reptyr/ptrace.c | /*
* Copyright (C) 2011 by Nelson Elhage
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pu... |
4 | ./pgmp/sandbox/hello/hello.c | /* A test program to study the mpz_t structure.
*
* Copyright (C) 2011 Daniele Varrazzo
*/
#include <stdio.h>
#include <gmp.h>
int
main(int argc, char **argv)
{
mpz_t z1, z2;
mpz_init_set_ui(z1, ~((unsigned long int)0));
mpz_init(z2);
mpz_add_ui(z2, z1, 1);
mpz_out_str(stdout, 10, z2);
pr... |
5 | ./pgmp/src/pgmp_utils.c | /* pgmp_utils -- misc utility module
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 ... |
6 | ./pgmp/src/pmpz_agg.c | /* pmpz_agg -- mpz aggregation functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Softw... |
7 | ./pgmp/src/pmpq_io.c | /* pmpq_io -- mpq Input/Output functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Softw... |
8 | ./pgmp/src/pmpz_roots.c | /* pmpz_roots -- root extraction functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Sof... |
9 | ./pgmp/src/pgmp.c | /* pgmp -- PostgreSQL GMP module
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Foun... |
10 | ./pgmp/src/pmpq_arith.c | /* pmpq_arith -- mpq arithmetic functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Soft... |
11 | ./pgmp/src/pmpz_rand.c | /* pmpz_rand -- mpz random numbers
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Fo... |
12 | ./pgmp/src/pmpz_arith.c | /* pmpz_arith -- mpz arithmetic functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Soft... |
13 | ./pgmp/src/pmpz.c | /* pmpz -- PostgreSQL data type for GMP mpz
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 So... |
14 | ./pgmp/src/pmpz_theor.c | /* pmpz_theor -- number theoretic functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 So... |
15 | ./pgmp/src/pmpz_io.c | /* pmpz_io -- mpz Input/Output functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Softw... |
16 | ./pgmp/src/pmpz_bits.c | /* pmpz_bits -- bit manipulation functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Sof... |
17 | ./pgmp/src/pmpq.c | /* pmpq -- PostgreSQL data type for GMP mpq
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 So... |
18 | ./pgmp/src/pmpq_agg.c | /* pmpq_agg -- mpq aggregation functions
*
* Copyright (C) 2011 Daniele Varrazzo
*
* This file is part of the PostgreSQL GMP Module
*
* The PostgreSQL GMP Module 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 Softw... |
19 | ./little-cms/utils/samples/vericc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
20 | ./little-cms/utils/samples/mktiff8.c | //
// Little cms
// Copyright (C) 1998-2010 Marti Maria
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy... |
21 | ./little-cms/utils/samples/itufax.c | //
// Little cms
// Copyright (C) 1998-2003 Marti Maria
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy... |
22 | ./little-cms/utils/samples/mkcmy.c | //
// Little cms
// Copyright (C) 1998-2003 Marti Maria
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy... |
23 | ./little-cms/utils/samples/wtpt.c | //
// Little cms
// Copyright (C) 1998-2000 Marti Maria
//
// THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
// EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
// WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL MARTI MARIA BE LIABLE FOR AN... |
24 | ./little-cms/utils/samples/roundtrip.c | //
// Little cms
// Copyright (C) 1998-2011 Marti Maria
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy... |
25 | ./little-cms/utils/samples/mkgrayer.c | //
// Little cms
// Copyright (C) 1998-2003 Marti Maria
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy... |
26 | ./little-cms/utils/common/xgetopt.c | /*
getopt.c
*/
#include <errno.h>
#include <string.h>
#include <stdio.h>
int xoptind = 1; /* index of which argument is next */
char *xoptarg; /* pointer to argument of current option */
int xopterr = 0; /* allow error message */
static char *letP = NULL; /* remember next option c... |
27 | ./little-cms/utils/common/vprf.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
28 | ./little-cms/utils/jpgicc/jpgicc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
29 | ./little-cms/utils/jpgicc/iccjpeg.c | /*
* iccprofile.c
*
* This file provides code to read and write International Color Consortium
* (ICC) device profiles embedded in JFIF JPEG image files. The ICC has
* defined a standard format for including such data in JPEG "APP2" markers.
* The code given here does not know anything about the internal structu... |
30 | ./little-cms/utils/linkicc/linkicc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
31 | ./little-cms/utils/matlab/icctrans.c | //
// Little cms
// Copyright (C) 1998-2010 Marti Maria, Ignacio Ruiz de Conejo
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
//... |
32 | ./little-cms/utils/transicc/transicc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
33 | ./little-cms/utils/psicc/psicc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
34 | ./little-cms/utils/tificc/tificc.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
35 | ./little-cms/utils/tificc/tifdiff.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
36 | ./little-cms/testbed/testcms2.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
37 | ./little-cms/src/cmssamp.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
38 | ./little-cms/src/cmspcs.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
39 | ./little-cms/src/cmsmtrx.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
40 | ./little-cms/src/cmserr.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
41 | ./little-cms/src/cmscgats.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
42 | ./little-cms/src/cmsxform.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
43 | ./little-cms/src/cmsmd5.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
44 | ./little-cms/src/cmsgmt.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
45 | ./little-cms/src/cmsgamma.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2013 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
46 | ./little-cms/src/cmswtpnt.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
47 | ./little-cms/src/cmshalf.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
48 | ./little-cms/src/cmslut.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
49 | ./little-cms/src/cmsps2.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
50 | ./little-cms/src/cmsopt.c |
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwa... |
51 | ./little-cms/src/cmsplugin.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
52 | ./little-cms/src/cmsio0.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
53 | ./little-cms/src/cmsnamed.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
54 | ./little-cms/src/cmscnvrt.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
55 | ./little-cms/src/cmspack.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2010 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
56 | ./little-cms/src/cmsintrp.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
57 | ./little-cms/src/cmsio1.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
58 | ./little-cms/src/cmscam02.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
59 | ./little-cms/src/cmssm.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
60 | ./little-cms/src/cmsvirt.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
61 | ./little-cms/src/cmstypes.c | //---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Softwar... |
62 | ./emokit/examples/emokitd/emokitd.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <syslog.h>
#include <signal.h>
#include <pthread.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "emokit/emokit.h"
#include "emokitd.h"
sigset_t mask;
type... |
63 | ./emokit/examples/contact/contact.c | /*
Get real-time contact quality readings
*/
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include "emokit/emokit.h"
int quit;
void cleanup(int i){
fprintf(stdout,"Shutting down\n");
quit=1;
}
int main(int argc, char **argv)
{
struct emokit_device* d;
signal(SIGINT, cleanup); //trap cntrl c
... |
64 | ./emokit/src/emokit.c | /* Copyright (c) 2010, Daeken and Skadge
* Copyright (c) 2011-2012, OpenYou Organization (http://openyou.org)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in... |
65 | ./libzt/tests/tree_test.c | /*
* Copyright (C) 2001, 2004, 2005, Jason L. Shiffer <jshiffer@zerotao.org>. All Rights Reserved.
*
*
* $Id: tree_test.c,v 1.1 2002/11/10 23:36:59 jshiffer Exp $
*
*/
/*
* Description: tree tests
*/
#include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
#define REMOVED 8
#define REMOVED2 6
#define MAX_OD... |
66 | ./libzt/tests/assert_test.c | /*
* assert_test.c test assertions
*
* Copyright (C) 2000-2002, 2004, 2005, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: assert_test.c,v 1.2 2003/06/09 13:42:12 jshiffer Exp $
*
*/
/*
* Description:
*/
#undef NDEBUG
#define ZT_WITH_UNIT
#inclu... |
67 | ./libzt/tests/unit_test.c | #include <stdio.h>
#define ZT_WITH_UNIT
#include <zt.h>
void
test_fn_1(struct zt_unit_test *test, void *data UNUSED)
{
ZT_UNIT_ASSERT(test, 1 != 2);
}
void
test_fn_2(struct zt_unit_test *test UNUSED, void *data UNUSED)
{
/* char * abc = "123"; */
/* ZT_UNIT_ASSERT_RAISES(test, abc, TRY_THROW(abc)); */
... |
68 | ./libzt/tests/table_test.c | /*
* Copyright (C) 2000-2005, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id$
*
*/
/*
* Description:
*/
#include <string.h>
#include <stdio.h>
#define ZT_WITH_UNIT
#include <zt.h>
#define STR_TEST_PRE "strings "
static int count = 0;
static int str_ite... |
69 | ./libzt/tests/daemon_test.c | /*
* daemon_test.c test daemon
*
* Copyright (C) 2008, Jason L. Shiffer <jshiffer@zerotao.org>. All Rights Reserved.
* See file COPYING for details.
*
*/
/*
* Description:
*/
#ifdef HAVE_CONFIG_H
# include "zt_config.h"
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_STRING_H
# include <string.h>
#endif /* HAV... |
70 | ./libzt/tests/stack_test.c | #define ZT_WITH_UNIT
#include <zt.h>
typedef struct stack_elt {
zt_stack_t member;
int n;
}stack_elt;
typedef struct queue_elt {
zt_queue_t member;
int n;
}queue_elt;
static int values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
#define VALUES_MAX (int)sizeof_array(values)
static void
basic_test... |
71 | ./libzt/tests/buf_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test * test, void * data UNUSED) {
zt_buf_t * buf;
buf = zt_buf_new();
ZT_UNIT_ASSERT_NOT_EQUAL(test, buf, NULL);
ZT_UNIT_ASSERT_EQUAL(test, zt_buf_length(buf), 0);
zt_buf_add(buf, "abcd", 4);
ZT... |
72 | ./libzt/tests/bstream_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test *test, void *data UNUSED)
{
zt_bstream_t bs, clone;
char * test_string = "this is a test string",
string_test[256] = "";
uint8_t test_uint8 = 0xDE,
uint8_test = 0;
... |
73 | ./libzt/tests/llist_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test *test, void *data UNUSED)
{
char * m = "c";
zt_pair * x;
zt_pair * volatile y;
x = zt_llist_cons("a", NULL);
x = zt_llist_cons("b", x);
y = zt_llist_reverse(x);
m = (char *)zt_llist_n... |
74 | ./libzt/tests/cfg_test.c | /*
* cfg_test.c config file parser test
*
* Copyright (C) 2000-2002, 2004, 2005, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: cfg_test.c,v 1.2 2003/06/09 13:42:12 jshiffer Exp $
*
*/
/*
* Description:
*/
#include <string.h>
#define ZT_WITH_U... |
75 | ./libzt/tests/log_test.c | /*
* Copyright (C) 2000-2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: zt_log_test.c,v 1.7 2003/11/26 15:45:10 jshiffer Exp $
*
*/
/*
* Description:
*/
#include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_uni... |
76 | ./libzt/tests/cstr_test.c | /*
* Copyright (C) 2000-2002, 2004, 2005, 2006, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: cstr_test.c,v 1.2 2003/06/09 13:42:12 jshiffer Exp $
*
*/
/*
* Description: tests for the strings interfaces
*/
#include <string.h>
#include <stdio.h>
#inclu... |
77 | ./libzt/tests/progname_test.c | /*
* Copyright (C) 2000-2002, 2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: progname_test.c,v 1.2 2003/06/09 13:42:12 jshiffer Exp $
*
*/
/*
* Description:
*/
#include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static char * argv[] = { "te... |
78 | ./libzt/tests/list_test.c | /*
* Copyright (C) 2000-2005, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id$
*
*/
/*
* Description:
*/
#include <stdlib.h>
#include <stdio.h>
#define ZT_WITH_UNIT
#include <zt.h>
static int values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
#define VALUES_MA... |
79 | ./libzt/tests/macros_test.c | /*
* Copyright (C) 2000-2002, 2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: macros_test.c,v 1.2 2003/06/09 13:42:12 jshiffer Exp $
*
*/
/*
* Description:
*/
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test *test, ... |
80 | ./libzt/tests/time_test.c |
#define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test *test, void *data UNUSED)
{
#ifndef WIN32
struct timeval tv1;
struct timeval tv2;
struct timeval tv_zero = { 0, 0 }; /* 0 second diff time */
struct timeval tv4 = { 2, 0 }; /* 2 second diff time */
struct timeval tg... |
81 | ./libzt/tests/gc_test.c | #define ZT_WITH_UNIT
#define ZT_WITH_GC
#include <zt.h>
#undef DEBUG_GC
#define INT 1
#define ATOM 2
typedef struct atom atom;
struct atom {
zt_gc_collectable_t mark;
int type;
union {
struct atom * atom;
int number;
} value;
};
static int ints_marked = 0;
... |
82 | ./libzt/tests/opts_test.c | /*
* Copyright (C) 2000-2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id$
*
*/
/*
* Description: tests for the options interface
*/
#ifdef HAVE_CONFIG_H
# include "zt_config.h"
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_STRING_H
# include <string.h>
#end... |
83 | ./libzt/tests/include_test.c | #define ZT_WITH_UNIT
#include <zt.h>
static void
basic_tests(struct zt_unit_test *test, void *data UNUSED)
{
ZT_UNIT_ASSERT(test, 1); /* we compiled so we pass */
}
int
register_include_suite(struct zt_unit *unit)
{
struct zt_unit_suite * suite;
suite = zt_unit_register_suite(unit, "include", NULL, NULL... |
84 | ./libzt/tests/array_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
int values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
static void
basic_tests(struct zt_unit_test *test, void *data UNUSED)
{
size_t n;
size_t i;
int * pv;
zt_array_t array = zt_array_new(10, sizeof(int));
zt_array_t array2;
ZT_... |
85 | ./libzt/tests/format_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static size_t
cvt_S(int code UNUSED, void * value,
int put(int c, void *cl), void *cl,
unsigned char flags[], ssize_t width, ssize_t precision)
{
char * str = *(char **)value;
zt_assert(str);
return zt_fmt_puts(str, strlen(str), put, cl... |
86 | ./libzt/tests/path_test.c | /*
* path_test.c path utils tests
*
* Copyright (C) 2010-2011 Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See File COPYING for details.
*/
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
#include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
static void... |
87 | ./libzt/tests/ipv4_tbl_test.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zt_stdint.h>
#define ZT_WITH_UNIT
#include <zt.h>
static struct _test_s {
char *addr;
uint8_t bitlen;
uint32_t start;
uint32_t end;
} network_tests[] = {
/* 192.168.0.0 - 192.168.0.255 */
{ "192.168.0.1/24", 24, 3232235... |
88 | ./libzt/tests/set_test.c | #include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
ssize_t values0_19[] = {
0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10,
11, 12, 13, 14, 15,
16, 17, 18, 19
};
char * valuesA_Z[] = {
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v... |
89 | ./libzt/tests/sha1_test.c | /*
* sha1_test.c test assertions
*
* Copyright (C) 2008, Jason L. Shiffer <jshiffer@zerotao.org>. All Rights Reserved.
* See file COPYING for details.
*
*/
/*
* Description:
*/
#ifdef HAVE_CONFIG_H
# include "zt_config.h"
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_STRING_H
# include <string.h>
#endif /* H... |
90 | ./libzt/tests/int_test.c |
#ifdef HAVE_CONFIG_H
# include <zt_config.h> /* for zt_int.h */
#endif /* HAVE_CONFIG_H */
#define ZT_WITH_UNIT
#include <zt.h>
static void
test_case_signed_add(struct zt_unit_test *test, void *data UNUSED)
{
/* CHAR pos common */
/* ZT_UNIT_ASSERT_RAISES(test, zt_exception.math.overflow, zt_char_add(CHAR_MA... |
91 | ./libzt/tests/base_test.c | #define ZT_WITH_UNIT
#include <zt.h>
#include <string.h>
#include <ctype.h>
#include <zt_base.h>
#define test_encoding(_base, _data, _len, _result1, _result2) \
do { unsigned char * cdata = (unsigned char *)_data; \
char * ... |
92 | ./libzt/tests/uuid_test.c | /*
* sha1_test.c test assertions
*
* Copyright (C) 2008, Jason L. Shiffer <jshiffer@zerotao.org>. All Rights Reserved.
* See file COPYING for details.
*
*/
/*
* Description:
*/
#ifdef HAVE_CONFIG_H
# include "zt_config.h"
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_STRING_H
# include <string.h>
#endif /* H... |
93 | ./libzt/examples/hexdump.c | #include <zt.h>
#include <string.h>
int
main(int argc UNUSED, char * argv[] UNUSED) {
char * ALPHA = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
char * ALPHA2 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzA... |
94 | ./libzt/examples/mem_pools.c | /*
* Copyright (C) 2000-2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id$
*
*/
/*
* Description:
*/
#include <stdio.h>
#include <string.h>
#include <zt.h>
#include <zt_internal.h>
struct pool_test {
int one;
int two;
int three;
};
#defi... |
95 | ./libzt/examples/base64_speed.c | #include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <zt.h>
#define kBufSz 4096
static void
test_base64_speed(void) {
unsigned char iBuf[kBufSz];
const size_t n = kBufSz;
size_t i;
const long long kIterations = 2621440;
const long long nGigs = (kIterations * kBufSz) / (102... |
96 | ./libzt/examples/threads.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <zt.h>
zt_threads_mutex *mutex;
void *
example_thread_cb(void *_data) {
char *data = (char *)_data;
while (1) {
/* lock the mutex */
zt_threads_lock(0, mutex);
printf("id=%lu dat... |
97 | ./libzt/examples/mem_timing.c | /*
* Copyright (C) 2000-2005, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id$
*
*/
/*
* Description:
*/
#include <stdio.h>
#include <stdlib.h>
#if !defined(WIN32)
# include <sys/time.h> /* gettimeofday */
# include <sys/resource.h>
#endif
#include <z... |
98 | ./libzt/examples/abort.c | #include <zt.h>
int
main(void) {
zt_abort("This will always fail");
return 0;
}
|
99 | ./libzt/examples/log_syslog.c | /*
* Copyright (C) 2000-2004, Jason L. Shiffer <jshiffer@zerotao.com>. All Rights Reserved.
* See file COPYING for details.
*
* $Id: zt_log_test.c,v 1.7 2003/11/26 15:45:10 jshiffer Exp $
*
*/
/*
* Description:
*/
#include <string.h>
#define ZT_WITH_UNIT
#include <zt.h>
int
main(int argc, char **argv) {
... |
100 | ./libzt/src/zt_cstr.c | /*!
* Filename: zt_cstr.c
* Description: C String Utilities
*
* Author: Jason L. Shiffer <jshiffer@zerotao.org>
* Copyright:
* Copyright (C) 2000-2010, Jason L. Shiffer.
* See file COPYING for details
*
* Notes:
*
*/
#include "zt.h"
#include "zt_internal.h"
#ifdef HAVE_CONFIG_H
#include <zt_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.