text stringlengths 3.08k 10.5k |
|---|
/* ------------------------------------------
* 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 co... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define note "ENTER VALID OPERATION"
void addition();
void subtraction();
void multiplication();
void division();
void modulus();
void power();
void factorial();
void square();
void cube();
void squareRoot();
void cubeRoot();
void sin();
void cos();
void tan();
void... |
/*
* Marvell Bluetooth driver: global definitions & declarations
*
* Copyright (C) 2009, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
* (the "License"). You may use, redistribu... |
/*
* Copyright 2014 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, d... |
/*
* pgp-info.c
* Provide info about PGP data.
*
* Copyright (c) 2005 <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... |
/*
Unix SMB/CIFS implementation.
POSIX NTVFS backend -
Copyright (C) <NAME> 2004
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 ... |
/*********************************************************************
*
* a2dv2.c
*
* Created by Agudemu & <NAME> on 3/26/17
* mex file for A/D input to PCIe-6341 from Spike Amplifier, acquiring raw spike-trace data.
*
* Pin Connection Information:
* The analog input signal connects to AI channel 0.
* Trig... |
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Resea... |
/**
* Charming Chatroom
* CS 241 - Spring 2019
* Collab with <NAME> - wcwang2
*/
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#inc... |
// SPDX-License-Identifier: MIT
#include <stdbool.h>
#include <stdio.h>
#include <dbus/dbus.h>
#include <tinyalsa/asoundlib.h>
/* Note: These parameters have little relevance (no audio data written) */
struct pcm_config pcm_config_voice_call = {
.channels = 1,
.rate = 8000,
.period_size = 160,
.period_count = 2,
... |
/* steptimer.c -- Step timer, Mainly used to control the count of frames per
* second for the rendering loop.
*
* 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 a... |
/*
* This source code is a product of Sun Microsystems, Inc. and is provided
* for unrestricted use. Users may copy or modify this source code without
* charge.
*
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
... |
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either v... |
/*
* @UBERXMHF_LICENSE_HEADER_START@
*
* uber eXtensible Micro-Hypervisor Framework (Raspberry Pi)
*
* Copyright 2018 Carnegie Mellon University. All Rights Reserved.
*
* NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING
* INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON
... |
// Simple game of Tic-Tac-Toe
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include <stdlib.h>
void drawBoard(void);
int getChoiceXO(void);
int getCoords(void);
int checkWinner(void);
int compCoords(void);
//int checkValidMove(int, int);
int boardPlayable(void);
char computer = '\0';
char player = '\0';
c... |
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed... |
/*
* Copyright (C) <NAME>
* Copyright (C) Rap, Inc.
*/
#include <rap_config.h>
#include <rap_core.h>
#include <rap_http.h>
typedef struct {
uint32_t percent;
rap_http_variable_value_t value;
} rap_http_split_clients_part_t;
typedef struct {
rap_http_complex_value_t value;
... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include "honggfuzz.h"
#include "cmdline.h"
#include "mangle.h"
#include "subproc.h"
#include "libhfcommon/util.h"
char menu[] = "[TODO: menu]";
char *myargs[] = {"how2mutate", "-s", "--", "/bin/true"};
honggfuzz_t hfu... |
#include <string.h>
#include <strings.h>
#include "laser_data_drawing.h"
#include "logging.h"
#include "math_utils.h"
const char*ld_reference_name[4] = { "invalid","odometry","estimate","true_pose"};
const char*ld_reference_to_string(ld_reference r) {
return ld_reference_name[r];
}
ld_reference ld_string_to_referen... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... |
#define out
#include <stdio.h>
#include <sys/time.h>
#include "cmump.h"
#include "multpol.h"
#include "gbas.h"
short nvars;
char *varnames[30];
int order_exp=1, first_group=0;
int zero_poly_count = 0;
int redgcd = 0;
int order_on_pols=0;
int order_on_pairs=0;
int reduction_first=0;
int deletion=1;
int allow_same_lpp=... |
// Sachin
// Painting Turtle in OpenGL
// Press the Space Bar to enter a new command
// Commands:
// MOV -- Let the turtle move
// ROT -- Rotate the turtle's movement
// LEN -- Change the turtle's brush size
// RGB -- Change the paint color
// END -- End the program
//
// 'q' or 'Q' to quit
// gcc turtle... |
#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... |
/*======================================================================
Aironet driver for 4500 and 4800 series cards
This code is released under both the GPL version 2 and BSD licenses.
Either license may be used. The respective licenses are found at
the end of this file.
This code was develop... |
/**
* File : two_player_screen.c
* Author : <NAME> <<EMAIL>>
* Date : 26.12.2018
* Last Modified Date: 20.01.2019
* Last Modified By : <NAME> <<EMAIL>>
*/
#include <stdlib.h>
#include <string.h>
#include "screen.h"
#include "maze_helper.h"
#include "maze.h"
#include "draw_ut... |
#include "../include/stdinc.h"
const char GREETING_MESSAGE[] = "220 Anonymous FTP server ready.\r\n";
const char GOODBYE_MESSAGE[] = "221 Goodbye.\r\n";
const char SYST_RESPONSE[] = "215 UNIX Type: L8\r\n";
const char UNAUTH_MESSAGE[] = "530 Not logged in.\r\n";
const char UNKNOWN_COMMAND_MESSAGE[] = "500 Unknown comma... |
/**
* @file
* @brief
* PrimeCell UART (PL011)
* http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183g/DDI0183G_uart_pl011_r1p5_trm.pdf
*
* @data 04 aug 2015
* @author: <NAME>
*/
#include <stdint.h>
#include <hal/reg.h>
#include <drivers/common/memory.h>
#include <drivers/diag.h>
#include <drivers/ser... |
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
struct Node{
int num;
struct Node *prox;
};
typedef struct Node node;
unsigned int Head, Tail;
float inicio, final, tmili;
void inicia(node *fila);
int menu(void);
void opcao(node *fila, int op);
node *criaNo();
node *dequeue();
int enqu... |
/*
* (C) <NAME> - 2017y.
*
* A library management program that allows the registration of
* new books and readers, and borrowing books.
*/
#include "./LibraryApp.h"
void LibraryApp(void)
{
_cinit(852);
cDEFAULT_FONT();
cBUFFER(80, 60);
cSIZE(80, 60, 0, 0);
clrscr();
cCURSOR(false, 20);... |
#include <R.h>
#include <Rdefines.h>
#include <Rinternals.h>
#include "perplex.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
SEXP R_ini_phaseq(SEXP filename){
const char *instr;
char str[p_max_filename_len];
int ret;
SEXP result;
instr = CHAR(STRING_ELT(filename,0));
strncpy(str, instr, p_... |
#include "joystickmgr.h"
#include "util.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/joystick.h>
#include <pthread.h>
#include <stdbool.h>
#include <errno.h>
#define DEADBAND_VALUE 10000
#define JOY_DEV "/dev/i... |
/*
* Copyright (c) 2009 Red Hat, Inc.
*
* All rights reserved.
*
* Author: <NAME> (<EMAIL>)
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are m... |
/*
* Old U-boot compatibility for Walnut
*
* Author: <NAME> <<EMAIL>>
*
* Copyright 2007 IBM Corporation
* Based on cuboot-83xx.c, which is:
* Copyright (c) 2007 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Pub... |
/** @file func_REG_VAR.c
* @brief This file defines the data structure and routines associated with the function of type REG_VAR.
*
* This file is part of PFNET.
*
* Copyright (c) 2015, <NAME>.
*
* PFNET is released under the BSD 2-clause license.
*/
#include <pfnet/array.h>
#include <pfnet/func_REG_VAR.h>
s... |
/*
* File: cli.c
* Author: sstevens
*
* Created on April 9, 2019, 11:58 AM
*/
#include <stdio.h>
#include <string.h>
#include "xc.h"
#include "cli.h"
#include "user.h"
#include "project.h"
#include "ring_buffer.h"
#include "pwm.h"
#include "uart.h"
#include "axis.h"
//#include "encoder.h"
bool enter_cli_menu(... |
#include <naiveConsole.h>
#include <io.h>
#include <stdint.h>
#define RTL_VENDOR_ID 0x10EC
#define RTL_DEVICE_ID 0x8139
#define COMMAND_REGISTER 0x4
#define CONFIG_ADDRESS 0xCF8
#define CONFIG_DATA 0xCFC
/* Source: http://wiki.osdev.org/PCI */
uint16_t pciConfigReadWord (uint8_t bus, uint8_t slot,uint8_t func, uin... |
/******************************************************************************
*
* Copyright(c) 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted prov... |
#include <kernel.h>
#include <apic.h>
#define SEG_DESC_G (1 << 15) /* Granularity */
#define SEG_DESC_DB (1 << 14) /* Code: default size, Data: big */
#define SEG_DESC_L (1 << 13) /* Code: Long (64-bit) */
#define SEG_DESC_AVL (1 << 12) /* Available */
#define SEG_DESC_P ... |
/*
* Paparazzi $Id: main.c,v 1.1 2006/06/15 09:27:07 casse Exp $
*
* Copyright (C) 2003 <NAME>, <NAME>
*
* This file is part of paparazzi.
*
* paparazzi 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 Foundatio... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
//#define DEBUG
/* target checksum for a binary file */
#define SPIN_TARGET_CHECKSUM 0x14
/* spin object file header */
typedef struct {
uint32_t clkfreq;
uint8_t clkmode;
uint8_t chksum;
uint16_t pbase;
uint16_t vbase;
uint16_t db... |
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#define PUSH_FRONT 0
#define PUSH_BACK 1
#define POP_FRONT 2
#define POP_BACK 3
#define PRINT_LIST 4
#define HELP 5
#define QUIT 6
#define INVALID 7
#define BUFFER_SIZE 20
void printOptions();
int readInput(int* ... |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpidi_ch3_impl.h"
#include "mpidrma.h"
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_Win_shared_query
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNA... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <pcap/pcap.h>
#include <stdint.h>
#define DEFAULT_PORT 10000
#define MAX_SENDER 20
#define BUF_LEN 2000
#define PACKET... |
/**
* @file thread_context.h
* @brief AArch64 register dump format and related definitions.
* @author TuxSH
* @copyright libnx Authors
*/
#pragma once
#include "types.h"
/// Armv8 CPU register.
typedef union {
u64 x; ///< 64-bit AArch64 register view.
u32 w; ///< 32-bit AArch64 register view.
u32 r... |
#include<stdio.h>
#include<math.h>
#include<GL/glut.h>
typedef float Matrix4 [4][4];
Matrix4 theMatrix;
GLfloat input[8][3]=
{
{40,40,-50},{90,40,-50},{90,90,-50},{40,90,-50},
{30,30,0},{80,30,0},{80,80,0},{30,80,0}
};
float output[8][3];
float tx,ty,tz;
float sx,sy,sz;
float angle;
int choice,choiceRot;
... |
/* SPDX-License-Identifier: BSD-2 */
/*
* Copyright (c) 2018, Intel Corporation
* All rights reserved.
*/
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include "mutex.h"
#include "pkcs11.h"
#include "session_ctx.h"
#include "session_table.h"
#include "token.h"
#i... |
/*
* Copyright (C) 2014 <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, pu... |
/**
* This file is released under the UNLICENSE license, the terms of which are
* provided within the LICENSE file.
*/
#include <SDL2/SDL.h>
#include "sdl2_picofont.h"
#define CHK(x) if(!(x)) { \
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \
"%s:%d: %s", \
__func__, __LINE_... |
//metadoc OggStreamState copyright <NAME>, 2004
//metadoc OggStreamState license BSD revised
//metadoc OggStreamState category Audio
/*metadoc OggStreamState description
A wrapper around the libogg ogg_stream_state object.
*/
#include "IoOggStreamState.h"
#include "IoOggPacket.h"
#include "IoOggPage.h"
#include "IoSta... |
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code 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 Softwa... |
// <NAME>
// ti812979
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ListyString.h"
#define STRING_MAX 1024
//OPERATOR INDEX, the index which the operator is expected to be found at
#define OP_INDEX 0
//KEY_INDEX, the index which the key is expected to be found at
#define KEY_INDEX 2
//STR_OFFSE... |
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_STRING_LENGTH 6
struct package {
char* id;
int weight;
};
typedef struct package package;
struct post_office {
int min_weight;
int max_weight;
... |
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include "network_handler.h"
#define TRUE 1
#define FALSE 0
/**
* set a listening socket fd on a specific port
* @param port "8053"
* @return listened socket fd
... |
#include "hs_zk.h"
// ----------------------------------------------------------------------------
// Callback Functions
// ----------------------------------------------------------------------------
void hs_zookeeper_watcher_fn(zhandle_t* zh, int type, int state,
const char* path, void*... |
/*-
* Copyright (c) 1980, 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the abov... |
/*
* nivek_system.c
*
* Created on: Jul 14, 2013
* Author: Kevin
*/
#include "nivek_system.h"
#include <string.h>
#include "common/twb_debug.h"
#include "common/twb_leds.h"
#include "twb_eeprom.h"
#include "common/twb_serial_eeprom.h"
#include "commo/message_ids.h"
#include "common/memory_mgmt.h"
#include... |
#include "config.h"
//最大全局策略表大小
struct strgytable strategy_tables[MAX_DESTABLE_NUM];
//开关策略
struct strgy_swtable strategy_swtables[MAX_DESTABLE_NUM];
extern void zigbee_operate(struct devTable *pdevTbs, uint8_t priority, uint8_t force, uint8_t immediate);
extern void Zigebee_setIOBynetId(struct devTable *pdevTb... |
/*
Copyright (c) 2007 <NAME> <<EMAIL>>
Copyright (c) 2007 Center for Bioinformatics, University of Hamburg
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 cop... |
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/time.h>
#include "../common/galaxy_utils.h"
float *real_rasc, *real_decl, *rand_rasc, *rand_decl;
long int numberOfGalaxies = 100000;
int main(int argc, char* argv[])
{
struct timeval _ttime;
struct timezone _tzone;
... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#define MAX(a, b) (a > b ? a : b)
#define MIN(a, b) (a > b ? b : a)
void swap(int* arr, int i, int j) {
int tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
}
long long current_timestamp() {
struct timeval te;
gettimeofday(&te, NUL... |
// DSWifi Project - sgIP Internet Protocol Stack Implementation
// Copyright (C) 2005-2006 <NAME> - <EMAIL> - http://www.akkit.org
/******************************************************************************
DSWifi Lib and test materials are licenced under the MIT open source licence:
Copyright (c) 2005-2006 <NAME>... |
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <ddk/binding.h>
#include <ddk/debug.h>
#include <ddk/device.h>
#include <ddk/metadata.h>
#include <ddk/platform-defs.h>
#include <ddk/protocol/pla... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define LENGTH 3
#define EMPTY 0
#define CROSS 1
#define NOUGHT -1
#define MAXCOOR (LENGTH - 1)
#define FIELDS (LENGTH * LENGTH)
#define LINES (LENGTH + LENGTH + 2)
#define COLS ((FIELDS + 1) * (LENGTH + 1))
int turn = 0;
int board[FIELDS];
type... |
/*
* Copyright 2020-2021 Herald Project Contributors
* SPDX-License-Identifier: Apache-2.0
*
*/
#include "logger/herald_logger.h"
#include "ble/BleOsScanner.h"
#include "ble/BleScanner.h"
#include "data_type/DataTypes.h"
#include <zephyr.h>
#define APPLE_MANUFACTURER_ID 0x004C
/**
* \brief
... |
/* dnet: commands; T11.261-T13.808; $DVS:time$ */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <unistd.h>
#include "dnet_command.h"
#include "dnet_database.h"
#include "dnet_packet.h"
#include "dnet_stream.h"
#include "dnet_files.h"
#incl... |
/*
search routine generated by gen.
skip=fast, match=rev (using revr), shift=d12
*/
/*
* The authors of this software are <NAME> and <NAME>.
*
* Copyright (c) 1991 by AT&T and <NAME>.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that... |
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "constants.h"
#include "file_helpers.h"
#include "neural_net.h"
char jcky_write_file(
nn_type **data,
nn_type **targets,
const unsigned int records,
const unsigned int data_len,
const unsigned int targets_len,
char *filename)... |
/*
Codelet from MILEPOST project: http://cTuning.org/project-milepost
Updated by <NAME> to work with Collective Mind Framework
3 "./takehiro.codelet__16.wrapper.c" 3 4
*/
#include <stdio.h>
int __astex_write_message(const char * format, ...);
int __astex_write_output(const char * format, ...);
void __... |
#include <stdint.h>
#include <string.h>
#include <endian.h>
#include "config.h"
/* Model ID */
enum {
MODEL_UNKNOWN = 0,
MODEL_WNDR4500v2,
MODEL_ELEMENTS
};
/* Model string (ID-indexed) */
const char *MODELS_s[] = {
"unknown",
"WNDR4500v2"
};
/* Model magic (ID-indexed) */
const unsigned int MODELS_m[] = {
0... |
#include "keybow.h"
#include "serial.h"
#ifndef KEYBOW_NO_USB_HID
#include "gadget-hid.h"
#endif
#include "lights.h"
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdio.h>
#include <bcm2835.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <unistd.h>
int ... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <math.h>
#include <stdint.h>
#include <unistd.h>
#include <dlfcn.h>
#include "citrine.h"
char* np;
/**
* Determines the size of the specified file.
*/
int fsize(char* filename) {
int size;
FILE* fh;
fh =... |
/*
realpath() Win32 implementation
By <NAME>.
Copyright (C) September 8, 2005
I am placing this in the public domain for anyone to use or modify
*/
#include "wininclude.h"
#include "stdlib_ex.h"
#include <limits.h>
#include <errno.h>
#include <sys/stat.h>
#include <math.h>
#ifndef PATH_MAX
#define PATH_MAX 4096
#end... |
/***************************************************************************
* cameraModel.cpp - description
*
* This program is part of the Etiseo project.
*
* See http://www.etiseo.net http://www.silogic.fr
*
* (C) Silogic - Etiseo Consortium
* Modified by <NAME>
***********************... |
/*
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 may not use this f... |
/*
* Copyright (c) 2012 <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... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2017 NXP
* All rights reserved.
*
* THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AR... |
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
* See packages/seacas/LICENSE for details
*/
#include "defs.h" // for TRUE, FALSE
#include "s... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _TypeList TypeList;
struct _TypeList {
size_t size;
size_t _typeSize;
size_t _iterator;
void(*push)(TypeList**, char*);
char*(*get)(TypeList**, int);
void(*remove)(TypeList**, int);
char*(*next)(TypeList**);
vo... |
#include <asf.h>
#include <asf_meta.h>
#include <cla.h>
#include <asf_contact.h>
// Includes for the stat() function
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
// Define strings for usage and help info
#define ASF_NAME_STRING \
"chgndv"
#define ASF_USAGE_STRING \
"Usage:\n"\
" "ASF_NAME... |
/*
* Copyright (c) 1980, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME> at The University of Melbourne.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted... |
//-------------------------------------------------------------------------
// This program checks the rigidity of various structures by building them
// as mass-spring systems and seeing if they stay rigid under various
// forces and gravity.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h... |
#include <stdio.h>
#include <stdlib.h>
#include "client.h"
#include <signal.h>
#include <pthread.h>
int sd;
/**
* Trying to handle the Ctrl+C signal to inform the server that we're disconnecting
*/
void handler_arret(int signum)
{
printf("Préparation d'un signal pour déconnexion\n...");
Message signal;
signal.ac... |
#include "fxas21002.h"
// Library for use of the fxos8700
// This will set to high accuracy accel and magnotometer
#define INDEX_BREAK 50
// AREA FOR THE FXOS8700
#define ADDR_FXAS21002 0x21
#define GYRO_REG_STATUS 0x00 // CURRENTLY USED
#define CTRL_REG0 0x0D
#define CTR... |
#include <stdio.h>
#include <inttypes.h>
#include "common/selector.h"
#include "metric/namespace.h"
#include "events/context_arg.h"
#include "common/http.h"
#include "main.h"
#define LIGHTTPD_LABEL_SIZE 100
void lighttpd_status_handler(char *metrics, size_t size, context_arg *carg)
{
json_parser_entry(metrics, 0, NULL... |
/*************************************************************************************************************
Copyright 2021-2022, Skyworks Solutions, 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 Lice... |
//transmitor
// FINAL DRAFT - 4:56
#include <asf.h>
#include <string.h>
#include "config.h"
#include "phy.h"
#include "nwk.h"
#include "sys.h"
#include "sysTimer.h"
#include "at30tse75x.h"
uint16_t light2;
uint16_t temp;
typedef struct{
uint32_t startDelimeter;
uint16_t length;
uint16_t sequenceNumber;
uint1... |
#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... |
/*
* yaidsconf.c - YAIDS Configuration Source Code
*
* This file is a part of or derived from YAIDS: https://github.com/wrayjustin/yaids
*
* COPYRIGHT (C) 2020 <NAME> - <EMAIL> / https://www.justinwray.com
* ALL RIGHTS RESERVED
*
* Redistribution and use in source and binary forms, with or without modifi... |
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <string.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include "../glr.h"
void
testglrparse(const char *input, int expected)
{
char buffer[64];
const char *endname = NULL;
int result, x, y;
result = glrparse(input, &endname, &x,... |
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#define IS_DIR(mode) ((mode & S_IFMT) == S_IFDIR)
// Static variables used to save the set options (-r, -R, -i or ... |
#include "assert.h"
#include "gpio.h"
#include "timer.h"
void test_gpio_set_get_function(void) {
gpio_init();
// Test get pin function (pin2 defaults to input)
assert( gpio_get_function(GPIO_PIN2) == GPIO_FUNC_INPUT );
// Test set pin to output
gpio_set_output(GPIO_PIN2);
// Test get pin fun... |
char Shader_grassRender_VS_String [] =
"#version 330 \n"\
" \n"\
"// position are regular vertex attributes \n"\
"layout (location = 0) in vec3 inLocalPosition; \n"\
"layout (location = 1) in vec2 inLocalUV; \n"\
"// inModelPosition will be used as a per-insta... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
/* defining macros for ANSI escape codes */
#define RED_BOLD "\033[31;1m"
#define BOLD "\033[1m"
#define ITALIC "\033[3m"
#define RESET "\033[0m"
/* defining the huffman tree node as t_node */
typedef... |
// SPDX-License-Identifier: GPL-2.0
#include "cpumap.h"
#include "env.h"
#include "sane_ctype.h"
#include "util.h"
#include <errno.h>
#include <sys/utsname.h>
struct perf_env perf_env;
void perf_env__exit(struct perf_env *env)
{
int i;
zfree(&env->hostname);
zfree(&env->os_release);
zfree(&env->version);
zfree(... |
// Week 3 submission - rational numbers
// Open and read a file of integer pairs into an array that is created with the first
// integer telling you how many to read.Each pair will be a struct rational - meaning
// it represents a rational number.So a struct will have two members - the numerator and
// the denominator.... |
/*
Based on parts of the GNU C Library:
Common code for file-based database parsers in nss_files module.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under t... |
/* vim: set filetype=c : */
/* vim: set noet tw=80 ts=8 sw=8 cinoptions=+4,(0,t0: */
/*
* Copyright 2014-2017, <NAME>
*
* 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 reta... |
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
/*
Intuition
We represent the fish's numbers with a tree implemented with an array (like a heap).
As the tree is not complete, we use a field 'status' to mark if a node is a LEAF, EMPTY or DEFAULT (a node which is not a... |
#include <ui.h>
#include "napi_utils.h"
#include "values.h"
static const char *MODULE = "FontAttribute";
// font-opentype.c
typedef struct {
uiOpenTypeFeatures *otf;
bool shouldFree;
} FeaturesHandle;
napi_value create_otf_external(napi_env env, FeaturesHandle *h);
typedef struct {
uiAttribute *attr;
bool append... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.