text stringlengths 3.08k 10.5k |
|---|
/**CFile****************************************************************
FileName [fpgaCore.c]
PackageName [MVSIS 1.3: Multi-valued logic synthesis system.]
Synopsis [Technology mapping for variable-size-LUT FPGAs.]
Author [MVSIS Group]
Affiliation [UC Berkeley]
Date [V... |
/*****************************************************************************************************
* Copyright (c) 2013, 2014, 2017, 2021 <NAME>, <NAME>, <NAME>, <NAME> *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or https://www.opensource... |
/*************************************************************************\
* Copyright (C) <NAME>, 2016. *
* *
* This program is free software. You may use, modify, and redistribute it *
* under the terms of the ... |
/*
* blncache.c: DAV baseline information cache.
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* ... |
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2013 <NAME>.
* Copyright (c) 2011-2012 <NAME>.
* Copyright (c) 2012 <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*... |
/*
* Copyright (c) 2000-2001, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditi... |
/* map.c - ldap backend mapping routines */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2016-2020 The OpenLDAP Foundation.
* Portions Copyright 2016 Symas Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wit... |
/*
* Break - a software debugger PoC
*
* Copyright 2018 Orange
* <<EMAIL>>
*
*/
#include <unistd.h>
#include <getopt.h>
#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ptrace.h>
#include "break_utils.h"... |
/* BSD 3-Clause License
*
* Copyright © 2008-2020, Jice and the libtcod contributors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the ... |
/* vi: set sw=4 ts=4: */
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <termios.h>
#include <unistd.h>
#include <utmp.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <ctype.h>
#inclu... |
/*
* NovaSM3 - a Spot-Mini Micro clone
* Version: 5.1
* Version Date: 2021-06-18
*
* Author: <NAME> - <EMAIL>
* GitHub Project: https://github.com/cguweb-com/Arduino-Projects/tree/main/Nova-SM3
* Thingiverse: https://www.thingiverse.com/thing:4767006
* Instructables Project: https://www.ins... |
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/gpio.h>
#include <gpiod.h>
#include <linux/spi/spidev.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#include "spi_func_lib.h"
... |
/*
To build use the following gcc statement
(assuming you have the d2xx library in the /usr/local/lib directory).
gcc -o w32_simple main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include "../../ftd2xx.h"
#define ... |
/*
The MIT License (MIT)
Copyright (c) 2015-2017 <NAME>
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, p... |
/*
* Copyright (c) 2011 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <image.h>
#include <android_image.h>
#include <malloc.h>
#include <errno.h>
#define ANDROID_IMAGE_DEFAULT_KERNEL_ADDR 0x10008000
static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1];
static ulong android_... |
/* $NetBSD: msg.c,v 1.15 2021/03/27 11:08:00 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 <NAME>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must... |
/*-
* Public Domain 2014-2016 MongoDB, Inc.
* Public Domain 2008-2014 WiredTiger, Inc.
*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary,... |
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define DEBUG_ON
#include "../pcapdb.h"
#include "../pcapdb_init.h"
#include "../index.h"
#include "test_args.h"
void * clear_buckets(void *);
void walk_and_free(struct index_node *, keytype_t);
int main(int argc, char ** argv) {
uint64_t buckets_allocat... |
#include "conjugrad.h"
#include "arithmetic.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
void swap(conjugrad_float_t **a, conjugrad_float_t **b) {
conjugrad_float_t *c = *a;
*a = *b;
*b = c;
}
int conjugrad(
int n,
conjugrad_float_t *x,
conjugrad_float_t *fx,
conjugrad_eva... |
/**************************************************************************
* @file pp_pressure.c
* @brief Pressure Sensor API for PIOUPIOU's firmware
* @author <NAME>
******************************************************************************
* @section License
* (C) Copyright 2015 <NAME> S.A.S.
* (C) Copyr... |
/*
* TI LP8788 MFD - interrupt handler
*
* Copyright 2012 Texas Instruments
*
* Author: Milo(Woogyom) Kim <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#... |
/*
* Copyright (C) <2018> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* Copyright (C) 2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*... |
/* sexyPSF - PSF1 player
* Copyright (C) 2002-2004 xodnizel
*
* 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 late... |
#include <scsrv.h>
#include <json_pack.h>
#include <dlfcn.h>
#include <BB_tree.h>
extern int substitute_env(char *line);
static pthread_rwlock_t dmlock = PTHREAD_RWLOCK_INITIALIZER;
typedef struct {
char cmd_name[128];
void *handle;
JSON_OBJECT (*cmd)(T_SRV_Var *srvp,JSON_OBJECT param,JSON_OBJECT jerr);
void (*d... |
#include "bamread.h"
char INT_CIGAROP[] = {'M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'};
extern int DATA_TYPE;
int QVoffset = 33;
void print_read_debug(struct alignedread* read)
{
fprintf(stderr,"%s %d %d IS: %d %d\t",read->readid,read->tid,read->position,read->IS,read->cigs);
int i=0; for (i=0;i<read->cigs;i++) ... |
/*
* Copyright 2005-2016 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... |
/*
* Copyright (C) 2013 <NAME> <<EMAIL>>
* All Rights Reserved.
*
* 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,... |
/* Copyright (C) 2011 The Regents of the University of California
* See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
/* hapmap1 -- first step after reading genotype files. */
/* Determine 2 alleles */
/* Input is:
chrom
chromStart
chromEnd
name (rsId)
score (always zer... |
/*
# This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "cutest.h"
#include "matchfile.h"
#include "matchobj.h"
#include "an-bool.h"
#include "starutil.h"
#define SAME(X) CuAssertIntEquals(tc,... |
/******************************************************************************
*
* gpr_ut_tree.c
*
******************************************************************************
*
* Unit tests on "gpr_tree" module
*
*****************************************************************************/
#include "gpr_t... |
//-------------------------------------------------------------------------
//
// The MIT License (MIT)
//
// Copyright (c) 2015 <NAME>
//
// 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 w... |
/*
Copyright (C) 1997-2016 <NAME> <<EMAIL>>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commer... |
// Danil, 2020 Vulkan shader launcher, self https://github.com/danilw/vulkan-shader-launcher
// The MIT License
#include "vk_error_print.h"
void vk_error_data_set_vkresult(struct vk_error_data *error, VkResult vkresult, const char *file, unsigned int line)
{
if (vkresult == 0)
return;
if (error->type != VK_... |
#include <wchar.h>
#include "mlbuf.h"
// Move self/col forward until col fits on current line
static void _bline_advance_col(bline_t **self, bint_t *col) {
while (1) {
MLBUF_BLINE_ENSURE_CHARS(*self);
if (*col > (*self)->char_count) {
if ((*self)->next) {
*col -= (*self)... |
/**
******************************************************************************
* File Name : RemoteTask.c
* Description : 遥控器处理任务
******************************************************************************
*
* Copyright (c) 2018 Team TPP-Shanghai Jiao Tong University
* All rights re... |
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lua.h>
#include <lauxlib.h>
#include "3rd/libpng/png.h"
#include "lpng.h"
#include "texture.h"
#include "array.h"
#define PNG_BYTES_TO_CHECK 4
struct png {
int type;
int channel;
int width;
int height;
uint8_t *buffer;
};
... |
/*
* Copyright 2022 The BabaSSL Project Authors. All Rights Reserved.
*
* Licensed under the BabaSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://github.com/BabaSSL/BabaSSL/blob/... |
#include "codegen.h"
LLVMValueRef compile(rib_state* state, rib_Noun tree) {
if (tree.type == vector_t) {
return compile_vector(state, tree);
} else if (tree.type == number_t) {
return int_literal((int32_t)tree.value.number);
} else if (tree.type == string_t) {
return string_literal(state, tree.value.str->val... |
#include "jdstm.h"
void tim_update_prescaler(void);
void HardFault_Handler(void) {
jd_panic();
}
#ifndef BL
void NMI_Handler(void) {}
void SVC_Handler(void) {}
void PendSV_Handler(void) {}
void SysTick_Handler(void) {}
#endif
#define OPTR_MODE0 0x1
#define OPTR_MODE1 0x2
#define OPTR_MODE_LEGACY 0x3
static ... |
/* file_handler.c */
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <file_handler.h>
#include <include/functions.h>
#include <include/codes.h>
#include <include/queue.h>
#include <mem.h>
static int get_file_fd(const char *file_path, int... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2013-2014 Sage Electronic Engineering, LLC.
* Copyright (C) 2015-2016 Intel Corporation. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publis... |
/*s: networking/ip/snoopy/eapol_key.c */
#include <u.h>
#include <libc.h>
#include <ip.h>
#include "dat.h"
#include "protos.h"
/*s: struct [[Hdr]]([[(networking/ip/snoopy/eapol_key.c)]]) */
typedef struct Hdr
{
uchar desc;
} Hdr;
/*e: struct [[Hdr]]([[(networking/ip/snoopy/eapol_key.c)]]) */
/*s: struct [[Rc4KeyD... |
#pragma once
// License: MIT http://opensource.org/licenses/MIT
// Author: dustpg mailto:<EMAIL>
#include <stdint.h>
/// <summary>
///
/// </summary>
enum sfc_4015_write_flag {
SFC_APU4015_WRITE_EnableSquare1 = 0x01, // 方波1 使能
SFC_APU4015_WRITE_EnableSquare2 = 0x02, // 方波2 使能
SFC_APU4015_WRITE_Enable... |
/**
* Description:
* Author:created by bob on 17-12-21.
*/
//
#include <assert.h>
#include "tcp_server_jni.h"
#include "init_jni.h"
#define tag "TCP_SERVER_JNI"
#define CLASS_TCP_SERVER "com/player/protocol/TCPRTStreamImpl"
static JavaVM *gJVM = NULL;
static jobject gObj = NULL;
static tcp_server_t tcp_server;
sta... |
/*
* Copyright (c) 2016 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
/** @file
A brief file description
@section license License
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you und... |
/*
* Copyright (c) 2013-2014 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and 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 all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR ... |
/*
* Copyright 2011 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writin... |
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Battery LED and Power LED control for Rowan Board.
*/
#include "battery.h"
#include "charge_state.h"
#include "chipset.h"
#include "gpio.h"
#inc... |
/**************************************************************************
*
* utilities to write data/records to output database
*
*
***************************************************************************/
#include "par2db.h"
extern int save_seed();
extern Steim *stinit();
void wrt_last_rec ( Db_buffe... |
/* liboptions by <NAME>.
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* - May you do good and not evil.
* - May you find forgiveness for yourself and forgive others.
* - May you share freely, never taking more than you give. */
#include "options.h"... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "common.h"
#include "cdi.h"
// Global variables
unsigned long temp_value;
/////////////////////////////////////////////////////////////////////////////
unsigned long ask_type(FILE *fsource, long header_position)
{
unsigned cha... |
/*
*
* Embedded Linux library
*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* 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 L... |
/* P I X H I S T 3 D . C
* BRL-CAD
*
* Copyright (c) 1986-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 ... |
/*
* FILE: sha2prog.c
* AUTHOR: <NAME> - http://www.aarongifford.com/
*
* Copyright (c) 2000-2001, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of sourc... |
/*
* SPDX-License-Identifier: MIT
*/
#include <sys/types.h>
#include <time.h>
#include <stdbool.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
#include <evl/thread.h>
#include <evl/sem.h>
#include <evl/event.h>
#include <evl/flags.h>
#include <evl/clock.h>
#include <evl/timer.h>
#include <evl/mutex.... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <hal/ota.h>
#include <aos/aos.h>
#include <hal/soc/soc.h>
#include <CheckSumUtils.h>
#define KV_HAL_OTA_CRC16 "hal_ota_get_crc16"
typedef struct
{
uint32_t dst_adr;
uint32_t src_adr;
uint32_t siz;
... |
/*
* Copyright 2015 Red Hat, Inc.
*
* 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... |
#include <stdio.h>
#include <stdlib.h>
#include "rxvm.h"
#include "test_common.h"
static int tests;
static char *multi_tests[NUM_TESTS_SEARCH_MULTI][4] =
{
{"x+", "oki9u08y72389)**IOxxxxokKIIjJoixxImIOKmOIOuyyRKj", "xxxx", "xx"},
{"erik+", "erierierierierierierierierikkkkerikeri", "erikkkk", "erik"},
{"... |
#include "vuint.h"
#include <limits.h>
#define UNTAG_PTR(p) ((void*)((uintptr_t)p & ~3))
// returns carry (0 .. 1)
// result wraps around
// @param dir 0 if little endian, non-0 if big
static int carry_one(unsigned * a, size_t a_remain, int dir) {
unsigned short a_large = *a;
++a_large;
*a = *a + 1;
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "plugin_defs.h"
#include "plugins_engine.h"
#include "packet_processing.h"
#ifndef _WIN32
#include <dirent.h>
static int load_filter( const struct dirent *entry )
{
char *ext = strrchr( entry->d_name, '.' );
return( ext && !strcmp( ext, ".so"... |
/*!
* t-crc32c.c - crc32c test for lcdb
* Copyright (c) 2022, <NAME> (MIT License).
* https://github.com/chjj/lcdb
*
* Parts of this software are based on google/leveldb:
* Copyright (c) 2011, The LevelDB Authors. All rights reserved.
* https://github.com/google/leveldb
*
* See LICENSE for more information... |
#include <siege/siege.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
SGFont* sizes[12];
const size_t numsizes = sizeof(sizes) / sizeof(SGFont*);
const char* text = "A Quick Brown Fox Jumps Over The Lazy Dog 0123456789";
SGFont* font;
int main(void)
{
sgInit(0);
sgWindowOpen(640, 480, 32, 0);
... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/*
* Copyright (c) 2012-2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* n... |
#ifndef DISPLAY_DRIVER_H
#define DISPLAY_DRIVER_H
#endif //DISPLAY_DRIVER_H
#include <stdio.h>
#include "bcm2835.h"
#define CS 8
#define HRDY 24
#define RESET 17
#define VCOM 1650 //e.g. -1.53 = 1530 = 0x5FA OR default: 1500
typedef struct IT8951Image {
uint16_t endian_type; ... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/param.h>
#include <ctype.h>
#include <unistd.h>
#include "oget.h"
int depth = 0;
/** fatal
* Print error message and exit
*/
_Noreturn void fatal(char *msg) {
fprintf(stderr, ... |
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your ... |
/* $NetBSD: score.c,v 1.5 1997/10/12 14:16:28 lukem Exp $ */
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*... |
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <asm-generic/uaccess.h>
#include <asm-generic/errno.h>
#include <linux/semaphore.h>
#include <linux/kfifo.h>
#define MAX_SIZE 64
static struct proc_dir_entry *proc_entry; //Para... |
/*******************************************************************************************
*
* raylib [textures] example - Draw part of the texture tiled
*
* This example has been created using raylib 3.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*... |
#include <sclog4c.h>
#include "ubpf_lpm.h"
#include "uthash.h"
static inline void
lpm_apply_mask(uint32_t key_size, uint32_t prefix, uint32_t **val)
{
uint32_t *out = (uint32_t *)val;
switch (key_size) {
// IPv4 addresses
case 8:
out[0] &= (uint32_t) (0xFFFFFFFF << (32 - prefix)) ... |
#include "embroidery.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* PPM Images
* ----------
*
* Basic read/write support for images, so we can convert
* to any other format we need using imagemagick.
*
* We only support P3 ASCII ppm, that is the original, 8 bits per channel.
*
* This also allo... |
/**
* @file frame_analyzer_parser.c
* @author risinek (<EMAIL>)
* @date 2021-04-05
* @copyright Copyright (c) 2021
*
* @brief Implements parsing functionality
*/
#include "frame_analyzer_parser.h"
#include "arpa/inet.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define LOG_LOCAL_LEVEL ESP_LOG... |
/*
* Created on: Oct. 19, 2019
* Author: Govind
*/
/*
* standard includes */
#include <stdio.h>
#include <stdlib.h>
/*
* includes for GSL components
* - use double precision
*/
#include <gsl/gsl_vector_double.h>
#include <gsl/gsl_matrix_double.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randis... |
/*
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2022 <NAME> <<EMAIL>>
*/
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include "cmd/cmd.h"
#include "cmd/private.h"
#include "msg/msg.h"
#include "util/cli.h"
#include "util/log.h"
#incl... |
#include <stdio.h>
#include <stdlib.h>
#include <mraa.h>
#define pinDIR 9 //Direction
#define pinENB 8 //Enable
#define pinPWM 3 //Speed,PWM
mraa_gpio_context pin_dir, pin_enb;
mraa_pwm_context pin_pwm;
float speed = 0.1f; //Speed of the motor, from 0.0f to 1.0f
int enable = 0; //Enable active high, 0... |
#include <stdio.h>
#include <assert.h>
/* ------------------------------------------------- */
typedef unsigned char UChar;
typedef unsigned short UShort;
typedef unsigned int UInt;
typedef unsigned long long int ULong;
typedef signed char Char;
typedef short S... |
#include <assert.h>
#include <stdlib.h>
#include "roman_converter.h"
// private
static const unsigned int ABREVIATION_SIZE = 4;
int char_to_int(char c) {
if(c == 'I') {
return 1;
} else if(c == 'V') {
return 5;
} else if(c == 'X') {
return 10;
} else if(c == 'L') {
return 50;
} else if(c ==... |
/*
* Copyright (C) 2017, 2019 <NAME>, <NAME>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup cpu_fe310
* @{
*
* @file cpu.c
* @brief Implementation of ... |
#include "SDL.h"
#include "alien.h"
#include "helpers.h"
#define MAX_POKEMONS 255
extern SDL_Surface *screen;
extern SDL_Surface *heart;
extern SDL_Surface *aliens[2];
extern const int SCREEN_W;
extern const int SCREEN_H;
extern int COMPLEXITY;
extern int SCORE;
alien ship, pokemons[MAX_POKEMONS];
int pokemons_cou... |
/*******************************************************************************
* memmap.c
*
* A program to dump the UEFI memory map.
*/
#include <efi.h>
#define CONSOLE_STR_BUFFER_MAX 128
#define NULL (void *)0
UINTN memory_map_key;
EFI_HANDLE image_handle;
EFI_SYST... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/stat.h>
#include <fcntl.h>
#define SERVER_TCP_PORT 1717
#define MAX_CLIENTS 2
int server_fd... |
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
int ft_upperlower(int c);
char *ft_strncat(char *s1, const char *s2, size_t n);
char *ft_strndup(const char *s1, size_t n);
void *ft_memalloc(size_t size);
void *ft_memchr(void *s... |
/**
* @file main.c
* @brief ADC demo application
* @details Continuously monitors the ADC channels
*/
/* *****************************************************************************
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to... |
/* micro lisp (C) <NAME> */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define debug(m,e) printf("%s:%d: %s:",__FILE__,__LINE__,m); print_obj(e,1); puts("");
typedef struct List {
struct List * next;
void * data;
} List;
List *symbols = 0;
static int look; /* look ahead character... |
/*
** $Id: timeeditor.c 741 2009-03-31 07:16:18Z weiym $
**
** Listing 12.1
**
** timeeditor.c: Sample program for MiniGUI Programming Guide
** A time editor, use SpinBox and Edit controls.
**
** Copyright (C) 2004 ~ 2007 Feynman Software.
**
** License: GPL
*/
#include <stdio.h>
#include <stdlib.h>
#include <st... |
/*
* pr_pset11_11.c
*
* Write a program that reads in up to 10 strings or to EOF, whichever comes
* first. Have it offer the user a menu with five choices:
* 1. Print the original list of strings
* 2. Print the strings in ASCII collating sequence
* 3. Print the strings in order of increasing length
* ... |
/*
* Copyright 2010 Red Hat Inc.
*
* 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, publish, d... |
#include "main.h"
#include "stm32f1xx_hal_tim.h"
void SystemClock_Config(uint8_t clock_freq);
void TIMER3_Init(void);
void GPIO_Init(void);
void Error_Handler(void);
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);
/* TIMER3 can be used for basic timer
* See STM32 cross-series timer overview do... |
/*
* circuit_breaker.c
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <pthread.h>
#include <apr_time.h>
#include "gmetad.h"
#include "riemann.pb-c.h"
extern gmetad_config_t gmetad_config;
extern g_tcp_socket *riemann_tcp_socket;
extern int riemann_circuit_breaker;
extern apr_time_t riemann_reset_ti... |
/*
* (C) Copyright 2005- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... |
#include <strings.h>
#include <stdbool.h>
#include <time.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "tashtalk.h"
#include "packet_types.h"
#include "crc.h"
#include "led.h"
#include "uart.h"
#include "packet_utils.h"
static const char* TAG = "tashtalk";
tashtalk_rx_st... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* draw.c :+: :+: :+: ... |
/* GStreamer
* Copyright (C) 2014 <NAME> <<EMAIL>>
*
* streamsynchronizer.c: Unit test for streamsynchronizer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2... |
#include "fdt.h"
#include "lib.h"
#include "uart.h"
#include "malloc.h"
char* DTB_PLACE;
//stored as big endian
struct fdt_header {
uint32_t magic;
uint32_t totalsize;
uint32_t off_dt_struct;
uint32_t off_dt_strings;
uint32_t off_mem_rsvmap;
uint32_t version;
uint32_t last_comp_version;
... |
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope... |
/*
* ttymato main file.
* Copyright © 2016 <NAME> <<EMAIL>>
* All right reserved.
*
* See LICENCE file.
*/
#include "ttymato.h"
#include "utils.h"
void init_config(void)
{
struct sigaction sig;
/* Init pomodoro
*/
init_pomodoro(&g_ttymato_config->pomodoro);
/* ttymato config
*/
g_ttymato_conf... |
//
// Created by <NAME> on 08/01/2020.
//
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <clib/icon_protos.h>
#include <workbench/startup.h>
#define SDL_LogError( CAT, STR, ...) \
printf(CAT STR "\n", ##__VA_ARGS__)
#define SDL_LOG_CATEGORY_APPLICATION "[APPLICATION] "
void endTest(int);... |
#include <stdio.h>
#include <stdlib.h>
#define MAX_SYMBOLS 255
#define MAX_LEN 7
struct tnode
{
struct tnode* left; /*used when in tree*/
struct tnode*right; /*used when in tree*/
struct tnode*parent;/*used when in tree*/
struct tnode* next; /*used when in list*/
float freq;
int ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.