text stringlengths 3.08k 10.5k |
|---|
// RUN: %clang_cc1 -no-opaque-pointers -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s
// CHECK-LABEL: define dso_local i64 @f1_1()
// CHECK-LABEL: define dso_local void @f1_2(i32 %a0.0, i32 %a0.1)
struct s1 {
int a;
int b;
};
struct s1 f1_1(void) { while (1) {} }
void f1_2(struct s1 a0) {}
// CHECK-LA... |
/*
BASS simple console player
Copyright (c) 1999-2021 Un4seen Developments Ltd.
*/
#include <stdlib.h>
#include <stdio.h>
#include "bass.h"
#ifdef _WIN32 // Windows
#include <conio.h>
#else // OSX/Linux
#include <sys/time.h>
#include <termios.h>
#include <string.h>
#include <unistd.h>
#define Slee... |
/*
* mux.c
*
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*
* This program is distributed "as is"... |
/*
* Mammut videogame prototype
*
* LANGUAGE: C99 (would prefer C11, but SDL2 largely provides the missing bits)
*
* FILE DESCRIPTION: the main game loop as well as the main()
* AUTHOR: Sio
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <SDL2/SDL.h>
#include... |
/*
Copyright (C) 1996-2008 by <NAME> <www.kyprianidis.com>
All rights reserved.
This program 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 Licen... |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistri... |
/// MentOS, The Mentoring Operating system project
/// @file mouse.c
/// @brief Driver for *PS2* Mouses.
/// @copyright (c) 2019 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "mouse.h"
#include "pic8259.h"
static uint8_t mouse_cycle = 0;
static int8_t mouse_... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* drawing.c :+: :+: :+: ... |
/* Definitions of target machine for GNU compiler. Altos 3068 68020 version.
Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
Written by <NAME> <<EMAIL>>
Last modified: Mon Mar 6 22:47:58 1989
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the t... |
/*
* Copyright (c) 2009-2012, Newcastle University, UK.
* 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, ... |
#include "server.h"
#include "worker.h"
#include "client.h"
#include "conf.h"
#include "version.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys... |
/*
Copyright 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, distribute, sublicens... |
#include <capability.h>
#include <ipccalls.h>
#include <stdlib.h>
#include <string.h>
#include <tty/font.h>
#include <tty/kbd.h>
static size_t width;
static size_t height;
static size_t fb_width;
static size_t fb_height;
static size_t fb_pitch;
static size_t fb_bits_per_pixel;
static int fb_red_index;
static int fb_gr... |
/*
* Copyright (c) 2018, Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <nrfx_wdt.h>
#include <watchdog.h>
#define LOG_LEVEL CONFIG_WDT_LOG_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(wdt_nrfx);
DEVICE_DECLARE(wdt_nrfx);
/* Each activated and not reloaded channel can generat... |
/* C O L U M N P A R S E . C
* BRL-CAD
*
* Copyright (c) 2008-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* ve... |
/* eventfd example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#incl... |
/*
* Copyright (c) 2015-2018, 2020 The Linux Foundation. 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 notice appear in all
* copies.
*
* THE SOFTWA... |
/*
* ucontext coroutine initialization code
*
* Copyright (C) 2006 <NAME> <<EMAIL>>
* Copyright (C) 2011 <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; eithe... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define thisprog "xe-cut2"
#define TITLE_STRING thisprog" 15.February.2019 [JRH]"
/*
<TAGS>database file screen</TAGS>
15.February.2019 [JRH]
- add -s4 option: indentation-block as a stop-signal
- helps parsing .yaml (and possibly .json... |
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_eigen.h>
#include "egsl.h"
val egsl_sub(val v1,val v2){
return egsl_sum(v1, egsl_scale(-1.0,v2));
}
val egsl_compose_col(val v1, val v2){
gsl_matrix *m1 = egsl_gslm(v1);
gsl_matrix *m2 = egsl_gslm(v2);
egsl_expe... |
/*
Copyright (c) 2009 Apple 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, distribut... |
#include <pebble.h>
#include "persistence.h"
#include "radius_window.h"
#include "utility.h"
#define MENU_CELL_HEIGHT 44
static Window *s_window;
static MenuLayer *s_menu_layer;
static NumberWindow *s_number_window;
static uint16_t GetNumSectionsCallback(MenuLayer *menu_layer, void *data) {
return 1;
}
static uin... |
/*
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <bakery_lock.h>
#include <cpu_data.h>
#include <platform.h>
#include <string.h>
/*
* Functions in this file implement Bakery Algorit... |
#include "oled.h"
#include "oledfont.h"
//几个变量声明
uint8_t **Hzk;
//初始化命令
uint8_t CMD_Data[]={
0xAE, 0x00, 0x10, 0x40, 0xB0, 0x81, 0xFF, 0xA1, 0xA6, 0xA8, 0x3F,
0xC8, 0xD3, 0x00, 0xD5, 0x80, 0xD8, 0x05, 0xD9, 0xF1, 0xDA, 0x12,
0xD8, 0x30, 0x8D, 0x14, 0xAF};
void WriteCmd()
{
uint8_t i = 0;
for(i=0; i<27; ... |
#include <zephyr.h>
#include <device.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/util.h>
#include <drivers/uart.h>
#include <ctype.h>
#include "ruuvi_endpoint_ca_uart.h"
#include "uart_controller.h"
#include "adv_post.h"
#include "ruuvinode.h"
#include <logging/log.h>
LO... |
/*
********************************************************************************
*
* GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
* R99 Version 3.3.0
* REL-4 Version 4.1.0
*
*********************... |
/*
* AC-3 tables
* copyright (c) 2001 <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 option... |
#include "builder.h"
#include <pocket/pocket-saver.h>
#include <pocket/pocket-verify.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct source_builder_pocket_s {
source_builder_s builder;
pocket_verify_s *verify;
pocket_saver_s *saver;
pocket_saver_index_t *root;
} source_builder_pocket_s;
... |
/*
* coreMQTT Agent v1.1.0
* Copyright (C) 2021 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 restriction, includin... |
/** \file
* \brief GTK IupMessageDlg pre-defined dialog
*
* See Copyright Notice in "iup.h"
*/
#include <gtk/gtk.h>
#include "iup.h"
#include "iup_object.h"
#include "iup_attrib.h"
#include "iup_str.h"
#include "iup_dialog.h"
#include "iupgtk_drv.h"
/* Sometimes GTK decides to invert the buttons position becau... |
//**** ATMEL AVR - A P P L I C A T I O N N O T E ************************
//*
//* Title: AVR068 - STK500 Communication Protocol
//* Filename: command.h
//* Version: 1.0
//* Last updated: 31.01.2005
//*
//* Support E-mail: <EMAIL>
//*
//**************************************************************************
//... |
/**********************************************************************************************
*
* raylib - Advance Game template
*
* Title Screen Functions Definitions (Init, Update, Draw, Unload)
*
* Copyright (c) 2014-2022 <NAME> (@raysan5)
*
* This software is provided "as-is", without any express or impli... |
/**
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
*
* 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... |
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
#include "crypto.h"
#include "ecc.h"
#include "nand.h"
#define NAND_ECC_OK 0 //From Bootmii MINI nand.h
#define NAND_ECC_CORRECTED 1
#define NAND_ECC_UNCORRECTABLE -1
static ... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "../port/error.h"
#define Image IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"
typedef struct Mouseinfo Mouseinfo;
struct Mouseinfo
{
Point xy;
int redraw; /* update cursor on ... |
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftCrypto open source project
//
// Copyright (c) 2019 Apple Inc. and the SwiftCrypto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRI... |
/**
* Copyright 2021 University of Adelaide
*
* 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... |
#include "atecc_config_zone.h"
#include "atca_command.h"
void dump_slot_config(uint16_t value) {
printf("Decoding SlotConfig value = 0x%04X\n", value);
printf("Read key (except ECC private keys): %u\n", (value & SLOT_CONFIG_READ_KEY_MASK) >> SLOT_CONFIG_READ_KEY_OFFSET );
printf(" If slot contains ECC pri... |
/*
* ESPRESSIF MIT License
*
* Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
*
* Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case,
* it is free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to dea... |
/*
* CS 261 Data Structures
* Assignment 5
* Name: <NAME>
* Date: 8/02/2018
*/
#include "hashMap.h"
#include <assert.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/**
* Allocates a string for the next word in the file and returns it. This stri... |
/*
*
* 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 ... |
/*! Processor context, segment descriptor tables: GDT, IDT */
#define _ARCH_
#include "context.h"
#include "interrupt.h"
#include "descriptor.h"
#include <kernel/memory.h>
#ifdef USE_SSE
uint32 arch_sse_supported = 0; /* is SSE supported by processor? */
#endif
/*! context manipulation -----------------------------... |
/*
* Copyright (C) 2004-2008, Parrot Foundation.
*/
/*
=head1 NAME
examples/compiler/japhc.c
=head1 DESCRIPTION
example compiler used by japh16.pasm
=head1 SYNOPSIS
$ make -C examples/compilers/
$ parrot examples/japh/japh16.pasm
=head2 Functions
=over 4
=cut
*/
#include "parrot/parrot.h"
#define CO... |
/*
**
** ▄████▄ ▄▄▄ ▄▄▄█████▓ ▄▄▄ ██▓ ▓██ ██▓ ██████ ▄▄▄█████▓
** ▒██▀ ▀█ ▒████▄ ▓ ██▒ ▓▒▒████▄ ▓██▒ ▒██ ██▒▒██ ▒ ▓ ██▒ ▓▒
** ▒▓█ ▄ ▒██ ▀█▄ ▒ ▓██░ ▒░▒██ ▀█▄ ▒██░ ▒██ ██░░ ▓██▄ ▒ ▓██░ ▒░
** ▒▓▓▄ ▄██▒░██▄▄▄▄██░ ▓██▓ ░ ░██▄▄▄▄██ ▒██░ ░ ▐██▓░ ▒ ██▒░ ▓██▓ ░
** ▒ ▓███▀... |
#include "utf8.h"
// Copyright (c) 2008-2009 <NAME> <<EMAIL>>
// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
#define UTF8_ACCEPT 0
#define UTF8_REJECT 1
static const uint8_t utf8d[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2021 ST... |
#include <includes.h>
/**
* Open the serial device according to devname
* return file descriptor if success
*/
static int uart_open(char *devname)
{
int retcode = NOERR;
int fd = -1;
fd = open(devname, O_RDWR | O_NOCTTY | O_NDELAY);
if(fd <= 0) {
printf("Cannot open serial device : %s \n", devname);
retur... |
# include <glib.h>
# include <string.h>
# include <unistd.h>
# include <stdio.h>
# include <time.h>
# include "gateway.h"
static gboolean peer_write_ea ( gchar *ip, peer *p, FILE *fp );
GHashTable *peer_tab;
unsigned long int total_connections = 0;
time_t last_connection = 0;
void increment_total_connections( void ... |
/*
*
* Copyright (c) International Business Machines Corp., 2001
*
* 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 l... |
/*
* Copyright (C) 2019. Huawei Technologies Co.,Ltd.All rights reserved.
*
* Description: Simple Memory Memory (lib): A simple first fit memory algorithm
*
* 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 c... |
/*
This file is part of ParTI!.
ParTI! 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 3 of
the License, or (at your option) any later version.
ParTI! is distributed... |
/** @example delayed_instance.c
* This example implements the netSnmpExampleSleeper object.
*
* It demonstrates 2 things:
*
* - The instance helper, which is a way of registering an exact OID
* such that GENEXT requests are handled entirely by the helper.
*
* - how to implement objects which normally wo... |
/**************************************************************************
*
* Copyright 2007 VMware, Inc.
* 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 w... |
/********************************************************************[libaroma]*
* Copyright (C) 2011-2015 <NAME> (http://amarullz.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
... |
/*-
* Copyright (c) 2009, <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 unmodified, this list of ... |
#include "incs.h"
#include "check.h"
#include "check_tree.h"
#include "preproc_j.h"
#ifdef SCALAR
#include "reorder.h"
#endif
#ifdef VECTOR
#include "reorder_isp.h"
#endif
#include "search.h"
#include "split.h"
extern node_t *g_tree; // this is where the decision tree is created
extern int g_n_tree;
extern int g_sz_tr... |
#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... |
/**************************************************************************
* This code is licensed under the Apache License 2.0. See ../LICENSE *
* Copyright 2017 <NAME> *
* *
* thread.c - pthreads ... |
/*
* Copyright 2010 Analog Devices Inc.
* Copyright (C) 2008 <NAME>
*
* Licensed under the GPL-2 or later.
*
* ad7476_ring.c
*/
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include "../iio.h"
#inclu... |
#include "lib/neslib.h"
#include "../../src/nesnet.h"
// NOTE: You have to change the URL here to the URL of your PC. Check the output from the nodejs server on startup - it should
// show the server address. Replace this with the address you want.
#define POSITION_URL "http://192.168.1.201:3000/update"
#define SPRITE... |
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
Author: <NAME>
*/
#include <R.h>
#include <Rmath.h>
#include <R_ext/Lapack.h>
#include <R_ext/Applic.h>
#include "util.h"
void center_array(
//... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include "cboy/cpu.h"
/* bc register contains the b register in the
* high byte and the c register in the low byte
*/
uint16_t read_bc(gb_registers *reg)
{
return ((uint16_t)reg->b << 8) | ((uint16_t)reg->c);
}
/* extract b register... |
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <errno.h>
#include "Pkt.h"
#include "orb.h"
#include "pf.h"
#include "coords.h"
#include "stock.h"
#include "pforbstat.h"
#define SRCNAME_DEFAULT "/pf/orbstat"
static void
usage ()
{
fprintf (stderr, "\nUsage: %s [-a]... |
/*
* Hedgewars, a free turn based strategy game
* Copyright (C) 2012 <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, or (at your opti... |
/* =============================================================================
____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
| _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
| |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
| __/ | | ... |
/*-
* Copyright (c) 2017 <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 and... |
/*
* Kris_tracker.c Copyright (C) 1997 Asle / ReDoX
* Copyright (C) 2006-2007 <NAME>
*
* Kris Tracker to Protracker.
*/
#include <string.h>
#include <stdlib.h>
#include "prowiz.h"
static int test_kris (uint8 *, int);
static int depack_kris (FILE *, FILE *);
struct pw_format pw_k... |
/*
* 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... |
/* $Id$ */
/*
* Copyright (c) 2016--2017 <NAME> <<EMAIL>>,
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AN... |
/*
* libEtPan! -- a mail stuff library
*
* Copyright (C) 2001, 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 co... |
/**
* @file http.c
* @author <NAME>
* @date 2019-11-27
* @copyright Ruuvi Innovations Ltd, license BSD-3-Clause.
*/
#include "http.h"
#include <string.h>
#include <time.h>
#include "cJSON.h"
#include "cjson_wrap.h"
#include "esp_http_client.h"
#include "ruuvi_gateway.h"
#define LOG_LOCAL_LEVEL LOG_LEVEL_DEBUG
#i... |
#include <wiringPi.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#define LedRed 3
#define LedGreen 4
#define LedBlue 5
#define ADC_CS 0
#define ADC_CLK 1
#define ADC_DIO... |
/*
* main.c
*
* Created on: 12 Feb 2017
* Author: rafpe
*/
#include "stm32f4xx.h"
#include "stm32f407xx.h"
#define P6_7
#define QT_DEVICE_ID 0x2E // Chip ID (read from device-address 0)
#define QT_I2C_ADDRESS 0x1B // Qtouch device ID
#define QT_I2C_ADDRESS_W (QT_I2C_ADDRES... |
/*
* util.c
*
* Copyright (c) 2002-2006 by <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, or
* (at your option) any later ver... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "huffman.h"
#define MAX_CODE_LEN 100
/*---- build tree ----*/
static char freq[255];
static int freq_sum;
typedef struct tree {
unsigned char ch;
int freq;
char code[MAX_CODE_LEN];
char code_len;
} tree_t;
static tree_t tre... |
/* Created by <NAME> */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <stdarg.h>
#include <string.h>
typedef int pipe_t[2]; /* tipo per la pipe */
/* Definisco le variabili globali */
pipe_t *pipes; /* pipes */
pipe_t *pipes_nip;
int pid; /* appogg... |
/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* int_mid_step.c
*
* Code generation for function 'int_mid_step'
*
*/
/* Include files */
#include "mwmathut... |
/*
*
* Copyright (c) International Business Machines Corp., 2001
*
* 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 l... |
#pragma once
#define REQUEST_ID 0x01
#define REQUEST_PIDS 0x02
#define REQUEST_RATES 0x03
#define REQUEST_VRX 0x04
#define REQUEST_MORE 0x05
#define ID_CMD_PRINT 0x12
#define ID_CMD_ERASE 0x13
#define ID_ROLL_KP 0x01
#define ID_ROLL_KI 0x02
#define ID_ROLL_KD 0x03
#define ID_PITCH_KP ... |
/******************************************************************************
* @file main.c
* @version V3.00
* @brief
* Demonstrate how to implement a USB mass storage.
* It uses embedded Data Flash as storage.
* @note
* @copyright SPDX-License-Identifier: Apache-2.0
* @copyright Cop... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <alsa/asoundlib.h>
#include <fftw3.h>
#include "common.h"
/*
* Stuff related to sound card capture
*
*/
// Capture fresh PCM data to buffer
void readPcm(gint numsamples) {
int samplesread, i;
gint32 tmp[BUFLEN]; /... |
/*
* Copyright (c) 2020 jakub-vesely
* This software is published under MIT license. Full text of the licence is available at https://opensource.org/licenses/MIT
*/
#include <driver/rmt.h>
#include <driver_rtm_abstraction.h>
#include <esp_log.h>
#include <esp_ringbuffer_abstraction.h>
#include <event_loop.h>
#inclu... |
/* stacks.c -*-C-*-
*
*************************************************************************
*
* Copyright (C) 2009-2011 , Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the followin... |
//
// NOTE(tbt): procedural texture helpers for the falling sand simulation
//
enum
{
FSC_lightPenetrationDepth = 10,
};
static float FSC_precomputedPerlin[PLT_gameFixedW * PLT_gameFixedH];
static void
FSC_PerlinPrecompute(void)
{
for (int y = 0;
y < PLT_gameFixedH;
y += 1)
{
for... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <windows.h>
#include <math.h>
#include "GPMF_parser.h"
#include "GPMF_mp4reader.h"
uint32_t KEY_ID_ACCL = MAKEID('A', 'C', 'C', 'L');
uint32_t KEY_ID_GPSF = MAKEID('<KEY>');
uint32_t totalsamples = 0;
int zprintf(const char* fo... |
/*
* more.c
*
* Created on: 21 мая 2021 г.
* Author: lenovo
*/
#include "more.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "IPCore.h"
#include "xprintf.h"
#include "ulog.h"
void ip_to_str(uint32_t ip, char * str)
{
uint8_t * ipaddr = (uint8_t *)&ip;
xsprintf(str, "%d.%d.%d.%... |
/*
* This test was created to check the correctness
* of the following intrinsics support:
* _mm_mmask_i32gather_epi32()
* _mm256_mmask_i32gather_epi32()
*/
#include <x86intrin.h>
#include <stdio.h>
#define NUM (256 * 256)
#define SCALE 4
float dst128_f[NUM], gold_dst128_f[NUM];
float dst256_f[NUM], gol... |
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, , sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, , sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_3, , sensorQuadEncoderOnI2CPort, , AutoAssign... |
/*
* (C) Copyright 2000-2010
* <NAME>, DENX Software Engineering, <EMAIL>.
*
* (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* <NAME> <<EMAIL>>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* ... |
/*
* emacsenc.c - translate our internal character set codes to and from
* GNU Emacs coding system symbols. Derived from running M-x
* list-coding-systems in Emacs 21.3.
*
*/
#include <ctype.h>
#include "charset.h"
#include "internal.h"
static const struct {
const char *name;
int charset;
} emacsencs[]... |
/********************************************************************
* Dependencies: See INCLUDES section below
* Processor: PICxxxx
* Compiler: XCxx
* Board: ---
* Author: <NAME>
* Company: Microchip Technology, Inc.
*
* Software License Agreement:
*
* The software... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "Trie.h"
#include "Queue.h"
#define INIT_NUM_CHILDREN 10 /*Initial arraySize of every node*/
/*
Project team:
1) <NAME> 1115201400193
2) <NAME> 1115201400069
3) <NAME> 1115201400173
*/
Bool isFlag(char* word)
{
if(word[0] =... |
/*
quattrans.h
% Version: v0.9b
% Build: 11050510
% Date: Jul-24 2010, 1:01 PM EST
% Author: <NAME>, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://neuroelf.net/
Copyright (c) 2010, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modificatio... |
void get_RHS_X(int Nx, int Ny, double ry, double rxy, double *C_old, double *RHS){
int i, j;
int ip1, im1, jp2, jp1, jm1, jm2;
for (i=0; i<Nx; ++i){
if (i==0) im1 = Nx-1;
else im1 = i-1;
if (i==Nx-1) ip1 = 0;
else ip1 = i+1;
for(j=0; j<Ny; ++j){
if (j==0) jm1 = Ny-1, jm2 = Ny-2;
else if (j==1... |
/*
$Id$
*/
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include "paw_loggrid.h"
#include "paw_potential.h"
#include "paw_basis.h"
#include "paw_my_memory.h"
static double **dH_ae;
static double **dO_ae;
static double **dO_ps;
static double **dH_ps;
static double ... |
#include<stdio.h>
#include<stdlib.h>
#define MAX_STRING_SIZE 40
/**
* Find maximum between two numbers.
*/
int max(int num1, int num2) {
return (num1 > num2 ) ? num1 : num2;
}
/**
* Find minimum between two numbers.
*/
int min(int num1, int num2) {
return (num1 > num2 ) ? num2 : num1;
}
d... |
#include "input_data.h"
#include <stdlib.h>
#include <string.h>
#define DEFAULT_INPUT_FILE "/etc/majestic.yaml"
static prog_args_t g_args;
static const char *handle_file_param(int *k, int argc, char *argv[]) {
if ((*k + 1) >= argc) {
fprintf(stderr, "%s parameter must be used with file path\n", argv[*k]... |
#include "Cache.h"
#include <stdlib.h>
#include <math.h>
#include <string.h>
cache_t cache;
unsigned int accesses_number;
memory_ram_t memory_ram;
/* Funciones auxiliares */
int get_blocks_per_set(){
return cache.blocks_per_set;
}
int get_offset_bits(){
return cache.offset_bits;
}
unsigned int get_tag(u... |
/*
Copyright (c) 2016 Miouyouyou <Myy>
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... |
/*
Unix SMB/CIFS implementation.
helper mapping functions for the UF and ACB flags
Copyright (C) <NAME>) Metzmacher 2002
Copyright (C) <NAME> 2004
Copyright (C) <NAME> 2010
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.