text stringlengths 3.08k 10.5k |
|---|
/**
* partytime@joes shell interface program.
*
* Last Modifed September 18th 2015
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#define MAX_LINE 80 /* 80 chars per line, per command */
typedef struct Node
{
char *data;
struct Node *ne... |
/*
* Copyright © 2017 Astonish Inc. All Rights Reserved.
*
* Main source file for communicationg with AWS IoT.
*
* Mostly taking from AWS example published by Amazon, modified as needed.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance wit... |
/*
* Copyright (c) 2009-2015 <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 (c) 2002-2019 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* 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.... |
#import "kern_utils.h"
#import "kmem.h"
#define MAX_CHUNK_SIZE 0xFFF
void remote_read_overwrite(mach_port_t task_port,
uint64_t remote_address,
uint64_t local_address,
uint64_t length) {
kern_return_t err;
mach_vm_size_t out... |
#include <ctype.h>
#include <string.h>
#include "loader.h"
#include "token.h"
static int isEOL;
static int isEOF;
static char* ReadWord(FILE* fp) {
if(isEOF) {
return NULL;
}
char c;
while(isspace(c = fgetc(fp)));
ungetc(c, fp);
isEOL = 0;
long int pos = ftell(fp);
int i = 0;
while(... |
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include "elfs.h"
#include "log.h"
#include "misc.h"
#include "libfs.h"
#define ELF_DEFAULT_LIBPATH "/usr/lib/"
#define LD_SO_CONF "/etc/ld.so.conf"
static telf_status
libfs_open(char *path,
telf_open_flags flags,
void **objp)
{
... |
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <setjmp.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#define KB 1024
#define ROUNDS 100
#define REPEAT 4
#define STATIC_EARLY_EXIT 10
#define PROBE_PAGES 256
#define PROBE_... |
/*
* Copyright (c) 2003, 2007-14 <NAME>
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* 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 Licens... |
/* Created RJudd March 19, 1999 */
/* SPAWARSYSCEN D881 */
/**********************************************************************
// For TASP VSIPL Documentation and Code neither the United States /
// Government, the United States Navy, nor any of their employees, /
// makes any warranty, express or implied, in... |
/*
* Copyright (c) 2014-2015 Google, Inc.
* 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 conditio... |
#include "triangles_library.h"
//function to transform coo format to csc format
void coo2csc(
uint32_t * const row, /*!< CSC row start indices */
uint32_t * const col, /*!< CSC column indices */
uint32_t const * const row_coo, /*!< COO row indices */
uint32_t const * const col_coo, ... |
/*!
\file main.c
\brief TIMER2 oc inactive demo for gd32e50x
\version 2020-03-10, V1.0.0, firmware for GD32E50x
\version 2020-08-26, V1.1.0, firmware for GD32E50x
\version 2021-03-23, V1.2.0, firmware for GD32E50x
*/
/*
Copyright (c) 2021, GigaDevice Semiconductor Inc.
Redistribution... |
/**
******************************************************************************
* @file lib_NDEF_Text.h
* @author MMY Application Team
* @version $Revision: 3210 $
* @date $Date: 2016-12-05 15:37:48 +0100 (Mon, 05 Dec 2016) $
* @brief This file help to manage Text NDEF file.
*****************... |
/* ocsp_ht.c */
/* Written by Dr <NAME> (<EMAIL>) for the OpenSSL
* project 2000.
*/
/* ====================================================================
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are pe... |
/* eth_sock_line.c: Ethernet sockets line
------------------------------------------------------------------------------
Copyright (c) 2014, <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 S... |
/* $Id$ */
/*
* Copyright (c) 2016 <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 A... |
/* pdp8_lp.c: PDP-8 line printer simulator
Copyright (c) 1993-2011, <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
... |
void pointDefineWillRun (void) {
enableTimer1InterruptForVideoProMode();
steps=0;
stepsPlus=0;
stepsMinus=0;
}
void defineDurationInterval (void) {
_debugln ("defineDurationInterval");
_debugln ("----------------------");
_debug ("stepsToMove: "); _debugln (stepsToMove);
maxDuration = abs(stepsToMove) / minSp... |
/* ====================================================================
* Copyright (c) 2003 The OpenSSL Project. 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 ... |
/*
* Copyright (c) 2008-2009 Apple Inc. All rights reserved.
*
* @APPLE_APACHE_LICENSE_HEADER_START@
*
* 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/l... |
//
// GPT (GUID Partition Table) declarations.
//
//
// DO WE EVER ALLOW GPT_TABLEs TO NOT BE PACKED UP AGAINST THEIR HEADER?
// IF NOT, DO WE ALLOW PEOPLE TO MAKE ASSUMPTIONS ABOUT THEIR LOCATION?
// DO WE NEED THE POINTER?
//
//
// Rules:
// None of these structures ever appear at LBA 0, because
... |
/*
Copyright (c) 2009 <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... |
#include "spi_low.h"
MadBool spiInit(SPIPort* port, SPIPortInitData* initData)
{
SPI_InitTypeDef spi;
GPIO_InitTypeDef pin;
NVIC_InitTypeDef nvic;
uint16_t spi_data_width;
uint32_t dma_p_data_width, dma_m_data_width;
switch (initData->dataWidth) {
case SPI_DW_8Bit:
spi_... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "cqc.h"
#include "test.h"
/*
* cqc_tomography_dir
*
* Obtain tomographic data for a prepared qubit, for testing purposes.
*
* Arguments:
* func function to call to prepare qubit for tomography
* iter iterations to perform
* dir ... |
/**
******************************************************************************
* @file CMD_Analysis.c
* @author MGDG
* @version V1.0.0
* @date 2017-08-09
* @brief
******************************************************************************
**/
#include "CMD_Analysis.h"
#include "CMD_Hand... |
/*********************************************************************
* DDS demo code
* sine synth to SPI to MCP4822 dual channel 12-bit DAC
*********************************************************************
* Bruce Land Cornell University
* Sept 2017
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
//**********************************************************************;
// Copyright (c) 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:
//
// 1. Redistributions of s... |
/*
* (C) 2002 Clemson University and The University of Chicago
*
* See COPYING in top-level directory.
*/
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <trove.h>
#include <getopt.h>
#include "trove-test.h"
char storage_space[SSPACE_SIZE] = "/tmp/trove-test-space";
char file_system[FS_SIZE] ... |
/*
* 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 usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct node_t {
int value;
struct node_t *next;
};
struct list_t {
struct node_t *head;
};
struct note_t {
char message[20];
};
struct board_t {
struct note_t notes[10];
int notes_on_board;
};
struct calendar_t {
int events_count[52];
};
int... |
#include<stdio.h>
#include<string.h>
#include<time.h>
#include<process.h>
#include<conio.h>
#include<time.h>
#include<ctype.h>
#include<stdlib.h>
#define MAXCHAR 1000
//This is a basic quiz application that uses concepts like file handling, OOPS, random, map etc.
//Developed by RAJKUMAR
struct problem
{
... |
#define HOME_DEN_SCORE 50
#define DEN_SCORE 25
#define BRIDGE_SCORE 10
#define TEMPLE_SCORE 30
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "lizards.h"
#include "lizmisc.h"
static void calculate_points (world_t *world)
{
int i, x, y, *lizard_heads;
hex_... |
#include <stdio.h>
#include <stdlib.h>
#include <iup.h>
/* global variable - to be used inside the menu callbacks */
Ihandle* multitext = NULL;
char* read_file(const char* filename)
{
int size;
char* str;
FILE* file = fopen(filename, "rb");
if (!file)
{
IupMessagef("Error", "Can't open file: %s", filen... |
/*
Copyright (c) 2012 <NAME>, <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 conditions and the following d... |
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
Basic demonstration of how to use select Logging APIs.
*/
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
#include <os/log.h>
size_t find_largest_file(const char *dirpath, char ... |
/*
CF3
Copyright (c) 2015 ishiura-lab.
Released under the MIT license.
https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md
*/
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include"test1.h"
static int8_t x9 = 1;
static volatile uint64_t x261 = UINT64_MAX;
volatile int32_t x333 = 197757;
int32_t x544... |
/*
* GLUT Shapes Demo
*
* Written by <NAME> 2003
*
* This program is test harness for the sphere, cone
* and torus shapes in GLUT.
*
* Spinning wireframe and smooth shaded shapes are
* displayed until the ESC or q key is pressed. The
* number of geometry stacks and slices can be adjusted
* using the + and -... |
#include "../../../include/gfx/renderer/tile_renderer.h"
#include "../../../include/stb_image.h"
struct tile_renderer {
const char *atlas_path;
int atlas_width;
int tile_width;
struct render_tile map[CHUNK_AREA];
// OpenGL vars
GLuint program_id;
GLuint vert_array;
GLuint buffers... |
/*
* Copyright 2012 <NAME>.
* Copyright 2012 <NAME>.
* Copyright 2012 AppNexus, Inc.
* 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 ... |
//
// banshee-player-missing-elements.c
//
// Author:
// <NAME> <<EMAIL>>
// <NAME> <<EMAIL>>
//
// Copyright (C) 2005-2008 Novell, Inc.
// Copyright (C) 2010 Fluendo S.A.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
/... |
#include "apg_pdf.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
static size_t _skip_whitespace( const char* data, size_t sz, size_t next_offs ) {
while ( next_offs < sz ) {
if ( data[next_offs] != '\n' && data[next_offs] != '\r' && data[next_offs] != '\t' && data[next_offs] != ' ' ) { return ne... |
/* Copyright (c) 2018 <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:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the... |
/*! \file dump.c
*
* LTSW dump CLI commands.
*/
/*
* 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.
*/
#include <appl/diag/system.h>
#include <appl/diag/parse.h>
#incl... |
/*
* /usr/share/doc/collectd/examples/myplugin.c
*
* A plugin template for collectd.
*
* Written by <NAME> <<EMAIL>>
*
* This 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; only version 2 of the Lice... |
#include <stdlib.h>
#include "image-parser.h"
#include "macros.h"
// Bitmap file format
ImageData parse_image(uint8_t* raw_data, size_t length, ImageParseError* parse_error) {
ImageData parsed = { 0 };
if(length < 34) {
*parse_error = PARSE_ERROR_INVALID_LENGTH;
return parsed;
}
e... |
static char *sccsid =
"@(#) disfp.c, Ver. 2.1 created 00:00:00 87/09/01";
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 1987 <NAME>, all rights reserved *
* *
... |
#include "ece.h"
// This file implements a Base64url decoder per RFC 4648. Originally implemented
// in https://bugzilla.mozilla.org/show_bug.cgi?id=1256488; ported from Firefox
// with minimal changes.
#include <assert.h>
#include <stdbool.h>
// Maps an encoded character to a value in the Base64 URL alphabet, per
/... |
/****************************************************************************
** (c) Copyright IBM Corp. 2007 All rights reserved.
**
** The following sample of source code ("Sample") is owned by International
** Business Machines Corporation or one of its subsidiaries ("IBM") and is
** copyrighted and licensed, not... |
/* $NetBSD: acpi_button.c,v 1.3 2002/03/10 19:55:01 augustss Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by <NAME> for Wasabi Systems, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following co... |
/*
* Copyright (c) 2013 <NAME>
*
* 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 DISCLAIMS ALL W... |
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
vesa.h
Abstract:
This module implements VESA support.
Author:
<NAME> (ericks) Sep. 2000
Environment:
kernel mode only
Revision History:
--*/
#define VBE_GET_CONTROLLER_INFO 0x4F00
#define VBE_GET_MODE_INFO ... |
#include "globals.h"
#include <Shlobj.h>
#include <Knownfolders.h>
#include <Objbase.h>
#include <Shlwapi.h>
#include "FSEntriesContainer.h"
#include "DirectoriesContainer.h"
#include "WorkQueue.h"
#include "WideStringContainer.h"
static bool is_two_dots(u16* string){
return string[0] == L'.' && string[1] == L'... |
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "Vars.h"
void Create_PCBs();
void LoadPrograms();
void LoadProgram(int, struct PCB **);
struct PCB *GetNextProcess(struct PCB **);
voi... |
static double
form_volume(double length_a, double length_b, double length_c)
{
return length_a * length_b * length_c;
}
static double
radius_from_excluded_volume(double length_a, double length_b, double length_c)
{
double r_equiv, length;
double lengths[3] = {length_a, length_b, length_c};
double lengt... |
/*
* Copyright (c) 2012, 2013 <NAME>
* Copyright (c) 2013 <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... |
#include "exit.h"
#include <asm/fpu/internal.h>
#include <asm/paravirt.h>
#include <linux/types.h>
#include "arch.h"
#include "cpu.h"
#include "ia32.h"
#include "utils.h"
#include "vmx.h"
#include "vmxasm.h"
static void advance_guest(void) {
hv_arch_vmwrite(VMCS_GUEST_RIP,
hv_arch_vmread(VMCS... |
/*
* =============================================================================
* HSA Runtime Conformance Release License
* =============================================================================
* The University of Illinois/NCSA
* Open Source License (NCSA)
*
* Copyright (c) 2014, Advanced Micro Devi... |
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include "flibs/fev_listener.h"
#include "flibs/fev_buff.h"
#include "flibs/fev_timer.h"
#include "flibs/ftu_inc.h"
#include "flibs/flog_inc.h"
#include "flibs/fnet_core.h"
#include "http_handlers.h"
#define fake_ch... |
/* common.c - lib-internal IRC-unrelated common routines
* libsrsirc - a lightweight serious IRC lib - (C) 2012-18, <NAME>
* See README for contact-, COPYING for license information. */
#define LOG_MODULE MOD_COMMON
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "common.h"
#include <ctype.h>
#include <i... |
/*
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with
this software. If not, se... |
// SPDX-License-Identifier: BSD-2-Clause
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <time.h>
#include "ksyms.h"
struct ksyms {
struct ksym *syms;
struct ksym **syms_by_name;
int syms_sz;
int syms_cap;
char *strs;
int strs_sz;
int strs_cap;
};
static int ksyms__add_... |
#include "common.h"
#include "display.h"
#include "option.h"
#include <X11/XKBlib.h>
static void
print_mods(unsigned mods)
{
print("mods:");
if (mods & ShiftMask)
print(" Shift");
if (mods & LockMask)
print(" Lock");
if (mods & ControlMask)
print(" Control");
if (mods &... |
#define MAX_CLI_VERBS 128
#define MAX_CLI_STEPS 8
#define CLI_NOTE 16384
#define CLI_WARN 8192
#define CLI_FATAL_ERR 0x80
extern const char* cli_verbs[MAX_CLI_VERBS];
void cli_verb_ini(void);
const char* cli_verb(short code);
const char* cli_note(short code);
void cli_outresult(unsigned char step, short ... |
/**
* Function to compute the exponential on [-745, +709]
*
* Author : <NAME> (<EMAIL>)
* <NAME> (<EMAIL>)
*
* Date of creation : 14/03/2002
* Last Modified : 28/02/2003
*/
#include <stdio.h>
#include <stdlib.h>
#include "crlibm.h"
#include "crlibm_private.h"
#include "exp.h"
/*********************... |
/* ENCRYP-- ENCRYPT PASSWORD */
/*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
/* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
/* WRITTEN BY <NAME> */
#include <stdio.h>
#include "funcs.h"
#include "vars.h"
void encryp_(inw, outw)
const char *inw;
char *outw;
{
/* ... |
// Licensed to Pioneers in Engineering under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. Pioneers in Engineering licenses
// this file to you under the Apache License, Version 2.0 (the
// "License"); you ... |
#include "driver/include/fildes.h"
#include "stm32f4xx.h"
#include "stm32f4xx_ll_usart.h"
#include "stm32f4xx_ll_gpio.h"
#include "stm32f4xx_ll_bus.h"
#include "stm32f4xx_hal.h"
#include "FreeRTOS.h"
#include "queue.h"
static void MX_USART2_UART_Init(void);
struct usart_indev {
USART_TypeDef *usart;
QueueHand... |
/******************************************************************************
*
* Copyright (C) 2010-2012 Broadcom 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:
*
... |
#include <stdio.h>
#include <string.h>
#include <unistd.h>
/* A header file that defines miscellaneous symbolic constants and types,
* and declares miscellaneous functions. */
#include <stdlib.h>
/* A header file of the general purpose standard library of C programming
* language which includes functions involvin... |
/*
* hyperscan
* Copyright (c) LubinLew
*
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <hs.h>
#include <hs_header.h>
struct _hs_mgt {
risk_level_t risk_level;
/* hyperscan data */
hs_database_t* hs_database;
hs_scratch_t* hs_scratch;
... |
/*
* Copyright (c) 2018-2019 SignalWire, 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... |
/*
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:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaime... |
/*Copyright (c) <2020>, <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. Redistributions of source code must retain the above copyright notice, this list of
... |
/*
* Copyright (c) 2021 OneOS Team
*/
#include <string.h>
#include <os_sem.h>
#include <os_clock.h>
#include "oc_api.h"
#include "port/oc_clock.h"
//#include <signal.h>
//#include <windows.h>
//int quit = 0;
static os_sem_t block;
static bool state = false;
int power;
oc_string_t name;
static int
app_init(void... |
/*
* Copyright (c) 2010 Aalto University and RWTH Aachen University.
*
* 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 ... |
/****************************************************************************
* lte_lwm2m/system_adc.c
*
* Copyright 2021 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are me... |
#include <stdio.h>
#include <stdint.h>
#include <sys/select.h>
#include <string.h>
#include <unistd.h>
#include "tinyppp6.h"
// PPP in HDLC-like Framing is described in:
// https://tools.ietf.org/html/rfc1662
enum {
HDLC_STATE_HUNTING,
HDLC_START_FRAME,
HDLC_MID_FRAME,
HDLC_IN_ESCAPE
};
int hdlc_st... |
#include "server.h"
void send_packet(response msg_type, int index) {
memset(clients[index].send, '\0', PACKET_SIZE);
switch (msg_type) {
case WELCOME: sprintf(clients[index].send, "WELCOME,%s", clients[index].client_id); break;
case START: sprintf(clients[index].send, "START,%d,%d", game->play... |
/*
Copyright 2014 VirusTotal S.L. 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
//
// Created by <NAME> on 26-10-2017.
//
#include<stdbool.h>
#include<malloc.h>
#include "data.h"
struct tree {
int data;
// int center[2] = {0, 0};
int index;
struct tree *right, *left;
} *root;
int mapPosX, mapPosY;
void insertLeft(struct tree *parent, int num) {
struct tree *child;
child... |
#include <fs/fs.h>
#include <hdd.h>
#include <fs/minix3.h>
#include <fs/minix3_dir_entry.h>
#include <fs/blkpool.h>
#include <fs/ipool.h>
#include <fs/fd_table.h>
#include <fs/file_table.h>
#include <proc/ptable.h>
int fs_init()
{
if (hdd_init())
return 1;
blkpool_init();
ipool_init();
if (m... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2007 AMD
* (Written by <NAME> <<EMAIL>> for AMD)
* Copyright (C) 2007 <NAME> <<EMAIL>>
* (Thanks to LSRA University of Mannheim for their support)
* Copyright (C) 2008 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it a... |
/******************************************************************************
File: graphics.c
Created: 2019-06-25
Updated: 2019-07-31
Author: <NAME>
Notice: Creative Commons Attribution 4.0 International License (CC-BY 4.0)
******************************************************************************/
/... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2015 <NAME> <<EMAIL>>,
* Raptor Engineering
* Copyright (C) 2007 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
... |
/**
* \file
*
* \brief AVR XMEGA TC Driver Example 1
*
* Copyright (c) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*... |
/* ------------------------------------------
* Copyright (c) 2017, Synopsys, Inc. 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 copyr... |
/* $NetBSD: perform.c,v 1.1.1.5 2009/11/05 18:39:02 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <nbcompat.h>
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: perform.c,v 1.1.1.5 2009/11/05 18:39:02 joerg Exp $");
/*
* FreeBSD install - a package for the installation and m... |
/*****************************************************************************
* ogg.h : ogg stream demux module for vlc
*****************************************************************************
* Copyright (C) 2001-2010 VLC authors and VideoLAN
*
* Authors: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>> (Annod... |
//
// oljson.c
// ol-c
//
// Created by <NAME> on 15/1/9.
// Copyright (c) 2015年 sleepsaint. All rights reserved.
//
#include <stdlib.h>
#include <string.h>
#include "oljson.h"
const int STATIC_BUFFER_SIZE = 8192;
typedef struct {
char static_buffer[STATIC_BUFFER_SIZE];
char* begin;
char* end;
ch... |
/*
* Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2017 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file fxas21002_poll.c
* @brief The fxas21002_poll.c file implements the ISSDK FXAS21002 sensor driver
* example demonstration with polling m... |
#include "gfx.h"
#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
#undef Red
#undef Green
#undef Blue
#endif
#include "stm32f7_i2c.h"
/*
* The CR2 register needs atomic access. Hence always use this function to setup a transfer configuration.
*/
static void _i2cConfigTransfer(I2C_TypeDef* i2c, gU16 slaveAddr, gU8 numByt... |
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<time.h>
#include"contact.h"
#include"common.h"
#include"files.h"
#define OUTPUT_PAIR_NAME 0
#define OUTPUT_TEMP_DIST 1
#define OUTPUT_SPAC_DIST 2
#define OUTPUT_CONTACTS 3
struct PairName
{
char vName1[32];
char vName2[32];
};
int pairName_has_names... |
#include <stdio.h>
#include "htab.h"
#include "lines.h"
#include <stdlib.h>
#include <sys/types.h>
typedef enum {
NOP = 0,
ACC = 1,
JMP = 2
} INS;
typedef struct {
INS i;
int op;
// list_t ls;
} instr_t;
typedef struct {
u_int64_t accum;
instr_t * instructions; /* a flexible buffer */
size_t ... |
/* =========================================================================
perf_remote - remote performance peer
-------------------------------------------------------------------------
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS ... |
long rows, cols, size_I, size_R, niter, iter, k;
double *I, *J, q0sqr, sum, sum2, tmp, meanROI, varROI ;
double Jc, G2, L, num, den, qsqr;
long *iN, *iS, *jE, *jW;
double *dN, *dS, *dW, *dE;
long r1, r2, c1, c2;
double cN, cS, cW, cE;
double *c, D;
double lambda;
long nthreads;
long _pMalloc;
long _lastRand;
void s... |
/* include/config.h. Generated from config.h.in by configure. */
/* include/config.h.in. Generated from configure.in by autoheader. */
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
/* #undef F77_DUMMY_MAIN */
/* Define to a macro mangling the given C identifier (in l... |
/*////////////////////////////////////////////////////////////////////////
Copyright (c) 1995 Electrotechnical Laboratry (ETL), AIST, MITI
Permission to use, copy, modify, and distribute this material for any
purpose and without fee is hereby granted, provided that the above
copyright notice and this permission notice... |
#include "cs.h"
/* --- is_left_schol.c --- */
/* union of 2 columns of their nonzeros */
void is_bool_union (csi *P, csi *col_rowind, csi size, csi i)
{
csi row ;
for (csi k = 0 ; k < size ; k++)
{
row = col_rowind [k] ;
if (P [row] == 0 && row != i)
P [row] = 1 ;
}
}
/... |
/*
#
# Copyright (c) 2006-2012 University of Houston. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
*/
#include "MCFA.h"
#include "MCFA_internal.h"
#include "SL.h"
extern struct MCFA_proc_node *procList;
extern MCFA_create_distmatrix_func *MCFA_create_dist... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.