text stringlengths 3.08k 10.5k |
|---|
/*
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file ... |
//
// main.c
// DSProject2
//
// Created by <NAME> on 25.05.2020.
// Copyright © 2020 <NAME>. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#define NUMBER_LENGTH 9
#define MAX_STUDENT 10 //Arbitrarily selected as 10.
//Defining a linked list node.
typedef struct node_l {
int val;
struct ... |
/*************************************************************************/
/* Xania (M)ulti(U)ser(D)ungeon server source code */
/* (C) 1995-2000 Xania Development Team */
/* See the header to file: merc.h for original code copyrights */
/* ... |
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdio.h>
#include "RVCOS.h"
#include "RVCGraphics.h"
#include "tests.h"
int test_writetext() {
for (int i = 0; i < TXT_HGHT; ++i) {
RVCWriteText_LITERAL(
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... |
/*
*******************************************************************************
* Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may ... |
/* $NetBSD: hset.c,v 1.2 2007/11/09 20:08:41 plunky Exp $ */
/* $DragonFly: src/usr.sbin/sdpd/hset.c,v 1.1 2008/01/06 21:51:30 hasso Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
* All rights reserved.
*
* Written by <NAME> for Itronix Inc.
*
* Redistribution and use in source and binary forms, with or without
... |
#include <fcntl.h>
#include <inttypes.h> // for portable integer declarations
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "header.h"
/* ----------Hash tables from Prac 3 --------------*/
// Inroduction to hash tables in C
// An item inserted into a hash... |
// ------------------------------------
// clima.c
// ------------------------------------
// Modulo de efectos climaticos
// Por Kronoman
// En memoria de mi querido padre
// Copyright (c) 2002, Kronoman
// ------------------------------------
#include <allegro.h>
#include "clima.h"
#include "azar.h"
#i... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018, <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,... |
/*
* Copyright (c) 1993, <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 a... |
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <sched.h>
#include "shm_iom_in.h"
#include "shm_iom_out.h"
#define NSEC_PER_SEC 1000000000UL
#define CYCLE_NS 50000000UL // 50ms
#def... |
/* ----------------------------------------------------------------------
* FILE: as31.h
* PACKAGE: as31 - 8031/8051 Assembler.
*
* DESCRIPTION:
* The sole header file for the 8031/8051 assembler package.
* It defines several structures used by the yacc stack.
* It defines several macros for testing the bitsize ... |
/***********************************************************************
*
* Copyright 1996, University Corporation for Atmospheric Research.
*
* dropdown.c
*
* Callbacks and utilities to control dropdown labels.
*
* History:
*
* 11/96 COMET Original copy
* 11/97 COMET Added a timeout for the dropdown label ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <stdbool.h>
#include "person_struct.h"
int contagion_constant=trail-1;
int iterations=20;
//grid parameters
int n=20;
int m=30;
//population parameters
int population=50;
int initial_diseased=1;
// struct Person... |
/*
* Copyright (c) 2017, Texas Instruments Incorporated
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <misc/__assert.h>
#include <kernel/zephyr/dpl/dpl.h>
#include <ti/drivers/dpl/HwiP.h>
#include <inc/hw_types.h>
#include <inc/hw_ints.h>
#include <driverlib/rom.h>
#include <driverlib/r... |
// Toy code for: // http://marc-b-reynolds.github.io/quaternion/2016/08/09/TwoNormToRot.html
//
// Generate uniform points on the unit sphere, form the rotation, reconstruct the
// target normal and roughly measure angular error. Ignores the degenerate
// case in all implementations.
//
// to compile under VC you'll ... |
/* this C file contains all the functions required by thread 0 to send commands and receive response from thread 1
* Created by <NAME>
******************************************************************************************************************/
#include "error.h"
#include "deadline.h"
#include "delay.c"
#include... |
/* sbrem_1.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1 = 1;
/* $Procedure SBREM ( String buffer, remove ) */
/* Subroutine */ int sbrem_1__(char *name__, ... |
/*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
* Copyright (c) 2011-2019, <NAME> <<EMAIL>>.
* Copyright (c) 2012-2019, <NAME> <<EMAIL>>.
*/
#include "taisei.h"
#include "menu.h"
#include "global.h"
#include "video.h"
MenuEntry *add_menu_entry(Men... |
#include "rng.h"
#include "flin.h"
#include <stdlib.h> // atoi
#include <string.h> // memcpy
#include <math.h> // trunc, floor
static inline double mod(double x ,double y) {
return x - y * trunc(x / y);
}
/* -------------------------- rand -------------------------- */
static t_class *rand_class;
typedef struct {... |
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdint.h>
#include "mcp4921.h"
#include "uart.h"
#include "midi.h"
#include "settings.h"
#include "notemem.h"
#include "turing.h"
#include "mode.h"
#include "mode_prio.h"
#include "mode_midilearn.h"
#include "mode_turing.h"
#include "const... |
/*******************************************************************************
*
* This module contains delta-sigma arithmetic operators.
*
* Reference:
* Ch<NAME> (2009) -- Bit-stream signal processing on FPGA.
* http://hub.hku.hk/handle/10722/54513
*
* Copyright (c) <NAME> 2... |
#include "stb_image.h"
#include "stb_image_write.h"
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
uint64_t PRNG_mSeed = 12118;
void PRNG_Reset() { PRNG_mSeed = 12118; }
float PRNG_Extents(float extents)
{
PRNG_mSeed ^= PRNG_mSeed >> 12;
PRNG_mSeed ^= PRNG_m... |
/*
QHYCCD SDK
Copyright (c) 2014 QHYCCD.
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; either version 2 of the License, or (at your option)
any later version... |
#include "oobm.h"
t_circbuf g_oobm_buf_rx;
t_circbuf g_oobm_buf_tx;
uint8_t g_temp_buf[2052];
uint8_t g_oob_tbuf[2052];
#define putc_fast( c ) (CONSOLE_UART_TXD = c)
// ----------------------------------------------------------------------------
// called by main loop to handle oob transfers
// ------------------... |
/*
* Copyright (C) 2020-2021 The opuntiaOS Project Authors.
* + Contributed by <NAME> <<EMAIL>>
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <drivers/x86/pci.h>
static driver_desc_t _pci_driver_info()
{
driver_desc_t pci_desc = { 0 };
... |
/*
* Copyright (C) 2019 Shintako LLC
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
/* Standard Includes */
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <syslog.h>
#include <fcntl.h>
#include ... |
/*
* iaxclient: a cross-platform IAX softphone library
*
* Copyrights:
* Copyright (C) 2003-2006, Horizon Wimba, Inc.
* Copyright (C) 2007, Wimba, Inc.
*
* Contributors:
* <NAME> <<EMAIL>>
*
* This program is free software, distributed under the terms of
* the GNU Lesser (Library) General Public License.
*/... |
#include "Structures.h"
int hash_string(HTKey key){
int hash=0, a=33;
char* temp = key;
for(; *temp!='\0' ; temp++)
hash = (a*hash + *temp);
return hash;
}
void visit(Pointer p){
printf("(%s)", (char*)HTEntry_get_key(p));
}
int HT_compare(Pointer p1, Pointer p2){
return strcmp((ch... |
/* GStreamer
*
* unit test for state changes on all elements
*
* Copyright (C) <2017> <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of th... |
/* console.c -- console for GRUB. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2013 Free Software Foundation, Inc.
*
* GRUB 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 ve... |
/*
* 8-byte meta data per an allocated block is required.
*
* The latest freed object gets added to the head. And new object gets from
* the head for cache efficiency.
*
* It splits an object in two if the requested block size is less than the
* object size found. But if the remainder size is less than MIN_SIZE,... |
/*
===============================================================================
Name : lpc1769.c
Author : $(author)
Version :
Copyright : $(copyright)
Description : main definition
===============================================================================
*/
// registri PIN CONNECT BLOCK... |
/**
******************************************************************************
* @file BSP/Src/audio_loopback.c
* @author MCD Application Team
* @brief This example code shows how to use the audio feature in the
* stm32746g_discovery driver
******************************************... |
/* $Id: socket.c,v 1.17 2004/09/01 20:16:01 rjoseph Exp $
the socket handling routines */
#include "socket.h"
/* static so only socket.c can see the symbols */
static l_ent *socket_list;
static pthread_mutex_t socket_list_lock;
static pthread_t main_thread;
static sinfo *main_socket;
static char main_thread_run;
/... |
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
float tolerance = 0.00001;
float my_random(){
float val = (double)rand()/(double)RAND_MAX;
return val;
}
void read_data(float* array,char str[],int rows,int cols){
FILE *file_pointer;
file_poin... |
/*
* iec61850_9_2_LE_example.c
*
* Copyright 2016 <NAME>
*
* This file is part of libIEC61850.
*
* libIEC61850 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... |
#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... |
//PROGRAM TO FIND THE SHORTEST WAY AND FIND THE LEAST WEIGHT BY DIJKSTRA ALGORITHM BY XeNON
#include<stdio.h>
#define inf 99999 //TO Define The Infinity Value
int djikstra(int node, int cost[node][node], int start, int terminal); //TO Declare Djikstra Function
/* Djikstra Function Includes 4 Type Of Data
1. n... |
#include "../custom_functions/function_i2c.h"
#include "system.h"
#define I2C_FREQ (50000000) /* Clock frequency driving the i2c core: 50 MHz in this example (ADAPT TO YOUR DESIGN) */
#define TRDB_D5M_I2C_ADDRESS (0xba)
#define TRDB_D5M_0_I2C_0_BASE I2C_0_BASE /* i2c base address from system.h (ADAPT T... |
/* jobResult.c was originally generated by the autoSql program, which also
* generated jobResult.h and jobResult.sql. This module links the database and
* the RAM representation of objects. */
#include "paraCommon.h"
#include "linefile.h"
#include "dystring.h"
#include "sqlNum.h"
#include "sqlList.h"
#include "job... |
/* boxLump - This will lump together boxes that overlap into the smallest
* box that encompasses the overlap. It will put other boxes that
* fit in the encompassing box in there too.
* It works by projecting the box list along one dimension at a
* time looking for gaps between boxes. This is similar in functio... |
// Author: <NAME>
// Description: Implementation based on the description of Bogdanov et al.[1]
//
// [1]: https://eprint.iacr.org/2015/795.pdf
//
#include <stdint.h>
#include <wmmintrin.h>
#ifndef _WIN32
#include <x86intrin.h>
#endif
#include "bogdanov_impl.h"
static const uint32_t rcon [] = {0x8d, 0x01, 0x02, 0x04... |
/**
******************************************************************************
* @file mobilelab_data_gathering/main.cpp
* @author <NAME>
* @version V1.0
* @date 06-August-2019
* @brief Main program body
******************************************************************************
*/
/* Includes ... |
// A miniature ray tracer to generate rotation frames for the ball sprite.
// One frame for each rotation around Z to the left, center, and right.
//
// Rotation around X is achieved with color cycling. There are 14 colors
// per sprite, 7 red and 7 white. Shift each of this colors along by one
// to give the illusion ... |
/**
* @file io_src_sep.c
* @date 23 oct. 2012
* @author <EMAIL>
* @brief Separator source, for input. Bytes read are stored in an internal
* buffer of size IO_SRC_SEP_SIZE and the client is notified each time a given
* character separator is found, or the buffer is full.
*
* Copyright (C) 2012 Parrot S.A.
*/
#... |
#include "WAPDefine.h"
int my_class_ReplaceMe_request(WAPObject self, const char * cmd) {
print_string("replaced + ReplaceMe request");
return 0;
}
int my_class_ReplaceMe_requestfromto(WAPObject self, const char * cmd, WAPArray parameters) {
print_string("replaced + ReplaceMe requestFrom:Two to:One");
... |
/* $OpenBSD: svc_raw.c,v 1.10 2010/09/01 14:43:34 millert Exp $ */
/*
* Copyright (c) 2010, Oracle America, 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 re... |
/*
* =============================================================================
*
* Filename: test_controller.c
*
* Description:
*
* Version: 1.0
* Created: 13-03-30 01:03:49 PM
* Revision: none
* Compiler: gcc
*
* Author: <NAME> (), <EMAIL>
*
* ======... |
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include "include/If_DBR.h"
__int64 GetFormat(int iIndex)
{
__int64 llFormat = 0;
switch(iIndex)
{
case 1:
llFormat = OneD | QR_CODE | PDF417 |DATAMATRIX;
break;
case 2:
llFormat = OneD;
break;
case 3:
llFormat = QR_CODE;
break;
case 4:
l... |
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt).
If you do not agree to the terms, do not use the code.
Module Name:
chunk.c
Abstract:
T... |
#include <stdio.h>
#include <stdlib.h>
typedef struct s_my_stack {
char* c;
unsigned int size;
unsigned int index;
struct s_my_stack* pointer;
} t_my_stack;
void stack_push(t_my_stack** pointer_stack, char* value, unsigned int size, unsigned int index);
t_my_stack stack_pop(t_my_stack** stack);
t_my_stack st... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
void help();
char* readFile(char* path);
void watch1(char* file, int interval, int timesec);
void watch2(char* file, int interval, int timesec);
int monit... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define NAMEBUFFLEN 32
#define BETBUFFLEN 8
typedef struct _card{
char suit;
char value;
} card;
typedef struct _deck{
size_t deckSize;
size_t top;
card cards[52];
} deck;
typedef struct _player{
int money;
deck... |
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2017 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file fxpq3115_altitude.c
* @brief The fxpq3115_altitude.c file implements the ISSDK FXPQ3115BV sensor driver
* example demonstration for Altitude m... |
#include "hcc.h"
//TODO: Malloc checks
extern int lineNumber;
int ruleNumber=-1;
//TODO dynamic file names
int main (void){
if(cg_init_files() == -1 ||
st_init_symTab() == -1) {
return -1;
} else {
yyparse();
cg_close_files();
st_print_symTab();
st_close_files();
}
return 0;
}
void begin_of... |
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "common.h"
#define HOST "localhost"
#define PORT 8765
/* use these strings to tell the marker what is happening */
#d... |
#include "font-chef/character-mapping.h"
#include "stb_truetype.h"
#include <stdlib.h>
struct fc_rect fc_text_bounds(struct fc_character_mapping const mapping[], size_t length) {
struct fc_rect r = { .left = 0, .top = 0, .right = 0, .bottom = 0 };
if (length < 1) return r;
r.left = mapping[0].target.left;
r.to... |
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it w... |
// -----------------------------------------------------------------------------
// Copyright 2018 <NAME>. telecnatron.com
//
// Licensed under the Telecnatron License, Version 1.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 "search.h"
#include "nav/nav.h"
#include "task.h"
map_coord_t align_to_map(uint16_t x_coord, uint16_t y_coord) {
uint16_t y_low = (uint16_t)LOWEST_Y_ORG;
uint16_t x_low = (uint16_t)LOWEST_X_ORG;
map_coord_t res;
res.valid = true;
uint8_t x_mod = (x_coord - x_low) % CENTIMETERS_PR_FIELD... |
/* FDUPES Copyright (c) 2018 <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... |
// Copyright (C) 2017 <NAME>. See included LICENSE file.
static const char* g_StockTheme_Dark =
"ui-font system-font-ui\n"
"cmdbar-bg-color 64 64 64 255\n"
"cmdbar-bg-color-active 128 51 0 255\n"
"cmdbar-tb-font system-font-mono\n"
"cmdbar-text-color 224 224 224 255\n"
"cmdbar-text-color-active... |
// BoundaryFill ALGO.........
#include <stdio.h>
#include <math.h>
#include <GL/glut.h>
//structure for storing coordiantes of a pixel
struct Point {
GLint x;
GLint y;
};
//structure for storing rgb components of a color
struct Color {
GLfloat r;
GLfloat g;
GLfloat b;
};
//function which returns ... |
/*
* (C) Copyright 2020 <NAME>, <EMAIL>
* https://community.openglow.org
* SPDX-License-Identifier: MIT
*
* Based on python-evdev
* Copyright (c) 2012-2016 <NAME>. All rights reserved.
*
* Python bindings to certain linux input subsystem functions.
*/
#include <Python.h>
#include <stdio.h>
#include <stdin... |
#include "cse320_functions.h"
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
#include <wait.h>
#include <semaphore.h>
#include <pthread.h>
addr_in_use addr[25];
files_in_use files[25];
unsigned int sec = 5;
int addr_cnt = 0;
int file_cnt = 0;
sem_t ad, file;
... |
#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... |
//Day10b.c
//
//Question 2: What do you get if you multiply together the values of the chips
//in each of outputs 0, 1, and 2?
//
//I told you tracking the outputs was a good idea! We already have everything
//we need for this answer; all we have to do is print the result.
#include <stdio.h>
#include <stdlib.h>
#inclu... |
/*
* NVRAM variable manipulation (Linux user mode half)
*
* Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
*
* 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 ... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<string.h>
#include"log.h"
#include"service.h"
#include"service_port_forward.h"
#include"string2.h"
#include"thread_local.h"
#include"safe_close.... |
/* See LICENSE file for copyright and license details. */
#define CWD "You are currently in "
#define CURSR " > "
#define EMPTY " "
static int mtimeorder = 0; /* Set to 1 to sort by time modified */
static int sizeorder = 0; /* Set to 1 to sort by file size */
static int bsizeorder = 0; /* Set to 1 to sort by ... |
/*
* xenoeye
*
* Copyright (c) 2021, <NAME>, <NAME>
*
* 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 copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ... |
/**
******************************************************************************
* File Name : main.c
* Description : Example project for Simple Data Protocol
*
* @date 3-Dec-2017
* @author <NAME>
* @source http://damogranlabs.com/
* https://github.c... |
#include "usb_lib.h"
#include "usb_desc.h"
#include "hw_config.h"
// Private constants
// USB Standard Device Descriptor
const uint8_t USB_DeviceDescriptor[] = {
USB_DESC_SIZE_DEVICE, // bLength
USB_DESC_TYPE_DEVICE, // bDescriptorType: device descriptor (0x01)
0x00, // bcdUSB: USB version 2.00 (0x0200)
0x02... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <pthread.h>
struct Customer {
int id;
/* round */
int arrive;
int cont; // continuously play round
int rest;
int total;
int start; // should start
int accum;
int explored;
int prewait;
struct C... |
/**
* Copyright (C) 2020-2021 <NAME>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
**/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <strings.h>
#include <arpa/inet.h>
#include <assert.h>
#... |
/*
* ISC License
*
* Copyright (C) 1987-2018 by
* <NAME>
* <NAME>
* <NAME>
* Delft University of Technology
*
* 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 appea... |
#include "parser.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define INITIAL_SIZE 100
#define ERROR_EXPECTED(a) fprintf(stderr, "Expected %s in position %d got '%c' instead.\n",a, i, input[i])
int isContained(char c, char* string)
{
int i;
for (i = 0; string[i] != '\0'; ++i)
{
... |
#include <stdio.h>
#include <ctype.h>
#include <glib.h>
#include <string.h>
#include <locale.h>
#include <archive.h>
#include <archive_entry.h>
static char * case_normalize(char * str) {
for (char * iter = str; *iter; ++iter) {
*iter = tolower(*iter);
}
return str;
}
static gint compare_str(const void * a, ... |
/*
* ppcfetch - a simple terminal tool to display information about powerpc mac computers.
*
* this software is released under MIT lisence.
*
* by chrv80. contact info: <EMAIL>
*/
#include <stdio.h>
#include <string.h>
char uptime[100], ramAmount[20], userName[50], comName[100],
osName[10], osVersion[... |
/* stdtr.c
*
* Student's t distribution
*
*
*
* SYNOPSIS:
*
* double t, stdtr();
* short k;
*
* y = stdtr( k, t );
*
*
* DESCRIPTION:
*
* Computes the integral from minus infinity to t of the Student
* t distribution with integer k > 0 degrees of freedom:
*
* ... |
/*
** imagetool.c
** Glue.
**
**---------------------------------------------------------------------------
** Copyright 2001 <NAME>
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1.... |
/******************************************************************************
* @file main.c
* @version V1.00
* @brief Implement USCI_SPI1 Master loop back transfer.
* This sample code needs to connect USCI_SPI1_MISO pin and USCI_SPI1_MOSI pin together.
* It will compare the received ... |
/*
* Copyright (c) 2015-2018 Nexenta Systems, inc.
*
* This file is part of EdgeFS Project
* (see https://github.com/Nexenta/edgefs).
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informat... |
/*
Copyright 2019 <NAME>
THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF YOU MAY OBTAIN A COPY OF
THE LICENSE AT https://www.apache.org/licenses/LICENSE-2.0.
THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLI... |
/*
* Copyright (C) 2005-2017 Texas Instruments Incorporated.
*
* 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 c... |
#include "datatypes.h"
#include "fet.h"
#include "pin.h"
#include "rcc.h"
#include "stm32l4xx.h"
#include "util.h"
void _fet_TIM_init(void){
/* XXX: The ARPE bit in CR1 would be useful for adaptive frequency
* Use CKD bits in CR1 to dial in dead time
*/
/* enable peripheral */
rcc_tim_enab... |
/*
* HydraBus/HydraNFC
*
* Copyright (C) 2014-2016 <NAME>
* Copyright (C) 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
... |
/**MIT License
Copyright (c) 2019 <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, distrib... |
/****************************************************************************
* @file main.c
* @version V3.00
* @brief Use RTC alarm interrupt event to wake up system.
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.
********************************... |
/* cache.c - d-cache support for ARC CPUs */
/*
* Copyright (c) 2016 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief d-cache manipulation
*
* This module contains functions for manipulation of the d-cache.
*/
#include <kernel.h>
#include <arch/cpu.h>
#incl... |
/*
Nel file sottogruppi.c definire la funzione corrispondente alla seguente
dichiarazione:
extern int Sottogruppi(const char *filename, int k);
La funzione prende in input il nome di un file di testo (filename) e un
intero k. Il file contenente i nomi degli alunni di una classe sepa... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 <NAME> (tinyusb.org)
*
* 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 <err.h>
#include <stdlib.h>
#include <string.h>
#include <ucontext.h>
#include "coroutines.h"
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define MAX(a, b) ((a) < (b) ? (b) : (a))
struct coroutine;
typedef struct coroutine coroutine;
struct scheduler {
coroid_t running; // id of running coroutine
siz... |
/* $OpenBSD: announce.c,v 1.24 2016/02/01 07:25:51 mestre Exp $ */
/*
* Copyright (c) 1983 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. R... |
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 8
int
main1 ()
{
int i;
unsigned int out[N*8], a0, a1, a2, a3, a4, a5, a6, a7, b1, b0, b2, b3, b4, b5, b6, b7;
unsigned int in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... |
/* j/6/peek.c
**
*/
#include "all.h"
/* logic
*/
static u3_noun
_cqfu_peek(u3_noun, u3_noun, u3_noun, u3_atom);
static u3_noun
_peek_in(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun);
static u3_noun
_peek_fork(u3_noun van, u3_noun p_sut, u3_noun way, u3_noun axe, u3_noun gil)
{
if ( u3_nul == p_sut ... |
#include "eeprom_lib.h"
/*
Properties of the SPI EEPROM are:
fmax = 2 MHz
SPI modes (0,0) and (1,1) are supported
Mode 0,0: clock idles low, data clocked in rising edge
The device must be enabled for writing by setting bits in the status register
Read sequence: Instruction ; 16 bit address; data starts coming out
Writ... |
/*
* File: arch/blackfin/kernel/dma-mapping.c
* Based on:
* Author:
*
* Created:
* Description: Dynamic DMA mapping support.
*
* Modified:
* Copyright 2004-2006 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
* This program is free software; you can... |
/*
* License: MIT
*
* Copyright (c) 2017-2020 <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, mo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.