text stringlengths 3.12k 18.7k |
|---|
/*
* linux/fs/minix/file.c
*
* Copyright (C) 1991, 1992 <NAME>
*
* minix regular file handling primitives
*/
#include <asm/segment.h>
#include <asm/system.h>
#include <linux/sched.h>
#include <linux/minix_fs.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/fcntl.h>
#include <linux/stat.h... |
/*
* Copyright (c) 2016 Dynamic Weather Solutions, Inc. Distributed under the
* terms of the MIT license.
*
* 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, includin... |
/*
============================================================================
Name : displayYUV.c
Author : mpelcat & kdesnos & jheulot
Modified by : jserot (for use in the HoCL framework)
Version :
Copyright : CECILL-C
Description : Displaying YUV frames one next to another in a row
================... |
#include <stdio.h>
#include <math.h>
#include <cpodes/cpodes.h>
#include <cpodes/cpodes_dense.h>
#include <nvector/nvector_serial.h>
#include <sundials/sundials_math.h>
#define Ith(v,i) NV_Ith_S(v,i-1)
#define TOL RCONST(1.0e-5)
#define TOL_REF RCONST(1.0e-14)
static int fref(realtype t, N_Vector yy, N_Vector fy... |
/*------------------------- Header Files --------------------------*/
#include "types.h"
#include "user.h"
#include "fcntl.h"
/*--------------------- MACROS -----------------------*/
#define EXEC 1
#define BACK 5
#define MAXARGS 10
/*------------------------------- Global Variables and function declarations -------... |
#include <injector.h>
#include <bridge_deployer.h>
#include <logger.h>
#include <qt_version_info.h>
#include <md5.h>
#include <utils.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef BINARIES_PACKAGED_HEADER_AVAL
#include <libqxcb_5_6_0.h>
#include <libqxcb_5_7_0.h>
#include <libqxcb_5_8_0.h>
#inclu... |
/*
* audio filter for runtime AC-3 encoding with libavcodec.
*
* Copyright (C) 2007 Ulion <ulion <EMAIL> com>
*
* This file is part of MPlayer.
*
* MPlayer 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 Foundati... |
/*
* "git mv" builtin command
*
* Copyright (C) 2006 <NAME>
*/
#include "cache.h"
#include "builtin.h"
#include "dir.h"
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
static const char * const builtin_mv_usage[] = {
N_("git mv [options] <source>... <destination>"),
NULL
};
static co... |
/*
kRtspProxyd
General useful functions
*/
/****************************************************************
* 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, or (at your o... |
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* Slowloris with a twist over tor
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* Due to the alpha version of this code being leaked I've decided
* to release an improved version to fully show this method of
* attac... |
/* $OpenBSD: res_search_async.c,v 1.21 2017/02/27 10:44:46 jca Exp $ */
/*
* Copyright (c) 2012 <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... |
/*
* $Id: mech.mechref_ident.c,v 1.1.1.1 2005/01/11 21:18:18 kstevens Exp $
*
* Author: <NAME> <<EMAIL>>
*
* Copyright (c) 1996 <NAME>
* Copyright (c) 1998-2002 <NAME>
* Copyright (c) 2000-2002 <NAME>
* All rights reserved
*
* Created: Tue Sep 17 18:08:13 1996 fingon
* Last modified: Sun Jan 12 13:... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2010 Advanced Micro Devices, 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; version 2 of the License.
*
* This ... |
//------------------------------------------------------------------------------
// blend-sapp.c
// Test/demonstrate blend modes.
//------------------------------------------------------------------------------
#include <assert.h>
#include "sokol_app.h"
#include "sokol_gfx.h"
#include "sokol_glue.h"
#define HANDMADE_... |
/* Copyright (c) 2019 Arm Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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 requ... |
#include "basic.h"
#include <string.h>
#include <errno.h>
/*
* Function: extract_cmd
* ----------------------------------------------
* Read the first word of the string, skipping eventually blank
* spaces before the word.
* This function is independent from calculator char size.
*
* Parameters:
* line: t... |
#include <stdlib.h>
#include <notcurses/notcurses.h>
#define GIG 1000000000ull
static const uint32_t LOWCOLOR = 0x004080;
static const uint32_t HICOLOR = 0xddffdd;
static const uint32_t NANOSEC = GIG / 60; // 60 cps
static const int FRAMERATIO = 2; // display 1 of every FRAMERATIO frames
#define MARGIN 2
static struc... |
/********************************************************************
Copyright 2010-2017 <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... |
#ifndef _REENTRANT
#define _REENTRANT
#endif
/* includes */
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <math.h>
#include <time.h>
#include <sys/times.h>
#include <sys/stat.h>
/* defines */
#define MAX_BODIES 1000000
#define MAX_STEPS 500000
#define MAX_SIZE 1000000
#defin... |
/* @(#) client/server context implementation
*
* Copyright 2008-2011 <NAME> (<EMAIL>)
*
* This file is part of udpxy.
*
* udpxy 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 t... |
/*********************************************************************
*
* Atmel Corporation
*
* File : USI_TWI_Slave.c
* Compiler : IAR EWAAVR 4.11A
* Revision : $Revision: 1.14 $
* Date : $Date: Friday, December 09, 2005 17:25:38 UTC $
* Updated by : $Author: jtyssoe... |
#include "map.h"
#include <stdio.h>
#include <stdlib.h>
#include <curses.h>
#include <math.h>
#define MAX_ROWS 10
#define MAX_COLUMNS 10
#define PATH ' '
#define BASE '~'
#define BOUNDARY '#'
#define PLAYER 'P'
#define WORK 'W'
#define BOUNDARY_C 1
#define ROAD_C 2
#define UI_TIME 3
#define ENEMIES 4
struct Point ... |
/*
* Tencent is pleased to support the open source community by making IoT Hub available.
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the L... |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
*
* Test atomic stack operat... |
/* Copyright (c) 2007-2008 CSIRO
Copyright (c) 2007-2009 Xiph.Org Foundation
Written by <NAME> */
/**
@file pitch.c
@brief Pitch analysis
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- R... |
#include "memory.h"
#include "driver/device.h"
#include "log.h"
#include <fcntl.h>
#include <linux/limits.h>
#include <linux/mman.h>
#include <linux/vfio.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include "libixy-vfio.h"
// we want one VFIO Container f... |
/* Copyright 2013 <NAME>
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 distributed in the hope tha... |
/*****************************************************************************
* hxxx_sei.c: AVC/HEVC packetizers SEI handling
*****************************************************************************
* Copyright (C) 2001-2016 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it ... |
#include "../../common.h"
#include "../../vendor/murmur3.h"
#include "../../dss/hash.h"
#include <stdio.h>
#include <stdlib.h>
#include "rte_atomic.h"
#include "rte_malloc.h"
#include "rte_memcpy.h"
#include "countheap.h"
#include "common.h"
struct CountHeap
{
uint32_t rowsize;
uint32_t capacity;
uint32_t... |
/* Wrapper functions for common socket / network operations */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "socklib.h"
#include "sql.h"
#includ... |
/*
* Copyright (C) 2004, 2007, 2009, 2013 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* 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... |
/*************************************************************************
*
* file: wmem.c
*
* =======================================================================
* These are the working memory management routines and utility functions
* for Soar working memory elements.
* ==============================... |
/* Effect module for libuade.
Copyright 2005 (C) <NAME> <<EMAIL>>
This module is licensed under the GNU LGPL.
*/
#include <uade/effects.h>
#include <uade/uadestate.h>
#include <uade/compilersupport.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#define _USE_MATH_DEFINES
#in... |
/*
* I2CS.c
*
* I2C client
*
* This software is covered by a modified MIT License, see paragraphs 4 and 5
*
* Copyright (c) 2019 <NAME>
* Copyright (c) 2021 m5evt
*
* 1. Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation fi... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <errno.h>
#include "queue.h" // freebsd sys/queue.h
#include "tree.h" // freebsd sys/tree.h
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <GL/gl3w.h>
#ifdef __APPLE__
#define glutInitContex... |
#include "confuse.h"
#include <string.h>
void print_func(cfg_opt_t *opt, unsigned int index, FILE *fp)
{
fprintf(fp, "%s(foo)", opt->name);
}
void print_ask(cfg_opt_t *opt, unsigned int index, FILE *fp)
{
int value = cfg_opt_getnint(opt, index);
switch (value) {
case 1:
fprintf(fp, "yes");
break;
case 2:
... |
/* $NetBSD: pci_vga.c,v 1.8 2002/04/09 13:16:09 leo Exp $ */
/*
* Copyright (c) 1999 <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... |
#include "pong_header.h"
#include <stdio.h>
void updatePaddlesForEvent(const ALLEGRO_EVENT * const event, Paddle *left_pad){
// right side
int UP_KEY = ALLEGRO_KEY_UP;
int DOWN_KEY = ALLEGRO_KEY_DOWN;
// if left side
if(left_pad->side == LEFT){
UP_KEY = ALLEGRO_KEY_W;
DOWN_KEY = ALLEGRO_KEY_S;
}
... |
/*! @file setgame.c
Affect game state from command line, pause, resume and terminate,
plus test functions.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <ctype.h>
#include <signal.h>
#include <string.h>
#include "defs.h"
#include "struct.h"
#include "data.h"
#includ... |
// :vim ts=4 sw=4 noet:
/*
==================================================================================
Copyright (c) 2019 Nokia
Copyright (c) 2018-2019 AT&T Intellectual Property.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lice... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public Lic... |
#include "oled.h"
#include "fonts.h"
volatile char* OLED_CMD_BASE_ADDR = (char*) 0x1000;
volatile char* OLED_DATA_BASE_ADDR = (char*) 0x1200;
#define PAGES 8
#define ROWS 64
#define COLS 128
uint8_t curr_row;
uint8_t curr_col = 0;
uint8_t curr_page = 0;
menu_level* curr_node = NULL;
uint8_t row_mask[PAGES] = {0};
... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file PWR/PWR_STOP1/Src/main.c
* @author MCD Application Team
* @brief This sample code shows how to use STM32L5xx PWR HAL API to enter
* and exit the STOP1 mode with a wakeup pin o... |
/*
* dis-cil.c: Disassembles CIL byte codes
*
* Author:
* <NAME> (<EMAIL>)
*
* (C) 2001 Ximian, Inc.
*/
#include <config.h>
#include <glib.h>
#include <stdio.h>
#include <math.h>
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif
#include "meta.h"
#include "get.h"
#include "dump.h"
#include "dis-cil.h"
#include "mo... |
/*++
/* NAME
/* error 8
/* SUMMARY
/* Postfix error mail delivery agent
/* SYNOPSIS
/* \fBerror\fR [generic Postfix daemon options]
/* DESCRIPTION
/* The Postfix error delivery agent processes delivery requests from
/* the queue manager. Each request specifies a queue file, a sender
/* address, a domain or host name th... |
//This program contains some operations in blocking mode.
//read in reader and scanf in writer fuction is in blocking mode is not coming out on the command so can't quit program using SIGQUIT signal.
#include <stdlib.h>
#include <stdio.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sy... |
/* plotDataMatrix - Create an image showing a matrix of data values.. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "options.h"
#include "sqlNum.h"
#include "vGfx.h"
#include "memgfx.h"
struct vGfx *vgOpenGif(int width, int height, char *fileName, boolean useTransparency);
static char const ... |
/* Feature : Cpu Tx Proc DGPP
*
* Usage : BCM.0> cint cpu_tx_proc_dgpp.c
*
* config : cpu_tx_proc_config.bcm
*
* Log file : cpu_tx_proc_dgpp_log.txt
*
* Test Topology :
*
* +------------------------------+ ingress_port
* | +-------... |
/* BEGIN_ICS_COPYRIGHT5 ****************************************
Copyright (c) 2015-2017, Intel Corporation
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 copyrig... |
/*
* Test code for lib/command.c
*
* Copyright (C) 2013 by Open Source Routing.
* Copyright (C) 2013 by Internet Systems Consortium, Inc. ("ISC")
*
* This program reads in a list of commandlines from stdin
* and calls all the public functions of lib/command.c for
* both the given command lines and fuzzed versio... |
#include "mod_commandline.h"
void TC_check_parameters(int argc, char *argv[])
/* based on a unix getopt liblary. For specific information
* consult 'man 3 getopt'. Structure "option" is already
* declared in getopt.h */
{
int op=0,op_tmp;
int *optindex=&op_tmp;
int flags[10] = {0,0,0,0,0,0,0,0,0,0};
... |
/*
* 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 under the Apache License, Version 2.0 (the
* "License"); you ... |
/*
* Copyright © 2017-2019 The OpenEBS Authors
*
* 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 a... |
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <time.h>
#define bool int
// Function returns floor of square root of x
int floorSqrt(int x)
{
// Base cases
if (x == 0 || x == 1)
return x;
// Staring from 1, try all numbers until
// i*i is greater than or equal to x.
int i... |
//
// player.c
//
// プレイヤーオブジェクト管理
//
// by <NAME>
//
#include "gba.h"
#include "player.h"
#include "sprite.h"
#include "screen.h"
#include "enemy.h"
#include "item.h"
#include "game.h"
/*
画像データ
Gritで色深度8bit(=1Byte)、8bit(=1Byte, char)配列でタイルマップを作成
grit ./resouce/chr.png -o ./source/chr.h -gt -gB8 -ftc -gu8... |
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glx.h>
#include <GL/glxext.h>
#include <err.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "blur.h"
extern Display *display;
#if DEBUG_GL
void printShaderInfoLog(GLuint obj) {
int infologLe... |
/* bkerndev - Bran's Kernel Development Tutorial
* By: <NAME>. (<EMAIL>)
* Desc: Keyboard driver
*
* Notes: No warranty expressed or implied. Use at own risk. */
#include "common.h"
#include "monitor.h"
#include "isr.h"
#include "type.h"
#include "utils.h"
#include "term.h"
#define RSHIFT 0x36
#define LSHIFT 0x2A... |
/*
* Copyright (c) 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, dis... |
/*
* Copyright (c) 2006-2013 <NAME> <<EMAIL>>
*
* Department of Computer Sciences, www.cs.uni-salzburg.at
* University of Salzburg, www.uni-salzburg.at
*
*/
/*
* 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
* ... |
//
// main.c
// TwoBitDisplay library test program
// Demonstrates many of the features for LCD displays
//
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <math.h>
#include <time.h>
#include <a... |
/*******************************************************************************
* - FILE: work_etc.c
* - DESC: Pipelines Workflow Subroutines.
* WORK interfaces between pipeline WORKER object and various functions.
* Various uncategorized functions.
******************************... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include "log.h"
#include "packet.h"
#include "spiffy.h"
#include "debug.h"
#define BYTE_SIZE_1 1
#define BYTE_SIZE_2 2
#define BYTE_SIZE_4 4
/* Static Function Declarations */
static void serialize_payload(Packet *p, uint8_t *buffer);... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Objectify, a tiny COFF file generator (like objcopy for Linux, but not as full-featured)
// This converts any file to a COFF format so you can link it to a binary file and use it from your c code
//
// Once the COFF file is created, you will have access to ... |
/*
* Memory arbiter functions. Allocates bandwidth through the
* arbiter and sets up arbiter breakpoints.
*
* The algorithm first assigns slots to the clients that has specified
* bandwidth (e.g. ethernet) and then the remaining slots are divided
* on all the active clients.
*
* Copyright (c) 2004, 2005 Axis Co... |
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*... |
/*
* Copyright 2016 <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 required by applicable law or... |
/*
* TrieStruct.c
*
* Created on: Apr 30, 2014
* Author: gioulisapo
*/
#include "TrieStruct.h"
#include "HelpFunct.h"
#include <stdlib.h>
#include <string.h>
#include <err.h>
#include <stdio.h>
#include <stdio.h>
TriePtr InitialiseTrie(FILE *fp)
{
TriePtr root;
root = malloc(sizeof(TrieNode)); /... |
/*-
* Copyright (c) 2008 <NAME> <<EMAIL>>
* All rights reserved.
*
* Portions of this software were developed under sponsorship from Snow
* B.V., the Netherlands.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are me... |
#include "common.h"
const int TIMEOUT_IN_MS = 500;
struct context {
struct ibv_context *ctx;
struct ibv_pd *pd;
struct ibv_cq *cq;
struct ibv_comp_channel *comp_channel;
pthread_t cq_poller_thread;
};
static struct context *s_ctx = NULL;
static pre_conn_cb_fn s_on_pre_conn_cb = NULL;
static connect_cb_fn s_on_... |
/*
* File: main.c
* Author: kanderson
*/
#include <xc.h>
#include <stdbool.h>
// PIC16F627A Configuration Bit Settings
#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog ... |
/* Copyright 2013-present Barefoot Networks, Inc.
*
* 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 la... |
/*
Copyright(c) 2010-2015 Intel Corporation.
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... |
/* MDH WCET BENCHMARK SUITE. File version $Id: fdct.c,v 1.2 2005/11/11 10:30:07 ael01 Exp $ */
/*
*********************************************************************************************************
* FDCT.C *
*... |
#include "ListaCircular.h"
#include "ListaLigada.h"
#include <locale.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
//prototype to solve conflicting types
PONT_C sortearSoldado(LISTA_CIRCULAR* a, PONT_C* b);
void iniciarJogo(LISTA_CIRCULAR *soldados, LISTA_LIGADA *azarados, int valorT) {
int chan... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#define min(a, b) ((a < b) ? (a) : (b))
#define max(a, b) ((a > b) ? (a) : (b))
#if 0 //DEBUG
#define dprintf printf
#else
#def... |
#include <stdio.h>
#include <math.h>
void printArray(int *A, int len) {
for(int i = 0; i < len; i++) {
printf("%d ", A[i]);
}
}
void swap(int *A, int i, int j) {
int tmp = A[i];
A[i] = A[j];
A[j] = tmp;
}
/**
* sorting problme
* input: <a1, a2, ..., an>
* output: <a1`,a2`,...,an`> is a r... |
/*******************************************************************************
* *
* prefFile.c -- Nirvana utilities for providing application preferences files *
* *
* Copyright (c) 1991 Universities Research Association, Inc. *
* All rights reserved. *
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <pwd.h>
char* printPerm(char *file){
struct stat st;
char* ret=malloc(sizeof(char)*9+1);
if(stat(file, &st) == 0)
{
ret[0] = (st.st_mode & S_IRUS... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <assert.h>
#include <netinet/in.h>
#include <netdb.h>
#include <fcntl.h>
#include <linux/bpf.h>
#include <linux/filter.h>
#include "../bpf_load.h"
//#include <bp... |
/*
* Copyright (c) 2013-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* 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/... |
/* $OpenBSD: mfs_vfsops.c,v 1.50 2016/04/26 18:37:03 natano Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
/*
* Copyright (c) 1989, 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi... |
/*
* libusb-winusb-bridge.c
*
* Simple backend for libusb using MS WinUsb. Only the basic functions
* necessary for apcupsd are implemented, although the others could be added
* fairly easily.
*/
/*
* Copyright (C) 2010 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it unde... |
#include "gaudry.h"
#define init gaudry_init
#define hadamard gaudry_hadamard
#define mult gaudry_mult
#define square gaudry_square
#define recip gaudry_recip
#define select gaudry_select
#define todouble gaudry_todouble
#define fromdouble gaudry_fromdouble
#define surface_specify gaudry_surface_specify
#define mainlo... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <stdbool.h>
#include <limits.h>
#include <float.h>
// HEADER
enum movementDecision {LEFT, LEFT_FLAGGED, RIGHT, RIGHT_FLAGGED, UP};
typedef struct point Point;
struct point {
int x;
int y;
};
typedef struc... |
/******************************************************************************
* *
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except ... |
/*
* Copyright (c) 2020 <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 notice,
* this list of conditions and the following d... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int n , m;
int raw[100][20];
int raw_length[100];
int tail[100][20];
unsigned long long int** cube;
unsigned long int cube_len[100];
int * filled;
int** used;
const unsigned long long int ONE = 1;
typedef struct {
int length;
unsigned long long int mask[2]... |
//*******************************************************************
//Author: <NAME>, <NAME>
//Description: radv9 Header File
//*******************************************************************
//Regsiter 0
typedef union radv9_r0{
struct{ // LSB First
unsigned RADIO_TUNE_POWER : 5;
unsigned RADIO_TUNE_FR... |
/*
* Simulate an I2C real time clock
*
* Copyright (c) 2015 Google, Inc
* Written by <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
/*
* This is a test driver. It starts off with the current time of the machine,
* but also supports setting the time, using an offset from the current
* clock. This d... |
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "PKIX1Explicit88"
* found in "rfc3280-PKIX1Explicit88.asn1"
* `asn1c -S asn1c/skeletons -pdu=all -pdu=Certificate -fwide-types`
*/
#include "PDSParameter.h"
static const int permitted_alphabet_table_2[256] = {
0, 0, 0, 0, 0, 0, 0, 0... |
/*
* Unsquash a squashfs filesystem. This is a highly compressed read only filesystem.
*
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
* <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 publish... |
/*
* fwbuf.c
* Copyright (C) 2016 dershokus <<EMAIL>>
*
* Distributed under terms of the MIT license.
*/
#include <fwbuf.h>
#include <stdbool.h>
#include "fwbuf_node.h"
void fwbuf_clip(struct fwbuf *buf, struct fwbuf_node *node)
{
assert(buf != NULL);
assert(node != NULL);
// TODO: check... |
/*
* Program to unsqueeze files formed by sq.com
*
* Formerly written in BDS C and quite pupular as a CP/M tool
* in the earlier eighties.
*
* Ported to modern c compilers and z88dk by <NAME>
*
*
* $Id: usq.c,v 1.2 2012/03/29 15:28:36 stefano Exp $
*
* ---------------------------------------... |
/*******************************************************************************
* File Name: Slider_TunerHelper.c
* Version 3.50
*
* Description:
* This file provides the source code of Tuner helper APIs for the CapSense CSD
* component.
*
* Note:
*
******************************************************************... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "main.h"
#include "config.h"
#include "random.h"
#include "processing.h"
int main() {
struct Configuration conf = read_config_file("CONFIG.ini");
srand(conf.SEED);
int current_time = conf.INIT_TIME;
int job_number = 1;
// Create and initi... |
/*
* ddbridge-regs.h: Digital Devices PCIe bridge driver
*
* Copyright (C) 2010-2011 Digital Devices GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation.
*
*
* This p... |
/*
Copyright (C) 2003-2006 <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, merge, publish, dis... |
/*
* config_auth.c : authentication files in the user config area
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for addition... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.