text stringlengths 3.08k 10.5k |
|---|
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include "parser.h"
char ***argv;
int argvc;
int argc;
char *filev[3];
int bg;
int pos;
int getNewC(char *arg){
//To count all the chars whenever we separate the char (pipeline or ;)
int y =0;
while(arg[y]){
y++;
}
return y;
}... |
/*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* 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 requir... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_BUFFER_LENGTH 8192
typedef struct _tests {
char * filename;
unsigned long long start_range;
unsigned long long end_range;
} Tests;
static Tests tests[] = {
{"../tests/1.txt", 1, 32}, // correct answer should be: 53 characters
... |
/*
* Test tilesort SPU bucketing with display lists and bounding boxes.
*
* <NAME>
* 3 Feb 2003
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "chromium.h"
static glChromiumParametervCRProc glChromiumParametervCR_ptr;
static glChromiumParameteriCRPr... |
#pragma once
#include "../../../../../Utils/Utils.h"
#include "SHA1\sha1.h"
void initializePpp();
int connectedPpp();
void waitForPcConnectString();
void waitForPppFrame();
void determinePacketType();
void sendUdpData();
/// PPP header
typedef struct { // [ff 03 00 21]
unsigned int address : 8; // always 0xff
... |
#include "overlay.h"
#include "graphics.h"
#include "common/debug/debug.h"
#include "common/memory.h"
void overlay_initialize(void)
{
// begin -- windows specific
g_overlaybuffer.hw_pal = (color555_t*)memory_allocate(sizeof(color555_t) * 256, MEMORY_DEVELOPMENT);
g_overlaybuffer.hw_ovram = (tile_t*)memory_alloca... |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#if 0
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/can.h>
#include <ctype.h>
#include <netdb.h>
#include "mybmm.h"
#endif
#include "utils... |
#pragma once
#include <stdlib.h>
#include <stdint.h>
// this library contains functions to work with a text terminal.
//
// types:
// canvas_t
/// color
typedef struct {
uint8_t r; ///< red component (0..255)
uint8_t g; ///< green component (0..255)
uint8_t b; ///< blue component (0..255)
uint8_t a;... |
#include <inc/lib.h>
struct MyStruct
{
char a;
short b;
int c;
};
void _main(void)
{
int Mega = 1024*1024;
int kilo = 1024;
char minByte = 1<<7;
char maxByte = 0x7F;
short minShort = 1<<15 ;
short maxShort = 0x7FFF;
int minInt = 1<<31 ;
int maxInt = 0x7FFFFFFF;
void* ptr_allocations[20] = {0};
{
/... |
/* This file is part of The Firekylin Operating System.
*
* Copyright 2016 Liuxiaofeng
*
* 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/LIC... |
/* _______ _____ _ ___ _______ _ _____
* |__ __|_ _| \ | \ \ / / ____| | |_ _|
* | | | | | \| |\ \_/ / | | | | |
* | | | | | . ` | \ /| | | | | |
* | | _| |_| |\ | | | | |____| |____ _| |_
* |_| |_____|_| \_| |_| \_____|______|_____|
*
* Author: ... |
//
// <NAME>
// USP São Carlos
// Computer Scientist
//
#include <stdlib.h>
#include <stdio.h>
char** read_game(int* first, int* second){ // function for alocate and save info about the matrix
int i, j; // declare auxiliar integers
char c; // dec... |
/* Lisp lists
Copyright (c) 2001 Scott "Jerry" Lawrence.
Copyright (c) 2005 <NAME>.
All rights reserved.
This file is part of Zile.
Zile 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; eithe... |
/**
******************************************************************************
* @file stm32f1xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
*
* COPYRIGHT(c) 2016 STMicroelectronics
*
* Redistribution and use in source... |
/** \file phy_uart.c
* \brief A mock implementation of physical layer between devices
* \author Angaza
* \copyright 2021 Angaza, Inc.
* \license This file is released under the MIT license
*
* The above copyright notice and license shall be included in all copies
* or substantial portions of the Software.
*
* ... |
/* SPDX-License-Identifier: LGPL-2.1+ */
#include "exit-status.h"
#include <signal.h>
#include <stdlib.h>
#include <sysexits.h>
#include "macro.h"
#include "set.h"
const char* exit_status_to_string(int status, ExitStatusLevel level)
{
/* Exit status ranges:
*
* 0…1 │ ISO C, EXIT_SUCCESS + EXIT_FA... |
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <net/if.h>
#include <netinet/ether.h>
#include <unistd.h>
#include ... |
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright (C) 2019 Kontron Europe GmbH */
/* Information about the disk system attached to the board. */
#include "shell_tools.h"
const char disk_usage[] = "\
* GetDiskDriveCount\n\
* GetDiskDriveList\n\
* GetMountPointCount\n\
* GetMountPointList\n\
* GetDisk... |
/***********************************************************************
* XGSERVER EXTENSION
* index.c
* Расширение: обработка index страницы
*
* Copyright (с) 2014-2015 <NAME>, <EMAIL>
**********************************************************************/
#include "core.h"
#include "kv.h"
#include "server.h... |
#include <assert.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sndfile.h>
struct _t
{
char error_message[255];
};
typedef struct _t t;
static char* copy_string (char* dst, const char* src, size_t max_length)
{
strncpy(dst, src, max_length);
if (max_length ... |
/*
* Copyright (c) 1997-2003 by The XFree86 Project, 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, ... |
#include "module/apic/apic.h"
#include "module/pit.h"
#include "module/timer.h"
#include "module/interrupt.h"
#include "module/heap.h"
#include "kernel/modloader.h"
#include "kernel/logging.h"
#include "kernel/io.h"
#define APIC_LVT_TMR 0x320
#define APIC_TMRINITCNT 0x380
#define APIC_TMRCURRCNT 0x390
#define APIC... |
#include <string.h>
#include <math.h>
#include "board.h"
#include "radio.h"
#include "gpio.h"
/*!
* User application data buffer size
*/
//#define LORAWAN_APP_DATA_MAX_SIZE 242
#define DATA_SIZE 16 // 16 bytes
/*!
* User application data
*/
st... |
/*
* 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
... |
// Like all good code, this one was stolen directly from SO:
// https://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion
#include "color.h"
#include <math.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#define MAX(A, B) (((A) > (B)) ? A : B)
#define MAX3(A, B, C) MAX(A, MAX(B, C)... |
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2020 Facebook */
#include <argp.h>
#include <signal.h>
#include <stdio.h>
#include <time.h>
#include <sys/resource.h>
#include "egress_prover.h"
#include "egress_prover.skel.h"
#include <bpf/libbpf.h>
unsigned long long start_ts = 0;
static struc... |
#include "wrappers.h"
#include "jobs.h"
#include "signals.h"
#define MAXARGS 128
#define MAXLINE 8192
#ifndef MAXJOBS
#define MAXJOBS 16
#endif
void eval(char *cmdline);
int parseline(char *buf, char **argv);
int builtin_command(char **argv);
pid_t jobs[MAXJOBS] = {0};
pid_t fg_job = 0;
sigjmp_buf buf;
volatile... |
/*
* The Mersenne Twister pseudo-random number generator (PRNG)
*
* This is an implementation of fast PRNG called MT19937, meaning it has a
* period of 2^19937-1, which is a Mersenne prime.
*
* This PRNG is fast and suitable for non-cryptographic code. For instance, it
* would be perfect for Monte Carlo simula... |
/*
* pngnq-s9: neuquant32.h
*
* ------------------------------------------------------------------------
* pngnq-s9 Authorship and Copyright
* --------------------------
*
* pngnq-s9 is a modification of pngnq. pngnq is based on pngquant and
* the NeuQuant procedure. pngquant, in turn, was based on ppm... |
/* $NetBSD: ctypeio.c,v 1.1 1997/06/02 09:52:47 kleink Exp $ */
/*
* Copyright (c) 1997 <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 ret... |
/*************************
Frame.c: satellite downlink "frame"-reading utilities.
The satellite sends down data in fixed-sized "frames",
which make up part of an entire echo line. The frames
typically have some sort of synchronization code at the
beginning, some metadata, and then a payload.
Because this data has alr... |
// Created by <NAME>
// MIT License
// https://github.com/makuto/emacs-fuzzy-module
#include "fuzzy.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
/* #define FUZZY_MATCH_DEBUG */
#ifdef FUZZY_MATCH_DEBUG
#include <stdio.h>
#endif
static bool fuzzy_StringRegionEquals(char const* aBegin, char const* a... |
/* gdkproperty-quartz.c
*
* Copyright (C) 2005 Imendio AB
*
* 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
* version 2 of the License, or (at your option) any later version... |
/*
* Amazon FreeRTOS Demo Bootloader V1.4.7
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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 rest... |
/* parse.c - expression parser
*
* Copyright (c) 2020 by <NAME>. All rights reserved.
*
*/
#include <stdlib.h>
#include "compile.h"
/* local variables */
static char *storageClassNames[] = {
"unknown",
"constant",
"variable",
"function"
};
static char *typeNames[] = {
"unknown",
"integer... |
/*
* Support Hypertransport IRQ
*
* Copyright (C) 1997, 1998, 1999, 2000, 2009 <NAME>, <NAME>
* Moved from arch/x86/kernel/apic/io_apic.c.
* <NAME> <<EMAIL>>
* Add support of hierarchical irqdomain
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General ... |
#include <baobzi.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
struct timespec get_wtime() {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts;
}
double get_wtime_diff(const struct timespec *ts, const struct timespec *tf) {
return (... |
/* ECDH key-agreement protocol
*
* Copyright (c) 2016, Intel Corporation
* Authors: <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, ... |
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* ... |
/*
* Numpad_frame.c
*
* Created on: Jul 29, 2021
* Author: <NAME>
*/
#include "../Touch_screen.h"
#include "../Hardware/ILI9341.h"
static void shift_keyboard(uint8_t keyboard_page);
uint8_t STM32_PLC_LCD_Call_Keyboard_Logic(char word[]) {
char text[17] = "";
uint8_t k = 0;
uint8_t keyboard_page = 6; /*... |
/*
* Copyright (c) 1992, 1993
* Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright... |
/*
NetWinder Floating Point Emulator
(c) Rebel.COM, 1998,1999
Direct questions, comments to <NAME> <<EMAIL>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 ... |
#include "bios.h"
#include "ioport.h"
#include "pci.h"
#include <string.h>
static uint16_t addend;
static uint8_t bus, bridge_head;
static bool use_i440fx_routing;
static int bridge_count;
uint8_t max_bus;
static void do_setup_pci_bus(void);
static void pci_foreach(void(*fn)(uint32_t bdf, uint32_t id, uint8_t type))... |
// Copyright (C) 2020, <NAME>. All rights reserved.
// This file is part of rtuart project licensed under the terms of the 2-clause
// BSD license. See the LICENSE file found in the top-level directory of this
// distribution.
#include <rtuartscreader/iso7816_3/apdu_t0.h>
#include <rtuartscreader/iso7816_3/detail/err... |
/*
* Copyright 2017 RIS.
* Authored by <NAME> <<EMAIL>>
*/
#include "lists.h"
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <assert.h>
#include "logging.h"
int posix_memalign(void **memptr, size_t alignment, size_t size);
#ifdef CACHE_COHERENT_ALIGNMENT
static const int al... |
/*
Copyright 2002-2006 <NAME>, All Rights Reserved
*/
#define INITIAL_SET_SIZE_INDEX 2
#define INITIAL_VEC_SHIFT 3
#define INITIAL_VEC_SIZE (1 << INITIAL_VEC_SHIFT)
#define INITIAL_VEC_SIZE (1 << INITIAL_VEC_SHIFT)
#define INTEGRAL_VEC_SIZE 3
#define INTEGRAL_STACK_SIZE 8
#define TRICK_VEC_SIZE (INITIAL_VEC_SIZE ... |
/******************************************************************************
* qLibc - http://www.qdecoder.org
*
* Copyright (c) 2010-2012 <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
//------------------------------------------------------------------------------
// 4190.308 Computer Architecture Spring 2019
//
// Cache Simulator Lab
//
// File: cache.c
//
// (C) 2015 Computer Systems and Platforms Laboratory, Seoul National University
//
// Changelog
// 20151119 ... |
#include "types.h"
#include "stat.h"
#include "user.h"
#include "param.h"
// Memory allocator by <NAME> Ritchie,
// The C programming Language, 2nd ed. Section 8.7.
typedef long Align;
union header {
struct {
union header *ptr;
uint size;
} s;
Align x;
};
typedef union header Header;
static Header... |
/*****************************************************************************\
** ttbincnv.c **
** TTBIN file converter **
\*****************************************************************************/
... |
#include <assert.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "termgl.h"
typedef struct STLTriangle {
float normal[3]; //normal is unreliable so it is not used.
float vertices[3][3];
uint16_t attribute_bytes; //attribute bytes is un... |
/* Produced by CVXGEN, 2014-05-20 16:06:21 -0400. */
/* CVXGEN is Copyright (C) 2006-2012 <NAME>, <EMAIL>. */
/* The code in this file is Copyright (C) 2006-2012 <NAME>. */
/* CVXGEN, or solvers produced by CVXGEN, cannot be used for commercial */
/* applications without prior written permission from <NAME>. */
/* Fi... |
/*
* $Id: wce_localtime.c,v 1.2 2006/04/09 16:48:18 mloskot Exp $
*
* Defines localtime() function.
*
* Created by <NAME> (<EMAIL>)
*
* Copyright (c) 2006 Taxus SI Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation fi... |
/* $ReOpenLDAP$ */
/* Copyright 1990-2018 ReOpenLDAP AUTHORS: please see AUTHORS file.
* All rights reserved.
*
* This file is part of ReOpenLDAP.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
* A copy... |
/**
* @brief Display images in a Toaru terminal.
*
* @copyright
* This file is part of ToaruOS and is released under the terms
* of the NCSA / University of Illinois License - see LICENSE.md
* Copyright (C) 2016-2018 <NAME>
*/
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <unistd.h>
#includ... |
// All port definitions
#define GPIO_PORTA_DATA_R (*((volatile unsigned long *)0x400043FC))
#define GPIO_PORTA_DIR_R (*((volatile unsigned long *)0x40004400))
#define GPIO_PORTA_AFSEL_R (*((volatile unsigned long *)0x40004420))
#define GPIO_PORTA_PUR_R (*((volatile unsigned long *)0x4000451... |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013-2017 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
... |
/*-
* 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 writing, software
* distribute... |
/*
* Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution... |
/* -*- mode: C -*- */
/*
IGraph library.
Copyright (C) 2008-2012 <NAME> <<EMAIL>>
334 Harvard street, Cambridge, MA 02139 USA
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; e... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
#define IP "127.0.0.1"
#define PORT 3000
#define MAX_CLIENT 1024
#define MAX_DATA 1024
static struct termios term_old;
void in... |
/**
* @file pclb.c
*
* @copyright
* Please read the Exosite Copyright: @ref copyright
*
* @if Authors
* @authors
* - <NAME> (<EMAIL>)
* - <NAME> (<EMAIL>)
* @endif
*
* @brief
* This file implements the Exosite Server specific HTTP API
**/
#include <assert.h>
#include <lib/error.h>
#include <lib/type.h... |
/*
* shell.c
*
* Copyright 2021 chehw <<EMAIL>>
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the right... |
// MIT License
//
// Copyright (c) 2021 <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, merg... |
/**
* @file tabmanager.c
* @brief
*
* Copyright (C) 2009-2012 Gummi-Dev Team <<EMAIL>>
* All Rights reserved.
*
* 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
* restricti... |
/*
* Facultad de Ingenieria, Universidad de la Republica, Uruguay.
* <NAME>, <NAME>, <NAME>, <NAME>
* Based on: "Send a fake keystroke event to an X window." by <NAME> - http://www.doctort.org/adam/
* License at file end.
*/
// para compilar: g++ -o XFakeKey XFakeKey.cpp -L/usr/X11R6/lib -lX11
#include "nexo_eve... |
/* pbmmake.c - create a blank bitmap of a specified size
*
* <NAME> ("Douso") wrote some of the core code that went
* into the Netpbm 10.23 (July 2004) version of this program and licenses
* that code to the public under GPL.
*
* <NAME> wrote the rest of that version and contributed his
* work to the public doma... |
/* see sys/switches.h.template */
/* CHANGE LOG
* --------------------------------------------------------------------
* 28Apr03 dm major reorganization of conditional compilation in Nyquist
*/
#define HAS_STDLIB_H 1
#define HAS_SYS_TYPES_H 1
#define HAS_SYS_STAT_H 1
#undef HAS_STAT_H
#undef HAS_MALLOC_H
#defin... |
/*
* Copyright 2018-present MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
/* abqtest.c: AVAILABLE BLOCK QUEUE TEST
*
* $Id$
* Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license.
*/
#include "abq.h"
#include "mps.h"
#include "mpsavm.h"
#include "mpscmfs.h"
#include "mpstd.h"
#include "testlib.h"
#include <stdio.h> /* printf */
SRCID(abqtest, "$Id$");
static mps_... |
/**
* GHETT-iO
*
* Handles a single DDR pad, using only a PSoC 5LP dev board. (CY8CKIT-059)
*
* The CY8CKIT-059 development board is a cheap I/O board based on the PSoC 5LP
* line of microcontrollers from Cypress Semiconductor. These boards combine
* an ARM cortex M3 CPU with programmable logic and analog capab... |
// This will apply the sobel filter and return the PSNR between the golden sobel and the produced sobel
// sobelized image
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
#define SIZE 4096
#define INPUT_FILE "input.grey"
#define OUTPUT_FILE "output_sob... |
/*
* LIBOIL - Library of Optimized Inner Loops
* Copyright (c) 2005 <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:
* 1. Redistributions of source code must retain the a... |
// ---------------------------------------------------------------------
// Created date: 17.11.2015
// ---------------------------------------------------------------------
/***********************************************************************
Copyright (c) 2016 ATIM
Permission is hereby granted, free of cha... |
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include "lexer.h"
typedef struct {
char name[8];
TokenType tok;
} CMD;
CMD cmds[]={
{"di", T_DISK_INIT},
{"ds", T_DISK_STATUS},
{"dd", T_DISK_DUMP},
{"step", T_STEP},
{"help", T_HELP}
};
/* Token data */
TokenType token; /* ... |
#include "common.h"
#include "unistd.h"
struct BLZ_Vector4 clearColor = {0, 0, 0, 0};
struct BLZ_Vector4 colors[12] = {
{1, 0, 0, 1},
{0, 1, 0, 1},
{0, 0, 1, 1},
{1, 1, 0, 1},
{0, 1, 1, 1},
{1, 0, 1, 1},
{1, 0, 0, 0.5f},
{0, 1, 0, 0.5f},
{0, 0, 1, 0.5f},
{1, 1, 0, 0.5f},
{0, 1, 1, 0.5f},
{1, 0, 1, 0.5f},
}... |
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyr... |
/*****************************************************************************
*
* Atmel Corporation
*
* File : USI_TWI_Master.h
* Compiler : AVRGCC Toolchain version 3.4.2
* Revision : $Revision: 992 $
* Date : $Date: 2013-11-07 $
* Updated by : $Author: Atmel $
*
* S... |
// Libs
#include "gallows.h"
// Global's properties
char newChance[CHANCE_LENGTH];
/**
* Set level for game
*/
int level() {
header();
int levelGame = 0, range = 10;
printf("\n Game Level\n");
printf("----------------\n");
printf(ANSI_COLOR_GREEN "E A S Y" ANSI_COLOR_RESET... |
/* This program by <NAME> is in the public domain and freely copyable.
* It is explained in Seminumerical Algorithms, 3rd edition, Section 3.6
* (or in the errata to the 2nd edition --- see
* http://www-cs-faculty.stanford.edu/~knuth/taocp.html
* in the changes to Volume 2 on pages 171 and follow... |
//
// main.c
// Esercizio-13.7
//
// Created by <NAME> on 27/12/20.
//
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#define N 4
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_RESET "\x1b[0m"
in... |
/* ascii.c -*-c-*-
* ASCII text reader.
* Author: <NAME>
*
* This program is part of the SNESoIP project and has has been released
* under the terms of a BSD-like license. See the file LICENSE for
* details. */
#include <snes.h>
extern char snesfont;
char asciiTable[170];
void clear();
voi... |
/******************** NEW STUFF *******************/
#include "video/segaic16.h"
#include "sound/upd7759.h"
/*----------- defined in video/segahang.c -----------*/
VIDEO_START( hangon );
VIDEO_START( sharrier );
VIDEO_UPDATE( hangon );
/*----------- defined in video/segas16a.c -----------*/
VIDEO_START( system16a ... |
#include "c4-internal.h"
#include "nodes/nodes.h"
#include "types/expr.h"
static char *
get_op_kind_str(AstOperKind op_kind)
{
switch (op_kind)
{
case AST_OP_PLUS:
return "+";
case AST_OP_MINUS:
return "-";
case AST_OP_TIMES:
return "*";
ca... |
/*
PsychtoolboxGL/Source/Common/PsychHID/PsychHIDKbQueueStart.c
PROJECTS:
PsychHID only.
PLATFORMS:
All.
AUTHORS:
<EMAIL> rpw
<EMAIL> mk
HISTORY:
8/19/07 rpw Created.
8/23/07 rpw Added PsychHIDQueueFlush to documentation; removed call to PsychHIDVerif... |
#include "test.h"
#define READONLY 1
#define DEFAULT 1
#define CAPACITY 10
#define TOSTR(n) qt_string_number_double(n, 'g', 6)
typedef struct context {
void *context;
void *ui_lineEdit;
} context_t;
/* Global variables */
double result = 0.0;
int flag_add = 0;
int flag_div = 0;
int flag_mul = 0;
int flag_minus =... |
/** _____ ,-.
* _______ _____ _____ ___ _,. / /
* ___ |__ ____(_)_____ __ /______________ __ ; \____,-==-._ )
* __ /| |_ | / /_ /_ __ `/ __/ __ \_ ___/ _ //_ `----' {+>
* _ ___ |_ |/ /_ / / /_/ // /_ ... |
/* Basic complex arithmetic. Everything assumed to be in Cartesian form
and made to stay that way.
*/
#include <stdio.h>
#include "bigfloat.h"
/* set a float to a constant 1 */
void bf_one( FLOAT *x)
{
bf_null( x);
x->expnt = 1;
x->mntsa.e[MS_MNTSA] = 0x40000000;
}
/* zero out a complex storage location ... |
/*
* TCP protocol
* Copyright (c) 2002 <NAME>.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your optio... |
#include "firmware_downloader.h"
#include <platform/firmware.h>
#include <platform/sockets.h>
#include <platform/memory.h>
#include <string.h>
#include <platform/eventloop.h>
#include <platform/debug.h>
#define FIRMWARE_DOWNLOADER_URI_PROTOCOL "firm://"
#define FIRMWARE_DOWNLOADER_CHUNK_SIZE 512
#define FIRMWARE_DOWN... |
/* libiptbwctl -- A userspace library for querying the bandwidth iptables module
* Originally designed for use with Gargoyle router firmware (gargoyle-router.com)
*
*
* Copyright © 2009 by <NAME> <<EMAIL>>
*
* This file is free software: you may copy, redistribute and/or modify it
* under the terms of th... |
/* silhouette.c - by <NAME>, SGI */
/* Doing Silhouette Edges with stencil */
#include <GL/glut.h>
#include <stdlib.h>
#include <math.h>
enum {
CONE = 1
};
/* Draw a cone */
void
cone(void)
{
glPushMatrix();
glTranslatef(0.f, 0.f, -30.f);
glCallList(CONE);
glPopMatrix();
}
/* Draw a torus */
void
torus(... |
// See LICENSE.BU for license details.
/**********
* Author: <NAME>
*
* File: DANA_BENCHMARK.c
*
* Description: Contains the definitions for the methods in DANA_BENCHMARK.h
* DANA_BENCHMARK runs transactional testing on the XFILES/DANA System
* The functions contained in this program are defin... |
/*
* kjg_fpca.c
*
* Created on: Apr 28, 2014
* Author: Kevin
*/
#include <stdio.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_blas.h>
#include "kjg_fpca.h"
#include "kjg_gsl.h"
#include "admutils.h"
#include "gval.h"
size_t KJG_FPCA_ROWS = 256;
vo... |
/* GStreamer
*
* unit test for mpeg2enc
*
* Copyright (C) <2006> <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 the License, or (at you... |
/*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* 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 requir... |
#include <stdio.h>
#include <stdlib.h>
#include "sorting.h"
/**
* Function that takes Filename and Size as parameters and loads a file
* data read from the file is stored into an array that is then returned.
*/
long *Load_File(char *Filename, int *Size)
{
FILE *fptr = NULL;
fptr = fopen(Filename, "r");
if (fptr ... |
#include "global.h"
#include "commands.h"
#include "cmd.h"
#include "util.h"
#include "file_util.h"
#include "graphs_load.h"
#include "binary_kmer.h"
// TODO: add .ctp.gz indexing
const char index_usage[] =
"usage: "CMD" index [options] <in.ctx>\n"
"\n"
" Index a sorted cortex graph file (sort with `"CMD" sort` firs... |
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include "parsefile.h"
#include "getline.h"
#define NONULL(x) ( x==NULL ? "" : x) /* this is nice, found in the mutt code */
struct paramlist * paramlist_init(void)
{
struct paramlist *pl;
... |
/*
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.