text stringlengths 3.08k 10.5k |
|---|
/*
* Copyright (C) <NAME> (agentzh)
*/
#include "ngx_lua_shdict_common.h"
static char *ngx_lua_shdict(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
static ngx_command_t ngx_lua_shdict_cmds[] = {
/* NGX_HTTP_MAIN_CONF equal NGX_STREAM_MAIN_CONF */
{ ngx_string("lua_shared_mem"),
NGX_HTTP_MAIN_... |
/*
MIT License
Copyright (c) 2011-2022 ShawnDSP
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, ... |
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below, permission is hereby granted to any
* person obtaining a copy of ... |
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1999-2020 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
... |
#include <stdio.h>
#include <string.h> // tolower
#include <stdlib.h> //malloc
#include "arraypointers.h"
/*recieves a matrix and calculates the sum of each row, sums of rows should be saved in result array, passed by user, return 0 if successful.
1. set i = 0, j = 0, sum =0
2.for i to row
2.1 for j t... |
/**
* author: UncP
* date: 2018-08-31
* license: BSD-3
**/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include "../palm/palm_tree.h"
#include "../palm/metric.h"
const static uint64_t value = 3190;
s... |
/**************************************************************************//**
* @file main.c
* @version V3.00
* @brief Show the usage of clock fail detector and clock frequency monitor function.
*
* @copyright SPDX-License-Identifier: Apache-2.0
* @copyright Copyright (C) 2020 Nuvoton Technology Corp. A... |
/* Board Support Package (BSP) for the STM32F407VET6 board */
#include <stdint.h> /* Standard integers. WG14/N843 C99 Standard */
#include "board_STM32F407VET6.h"
#include "stm32f4xx.h" /* the STM32F407VET6 MCU Peripheral Access Layer (TI) */
#define VET_GPIOA_P6_ON 0x0040 // on GPIOA... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <openenclave/bits/safecrt.h>
#include <openenclave/internal/crypto/asn1.h>
#include <openenclave/internal/crypto/cert.h>
#include <openenclave/internal/raise.h>
#include <openenclave/internal/utils.h>
#include "com... |
#include <stdint.h>
#include <multiboot.h>
#include <mem.h>
#include <debug.h>
struct mboot_data_st mboot_data;
void parse_multiboot1()
{
mboot1_info *data = mboot_data.data;
if(data->flags & (1<<2))
{
debug_ok("MBOOT1 - commandline\n");
mboot_data.commandline = P2V(data->cmdline);
}
if(data->flags... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
typedef struct pcap_hdr_s {
uint32_t magic_number; /* magic number */
uint16_t version_major; /* major version number */
uint16_t version_minor; /* minor version number */
int32_t thiszone; /* GMT to... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* color.c :+: :+: :+: ... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "TADHuffman.h"
//Algoritmo para gerar os códigos de Huffman:
int codigoHuffman(Huffman *raiz, char str[], int i, FILE *arq) {
if(raiz -> dir != raiz -> esq) {
str[i++] = '0';
i = codigoHuffman(raiz -> esq, str, i, arq);
str[i++] = '1';
... |
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in th... |
/*
* c7tpool.c
*
* Copyright (c) 2019 <EMAIL>
*
* This software is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
#include "_config.h"
#include <unistd.h>
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <c7deque.h>
#include <c7memor... |
/*
* RTP/mpegts muxer
* Copyright (c) 2011 <NAME>
*
* This file is part of FFmpeg.
*
* FFmpeg 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 (a... |
/* Simple string->void* hashtable, very static and bare minimal, but efficient
*
* Copyright (c) 2003 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributio... |
////////////////////////////////////////////////////////////////////////////////
// __ _ _ _ //
// / _(_) | | | | //
// __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ... |
#undef NDEBUG
#include <stdint.h>
#include <lcthw/hashmap.h>
#include <lcthw/dbg.h>
#include <lcthw/bstrlib.h>
static int default_compare(void *a, void *b)
{
return bstrcmp((bstring)a, (bstring)b);
}
/**
* Simple Bob Jenkins's hash algorithm taken from the
* wikipedia description.
*/
static uint32_t default_hash(... |
#include "terminal.h"
#include <stdlib.h>
#if !defined(_WIN32) && !defined(_WIN64)
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#endif
#include <sys/socket.h>
#include "commands.h"
#include "init.h"
#include "transport.h"
#include "utils/log.h"... |
/*
* Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* ... |
/*----------------------------------------------------------------------------
* Copyright (c) <2016-2018>, <Huawei Technologies Co., Ltd>
* 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. R... |
/***************************************************************************//**
* @file
* @brief This file implements the autoack commands in RAILtest apps.
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_elements.c :+: :+: :+: ... |
#include <pthread.h>
//#include <cstdio>
//#include <cstdlib>
//#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define NUM_THREADS 3
#define COUNT 100
//typedef std::queue<int> IntQ;
// elements are "push"ed into the back,
// and "pop"ped from the front
//IntQ SendQ;
typedef enum {FALS... |
#include "url.h"
/* create the standard query uri's
*
* allocated memory gets freed in kraken_clean call */
int make_url(struct kraken_api **kr_data){
const char* domain = "https://api.kraken.com";
const char* api_version = "/0";
const char* api_private = "/private";
c... |
/*
* -------------------------------------------
* MSP432 DriverLib - v3_10_00_09
* -------------------------------------------
*
* --COPYRIGHT--,BSD,BSD
* Copyright (c) 2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* mod... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.o... |
#include "stm32g0xx_hal.h"
#include <string.h>
#include "RS485.h"
#include "error_handling.h"
#include "leds.h"
#include <stdlib.h>
#include <stdio.h>
#define TRANSMIT_BUFFER_SIZE 150
uint8_t my_alias = 255;
static char transmitBuffer[TRANSMIT_BUFFER_SIZE];
static volatile uint8_t transmitIndex = 0;
static volatile u... |
/** \addtogroup cc2538-examples
* @{
*
* \file
* /dev/sht21
* An example of a simple I2C use for the cc2538 and SHT21 sensor
* \author
* <NAME>
*/
#include <contiki.h>
#include "dev/i2c.h"
#include "sht21.h"
#include <stdio.h>
// #define DBG(...) printf(__VA_ARGS__)
#define DBG(...)
static uint16_t temp;
/... |
// scheduler_event
// try_to_wake_up
// recal
// schedule
//#include "thread_private.h"
typedef unsigned long s_time_t;
/*
* Default parameters:
* Period and budget in default is 10 and 4 ms, respectively
*/
#define RTDS_DEFAULT_PERIOD 10000
#define RTDS_DEFAULT_BUDGET 4000
/*
* Max period: max delta ... |
/*-
* Copyright (c) 1982, 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:
* 1. Redistributions of source code must retain the above copy... |
// Spot.c
// OpenGL SuperBible
// Demonstrates OpenGL Spotlight
// Program by <NAME>.
#include "../../common/openglsb.h" // System and OpenGL Stuff
// Rotation amounts
static GLfloat xRot = 0.0f;
static GLfloat yRot = 0.0f;
// Light values and coordinates
GLfloat lightPos[] = { 0.0f, 0.0f, 75.0f, 1.0f };
GLfloat ... |
//
// Copyright (c) 2014-2015, <NAME>, <EMAIL>
//
// 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, mer... |
/*
Copyright (c) 2013, The Linux Foundation. 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
notice, this list of co... |
/* Author: <NAME> <<EMAIL>>
* Date : May 2009
*
* Copyright 2010 Howard Hughes Medical Institute.
* All rights reserved.
* Use is subject to Janelia Farm Research Campus Software Copyright 1.1
* license terms (http://license.janelia.org/license/jfrc_copyright_1_1.html).
*/
#include <stdio.h>
#include <string.h... |
/*
* Copyright (c) 2014, 2015, 2016 Machine Zone, Inc.
*
* Original author: <NAME> <<EMAIL>>
*
* 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... |
struct hashTableNode {
int key;
int val;
struct hashTableNode *next;
} hashTableNode;
typedef struct {
struct hashTableNode **node;
int used;
int size;
} hashTable;
hashTable* hashCreate(int defaultSize) {
hashTable *ht = malloc(sizeof(hashTable));
// ht->node = malloc(sizeof(struct ha... |
/* Simple test of libev capabilities, with a focus on timers.
*
* Copyright (C) 2009 <NAME> <<EMAIL>>
*
* 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 all c... |
/* Copyright 2004,2007,2010,2011,2014,2018 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
**
** This software is governed by the CeCILL-C license under French law
** and abiding by the rules of distri... |
/*-
* Copyright (c) 2009-2015 <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 condit... |
// Buffer cache.
//
// The buffer cache is a linked list of buf structures holding
// cached copies of disk block contents. Caching disk blocks
// in memory reduces the number of disk reads and also provides
// a synchronization point for disk blocks used by multiple processes.
//
// Interface:
// * To get a buffer fo... |
/*
* Copyright (C) 2013-2016, The CyanogenMod Project
*
* 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 appli... |
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 <NAME>
**********/
#include "spice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "acdefs.h"
#include "devdefs.h"
#include "util.h"
#include "sperror.h"
int ACan(CKTcircuit *ckt, int restart)
{
double freq;... |
#include <gd.h>
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
void negate(gdImagePtr img, FILE *fdout, char *path)
{
fdout = fopen(path, "wb");
gdImageNegate(img);
gdImageBmp(img, fdout, 0);
fclose(fdout);
}
void edges(gdImagePtr img, FILE *fdout, char *path)
{
fdout = fopen(path, "wb");... |
/*
* Copyright 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, publish, distri... |
/*
* OpenBOR - http://www.LavaLit.com
* -----------------------------------------------------------------------
* All rights reserved, see LICENSE in OpenBOR root for details.
*
* Copyright (c) 2004 - 2011 OpenBOR Team
*/
// draw functions with 32bit pixel format, with alpha blending
#include <string.h>
#includ... |
/*
* rt_nonfinite.c
*
* Real-Time Workshop code generation for Simulink model "eng_mdl_demo_v1.mdl".
*
* Model Version : 1.181
* Real-Time Workshop version : 7.0.1 (R2007b+) 21-Apr-2008
* C source code generated on : Fri Jun 20 12:10:01 2014
*
*/
/*
* Abstract:
* Real-Time Workshop funct... |
/*
* Purpose: Test datetime conversion as well as dbdata() & dbdatlen()
* Functions: dbcmd dbdata dbdatecrack dbdatlen dbnextrow dbresults dbsqlexec
*/
#include "common.h"
static int failed = 0;
static void set_failed(int line)
{
failed = 1;
fprintf(stderr, "Failed check at line %d\n", line);
}
#define set_fail... |
#pragma once
#include <stdbool.h>
#include "mbedtls/bignum.h"
#include "mbedtls/ecp.h"
#include <dragonfly/df-cpp-begin.h>
typedef mbedtls_mpi df_mpint;
typedef mbedtls_ecp_point df_ec_point;
enum df_ec_group_id {
DF_EC_GROUP_UNDEFINED = 0,
DF_EC_GROUP_IKE_19 = 19,
DF_EC_GROUP_IKE_20 = 20,
DF_EC_GR... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include <string.h>
#include "api.h"
#include "stats.h"
int _lhc_rts_verbose = 0;
#define SIZE_BITS 12
#define SIZE_MASK ((1<<SIZE_BITS)-1)
// header: -
// 1|indirection|
// 0|size|tail|tag|
word _lhc_isIndirection(word ... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2011 The ChromiumOS Authors. 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 published by
* the Free Software Foundation; version 2 of the Lic... |
/*
* Copyright (c) [2019] Huawei Technologies Co.,Ltd.All rights reserved.
*
* LiteOS NOVA is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain a copy of Mulan PSL v1 at:
*
* http://license.coscl.org.cn/MulanPSL
*
* THIS SO... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#define CHK(cond, msg) if(cond){ perror("ERROR: " msg); return 1; }
char *gpio_path(char *envv... |
/*
ù## Copyright 2017 <NAME> <<EMAIL>>
## Copyright 2017 <NAME> <<EMAIL>>
##
## 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... |
/***************************************************************************
Midway 8080-based black and white hardware
****************************************************************************/
#define MW8080BW_MASTER_CLOCK (19968000)
#define MW8080BW_CPU_CLOCK (MW8080BW_MASTER_CLOCK / 10)
#define MW... |
/***************************************************************************
Jaleco color blend emulation
****************************************************************************
This implements the behaviour of color blending/alpha hardware
found in a small set of machines from the late 80's.... |
#include "usage_matrix.h"
#include "util.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
inline int usage_idx(struct usage_matrix *m, struct coordinate c) {
return (c.y * m->d.z * m->d.x) + (c.z * m->d.x) + c.x;
}
inline void usage_mark(struct usage_matrix *m, struct coordinate c) {
m->matrix[usage_... |
/*
* CAN_Functions.c
*
* Created on: 11 juli 2021
* Author: <NAME>
*/
/* Layer */
#include "../CAN Network/CAN_Network.h"
/* Platform independent library headers for CAN */
#if PROCESSOR_CHOICE == STM32
#include "main.h"
#include "../../../Functions.h" /* This is important for STM32 PLC - You can d... |
/* mycode2.c: your portion of the kernel
*
* Below are functions that are called by other parts of the kernel.
* Your ability to modify the kernel is via these functions. You may
* modify the bodies of these functions (and add code outside of them)
* in any way you wish (however, you cannot change t... |
/*
* board/renesas/alt/alt.c
*
* Copyright (C) 2014 Renesas Electronics Corporation
*
* SPDX-License-Identifier: GPL-2.0
*/
#include <common.h>
#include <malloc.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
#include <asm/errno.h>
#include <asm/arch/sys_proto.h>
#include <asm/gpio.... |
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadcom Inc. All rights reserved.
*/
/* Configure an entry in ESEM: outlif x VSI -> native AC-LIF
outlif must be a L2LIF
Should be used by PWE ta... |
/*
* Created 190126 lynnl
*/
#include "_u_char.h"
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h> /* memset(3) */
#include <unistd.h> /* close(2) */
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include <sys/errno.h> /* errno */
#include... |
/* scanner_ui.c
<NAME> (<EMAIL>), 14 Jul 2021
FreeBSD-style copyright and disclaimer apply
*/
#include "ui/ui.h"
// -----------------------------------------------------------------------------
// scanner
// -----------------------------------------------------------------------------
struct ui_scanner
{
... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "homekit/tlv.h"
#include "debug.h"
tlv_values_t *tlv_new() {
tlv_values_t *values = malloc(sizeof(tlv_values_t));
values->head = NULL;
return values;
}
void tlv_free(tlv_values_t *values) {
tlv_t *t = values->hea... |
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
struct weight {
char *value;
unsigned int sum;
};
struct weights {
struct weight *values;
size_t size;
};
static struct weights parse(const char *string);
static char *toString(struct weights weights);
static int compareWeights(const void... |
/*
* Copyright (c) 2015-2021 University of Antwerp, Aloxy NV, CORTUS SA.
*
* This file is part of Sub-IoT.
* See https://github.com/Sub-IoT/Sub-IoT-Stack for further info.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.... |
/******************************************************************************
* miniterm.c
*
* Adapted from the example program distributed with the Linux Programmer's
* Guide (LPG). This has been robustified and tweaked to work as a debugging
* terminal for Xen-based machines.
*
* Modifications are release... |
/****************************************************************************
*
* Copyright 2016 Samsung Electronics All Rights Reserved.
*
* 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... |
#include <stdint.h>
#pragma once
#define TH_KERNEL_CODE_SEGMENT 0x08
#define TH_KERNEL_DATA_SEGMENT 0x10
/* GDT Descriptor Flags */
/** The offset to be applied to check a type descriptor value. */
#define GDTD_CHECK_TYPE_OFFSET 0x40
/**
* @brief Set by the processor ... |
/* Copyright 2020 <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distribu... |
/** @file HL_sys_main.c
* @brief Application main file
* @date 07-July-2017
* @version 04.07.00
*
* This file contains an empty main function,
* which can be used for the application.
*/
/*
* Copyright (C) 2009-2016 Texas Instruments Incorporated - www.ti.com
*
*
* ... |
// Module for interfacing with adc hardware
#include "module.h"
#include "lauxlib.h"
#include "platform.h"
#include "CAN.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "esp_task.h"
#include "esp_log.h"
#include <string.h>
#include "task/task.h"
CAN_device_t CAN_c... |
/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford
* Junior University
*
* We are making the OpenFlow specification and associated documentation
* (Software) available for public use and benefit with the expectation
* that others will use, modify and enhance the Software and contribute
* tho... |
/*
* Copyright (c) 2005-2009, <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:
* * Redistributions of source code must retain the above copyright
* notice, this list of con... |
/* The MIT License (MIT)
*
* Copyright (c) 2018 Monetra Technologies, LLC.
*
* 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 righ... |
/* windows TermIO for MPlayer (C) 2003 <NAME> */
// See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
// for additional virtual keycodes
#include "config.h"
#include <stdio.h>
#include <windows.h>
#include "keycodes.h"
#inclu... |
/*
* IBM Vital Product Data decoder
*
* Copyright (C) 2003-2007 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at you... |
/*************************************************************************
* test-chamfer-pnm.c - example program of chamfer distance computation
*
* $Id: test-chamfer-pnm.c,v 1.6 2006/04/14 08:38:55 greg Exp $
*
* Copyright (c) INRIA 1999
*
* DESCRIPTION:
*
* Input must be of PBM/PGM/PPM raw format, output w... |
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is d... |
/*
* linux/mm/vmalloc.c
*
* Copyright (C) 1993 <NAME>
*/
#include <asm/system.h>
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/malloc.h>
#include <asm/segment.h>
s... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/mman.h>
#define VERSION "0.1"
int interrupted = 0;
void signal_handler(int sig)
{
interrupted = 1;
}
int main(int argc, char *argv[]) {
FILE *fd=NULL;
int mfd, i;
uint32_t wo;
... |
/*
Copyright (C) 2014 <NAME>
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
notice, this list of conditions and the following discla... |
/*************************************************
*
* Copyright 2016 <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
*
* U... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <getopt.h>
#include "automata.h"
#define ERROR_LECTURA -1
#define ERROR_LEC_INT 1
#define MAXIMO_ARCHIVO 100
#define REGLA_30 30
#define REGLA_110 110
#define REGLA_126 126
const char VERSIO... |
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <err.h>
#include <getopt.h>
#include "longgetopt.h"
static void
permute(struct longgetopt* context)
{
char* swap;
size_t count = context->_optend - context->optind;
if(count > 0) {
... |
#include <pcode_definitions.h>
void less(machine_state *ms) {
fprintf(stderr, "\n\nLESS\n\n");
Vector *a = cMemory_load_le(ms, 0x4, 1);
Vector *b = cMemory_load_le(ms, 0x8, 1);
Vector *c = pINT_LESS(ms, a, b);
cMemory_store_le(ms, 0x0, c, 1);
vec_release(ms, a);
vec_release(ms, b);
vec_release(ms, c);... |
/*
filetime.c
Conversion of file time and date values to various other types
Copyright (c) 2006 Michael "Chishm" Chisholm
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 retai... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include "output.h"
#include "wgetlite.h"
#include "ftp.h"
#include "util.h"
#define WRITE(fd, str) write(fd, str, strlen(str))
#define FTP_FILE_STATUS 213
#define FTP_ENTER_PASSIVE_MODE 227
#define FTP_PRO... |
#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... |
////////////////////////////////////////////////////////////////////////////////
///
/// @file EM100.c
///
/// @project
///
/// @brief EM100 Debug Routines
///
////////////////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////... |
/*====================================================================================
EVS Codec 3GPP TS26.443 Oct 20, 2015. Version 12.4.0
====================================================================================*/
#include <math.h>
#include "options.h"
#include "prot.h"
/*-------------------------... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 by <NAME> <<EMAIL>>
*
* 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
*... |
#include "types.h"
#include "stat.h"
#include "fcntl.h"
#include "user.h"
#include "x86.h"
#define STRALIGN(x) (((unsigned long)x&7)?8-((unsigned long)x&7):0)
#define UNALIGNED(x,y) (((unsigned long)x & (sizeof (unsigned long)-1)) ^ ((unsigned long)y & (sizeof (unsigned long)-1)))
char *
strncpy(char *dest,char *src, i... |
#include <stdio.h> // printf
#include <stdlib.h> // malloc, free
#include <stdint.h> // int64_t
#include <inttypes.h> // PRIi64
#include <string.h> // strtok, memcpy
#include <stdbool.h>
#define MEMSIZE (32) // number of lines in input
#define REGBASE ('a')
#define REGSTOP ('h')
#define REGSIZE (REGSTO... |
/* nbdkit
* Copyright (C) 2013-2020 Red Hat Inc.
*
* 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
* notice, this list of conditions and the f... |
/*
* Copyright (c) 2013 <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 conditions an... |
#include<stdio.h>
#include<conio.h>
char arr[9]={'1','2','3','4','5','6','7','8','9'};
char p1='O',p2='X',res='y',ch[2]={'\0', '\0'}; //desired symbols for each player
int result=0; //0 for in progress
//1 for p1 win
//2 for p2 win
void display(void) /*displays the current matrix*/
{
printf("\... |
#include "stm32f4xx.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_gpio.h"
#include <stdio.h>
static void init_systick();
static void delay_ms(uint32_t n);
static volatile uint32_t msTicks; // counts 1 ms timeTicks
static volatile uint32_t cp, cr;
void initialise_monitor_handles(void);
//define struct _TimedT... |
/* site:https://github.com/daishitong/51lib */
#include "MidiBuzzer.h"
#include "core\T2_delay.h"
#include "core\Timer.h"
#define HalfUsPerSecond 500000
#define ToneFrequent_L_1Do 262
#define ToneFrequent_L_2Re 294
#define ToneFrequent_L_3Mi 330
#define ToneFrequent_L_4Fa 349
#define ToneFrequent_L_5So 392
#define T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.