text stringlengths 3.08k 10.5k |
|---|
/* $NetBSD: irongate_dma.c,v 1.2 2000/06/11 22:47:00 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* mod... |
/*
* dnsHandler.c
*
* Created on: Jan 19, 2021
* Author: Hoon-Mac
*/
#include "ConfigData.h"
#include "wizchip_conf.h"
#include "socket.h"
#include "wiz_debug.h"
#include "dns.h"
#include "dnsHandler.h"
/* Header for all domain messages */
struct dhdr_handler
{
uint16_t id; /* Identification */
uint8_... |
/*
# Copyright 2021 Hewlett Packard Enterprise Development LP
#
# 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, m... |
/*
* Copyright 2017 <NAME>
*
* See LICENCE for the full copyright terms.
*/
#include "theft_libfsm.h"
#include "type_info_fsm_literal.h"
static enum theft_trial_res
prop_union_literals(struct theft *t, void *arg1);
static struct fsm *
add_literal(struct fsm *fsm, const uint8_t *string, size_t size, fsm_end_id_t ... |
#include "MSPd.h"
#define FUNC_LEN (16384)
#define FUNC_LEN_OVER2 (8192)
#define MAX_COMPONENTS (256)
#define OBJECT_NAME "pulser~"
static t_class *pulser_class;
typedef struct _pulser
{
t_object x_obj;
float x_f;
int components;
float global_gain;
float *wavetab;
float *phases;
float frequency;
... |
/*!
* write_batch.c - write batch for lcdb
* Copyright (c) 2022, <NAME> (MIT License).
* https://github.com/chjj/lcdb
*
* Parts of this software are based on google/leveldb:
* Copyright (c) 2011, The LevelDB Authors. All rights reserved.
* https://github.com/google/leveldb
*
* See LICENSE for more informat... |
/***
*w_cmp.c - W versions of CompareString.
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* Use either CompareStringA or CompareStringW depending on which is
* available
*
*******************************************************************************/
#include <cruntime.... |
/* $OpenBSD: group.c,v 1.6 2005/10/30 23:59:43 fgsch Exp $ */
/* <NAME> <<EMAIL>>, 2001. Public Domain. */
/*
* Test getgrgid_r() across multiple threads to see if the members list changes.
*/
#include <sys/types.h>
#include <grp.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#i... |
/* d9gmit.f -- translated by f2c (version 20041007).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- ... |
/* Copyright (c) 2016 PLUMgrid
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*/
#include <linux/bpf.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <ass... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* lib/crypto/md5/t_cksum.c
*
* Copyright 1995 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.... |
/*-
* Copyright (c) 2015, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... |
#include "peripherals/uart.h"
#include "peripherals/gpio.h"
#include "utils.h"
void uart_init() {
// Formula from BCM2837-ARM-Peripherals.-.Revised.-.V2-1.pdf
// Page 183
// Baud rate divisor BAUDDIV = (FUARTCLK/(16 Baud rate))
// where FUARTCLK is the UART reference clock frequency.
// The BAUDDIV... |
#include <bitthunder.h>
#include <libfdt.h>
#include <bt_kernel.h>
#include <of/bt_of.h>
static struct bt_device_node *bt_of_unflatten_dt_node(const void *fdt, int offset, struct bt_device_node *dad, struct bt_list_head *allitems, BT_u32 fpsize) {
int has_name = 0;
// Allocate structure with enough space for the f... |
/*
* Copyright (C) 2015-2020 "IoT.bzh"
* Author <NAME> <<EMAIL>>
*
* 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... |
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* ====================================================================
* Copyright (c) 1999-2004 Carnegie Mellon University. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided ... |
/*Daala video codec
Copyright (c) 2001-2012 Daala project contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
l... |
/*
lwcc/cpp.c
Copyright © 2013 <NAME>
This file is part of LWTOOLS.
LWTOOLS 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 option) any later
version.
This program ... |
/*
* FreeRTOS+TCP V2.3.4
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* 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 Softw... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
/*
*
* Embedded System Architecture
* Copyright (c) 2018 Packt
*
* Author: <NAME> <<EMAIL>>
*
* 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, incl... |
// Meridian 59, Copyright 1994-2012 <NAME> and <NAME>.
// All rights reserved.
//
// This software is distributed under a license that is described in
// the LICENSE file that accompanies it.
//
// Meridian is a registered trademark.
/*
* cache.c: Implements bitmap cache.
*
* The bitmap caches are LRU caches of... |
#include "tello.h"
#define DEFAULT_BUFFLEN 1024
#define TELLO_IP "192.168.10.1"
#define TELLO_PORT 8889
#define LOCAL_PORT 8890
WSADATA wsa;
SOCKET commandSocket = INVALID_SOCKET;
struct sockaddr_in commandToAddress;
int commandToAddressLength = 0;
struct sockaddr_in commandLocalAddress;
int commandLocalAddressLength... |
#include "OR_Base.h"
#include "Config.h"
#include "Logging.h"
#include "..\Common\StringUtils.h"
#include "..\Common\WindowsUtils.h"
#include <stdlib.h>
#include <stdbool.h>
#include <ShlObj.h>
#include <Windows.h>
// The file path, relative to the current module path, where the configuration is stored
#define OR_CON... |
/***********************************************************************
name: <NAME>
Q Sort With Threading
description:
See CS 360 Lecture for details.
README:
gcc -Wall -o [NAME] assignment7.c -lm -lpthread
./[NAME]
***********************************************************************/
#include <... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "neuralnet/layer.h"
#include "neuralnet/neuron.h"
#include "utils/vector.h"
Layer layer_new(size_t nb_neurons, Layer *prev_layer, Layer *next_layer,
int act_func) {
Layer layer;
layer.nb_neurons = nb_neurons;... |
/*-
* Copyright (c) 2010 <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 above copyright
* notice, this list of co... |
#include <stdio.h>
#include <stdlib.h>
#include <wiringPi.h>
#include <time.h>
typedef unsigned char uchar;
typedef unsigned int uint;
#define ADC_CS 12
#define ADC_DIO 6
#define ADC_CLK 13
#define RedPin 0
#define YelPin 1
#define GrePin 2
#define BluPin 3
#define Relay1 ... |
/*
* Copyright (C) 2019 BlueKitchen GmbH
*
* 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 the follo... |
/**
* @file ms_hetnodewrapper.c
*
* Copyright (C) 2015, <NAME> <<EMAIL>>, <NAME> <<EMAIL>>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*
* encoding: UTF-8
* tab size: 4
*
* @author: <NAME> (<EMAIL>)
* cre... |
#include <string.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_log.h>
#include <esp_event.h>
#include <nvs_flash.h>
#include <esp_rmaker_core.h>
#include <esp_rmaker_standard_types.h>
#include <esp_rmaker_standard_params.h>
#include <esp_rmaker_standard_devices.h>
#include <esp_rmaker_ota.... |
/*
*Copyright (C) 1994-2000 The XFree86 Project, 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 without restriction, including
*without limitation the rights ... |
/* chainMergeSort - Combine sorted files into larger sorted file. */
/* Copyright (C) 2011 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "options.h"
#include "dlist.h"
#include "c... |
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <math.h>
#include <alsa/asoundlib.h>
#define MIDI_DELAY 10000
static snd_seq_t *seq;
static int port_count;
static snd_seq_addr_t *ports;
/* A bunch of crap taken from aseqdump.c */
static void fatal(const ch... |
/*
* Copyright 2011 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* 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.1 of the License, or (at your ... |
/*
* A simple user interface for this project
*
* Copyright 2020 Creep_er
*
* 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
* any later version.
*
*... |
/* -*- c++ -*- ***************************************************************
*
* System : Serial GLCD
* Module : Backlight handling
* Object Name : $RCSfile: backlight.c,v $
* Revision : $Revision: 1.9 $
* Date : $Date: 2015/05/31 19:12:12 $
* Author : $Author: jon $
* Created ... |
/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list o... |
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include "argon2.h"
#include "timing.h"
#define ARGON2_BLOCK_SIZE 1024
#define BENCH_MAX_T_COST 16
#define BENCH_MAX_M_COST (1024 * 1024)
#define BENCH_MAX_THREADS 8
#define BENCH_MIN_PASSES (1024 * 1024)
#define BENCH_... |
/*
* QEMU System Emulator
*
* Copyright (c) 2003-2008 <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
* t... |
// Copyright (c) 2020-present, HexHacking Team. 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, including without limitation the rights
// to u... |
/* This file is part of Conauto.
Conauto 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 option) any later version.
Conauto is distributed... |
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "console.h"
#include "char.h"
#include "utils.h"
#include "address.h"
/**
BOT NOTE:
The bot is designed to work under Perfect World 1.3.6, Relax750 server,
in my case.
Maybe there's a chance to port it to a newer version... |
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define ceild(n, d) ceil(((double)(n)) / ((double)(d)))
#define floord(n, d) floor(((double)(n)) / ((double)(d)))
#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))
void printMatrix(int **, int, int);
int **alloc... |
#include <stdbool.h>
#include "drivers/keyboard.h"
#include "cpu/io.h"
#include "cpu/irq.h"
#include "debug.h"
#include "display/display.h"
enum key_code
{
NONE,
RETURN,
SPACE,
LEFT_SHIFT,
RIGHT_SHIFT,
PERIOD,
COMMA,
DASH,
A,
B,
C,
D,
E,
F,
G,
H,
I,
... |
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/connector.h>
#include <linux/cn_proc.h>
#include <signal.h>
#include <errno.h>
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
static int nl_connect() {
int rc;
int nl_sock;
struct sockaddr_nl sa_n... |
/* See LICENSE file for copyright and license details. */
#include <dirent.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "mru.h"
#define HISTORY ".dmenu_hist"
#define MAX_HIST 1024
#define MAX_COMMAND 1024
static void die(const c... |
#pragma once
static const char TokenChars[] =
"0123456789" // 0..9
"abcdefghijklmnopqrstuvwxyz" // 10..35
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" // 36..61
"~!@#$%^&*()-_=+[]{}|;:<>?,./"; // 62..89
#define TOKENBASE 62
#define TOKENEXT 90
static const unsigned char HuffValues[] = {
0x00, 0x01, 0x02, 0x03, 0... |
/**
* Example application to monitor for threshold events on a
* specific sensor, and invoke a host state change on threshold
* assertion.
*/
#define _GNU_SOURCE
#include <err.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
#de... |
// SPDX-License-Identifier: GPL-2.0
/*
* Freescale 16550 UART "driver", Copyright (C) 2011 <NAME>.
* Copyright 2020 NXP
* Copyright 2020 Puresoftware Ltd.
*
* This isn't a full driver; it just provides an alternate IRQ
* handler to deal with an errata and provide ACPI wrapper.
* Everything else is just using the... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include "../sprite.h"
#define FRAMEBUFFER_WIDTH 1280
#define FRAMEBUFFER_HEIGHT 720
#define WINDOW_WIDTH 1280
#define WINDOW_HEIGHT 720
bool playing = false;
i... |
/* vi: set sw=4 ts=4: */
/*
* Copyright (C) 2001 <NAME>.
*
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright noti... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <curl/curl.h>
#include "../inc/rest.h"
#include "../inc/cJSON.h"
///////////////////////////////////////////////////////////////////////////////
/// PUBLIC METHODS ///
/////... |
/*******************************************************************************
* @file battery.c
* @author fgk
* @version V4.0.0
* @date 10/25/12
********************************************************************************
* @version history Description
* ---------------- -----------
* v2.5.0 ... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
/* csocket: Copyright (c) 2020 <NAME> - This code is licensed under MIT license (see LICENSE for details) */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <time.h>
#include <signal.h>
#include <limits.h>
#include "log.h"
#include "rh/types.h"
#include "np/naming_proxy.h"
#incl... |
// Copyright (c) 2016 <NAME>. See License.txt regarding use.
// This code contains code that cross-compiles in C++ and HLSL. This contains
// more primitive math manipulation functions.
#ifndef oHLSL
#pragma once
#endif
#ifndef oComputeUtil_h
#define oComputeUtil_h
#include <oMath/hlslx.h>
#include <oMath/quat.h>
#in... |
#include "micro/paging.h"
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define BIN_TAKEN(flg) (flg & 1)
#define BIN_SIZE(flg) (flg & 0xFFFFFFFE)
typedef struct heap_bin {
struct heap_bin *prev;
struct heap_bin *next;
uintptr_t addr;
uint32_t flags;
} heap_bin_t;
static heap_bin_t *b... |
/* ============================================================ */
/* */
/* pchip: Piecewice Cubic Hermite Interpolating Polynomial */
/* */
/* ================================================... |
/*
* Weird addresses etc. in System ASI (2)
*/
#define SERIALPORT 0xF0000000 /* MMU bypass */
#define CACHETAGS 0x80000000
#define CACHEDATA 0x90000000
#define SER 0x60000000
#define SEVAR 0x60000004
#define ASER 0x60000008
#define ASEVAR 0x6000000C
#define ENAB 0x40000000
#define ENABRESET 0x04
#define ENABCACH... |
/*
FileHandler - General-purpose file handling library for Niotso
iffexport.c - Copyright (c) 2012 Niotso Project <http://niotso.org/>
Author(s): Fatbag <<EMAIL>>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that th... |
#include <inc/lib.h>
#define debug 0
static ssize_t devpipe_read(struct Fd *fd, void *buf, size_t n);
static ssize_t devpipe_write(struct Fd *fd, const void *buf, size_t n);
static int devpipe_stat(struct Fd *fd, struct Stat *stat);
static int devpipe_close(struct Fd *fd);
struct Dev devpipe =
{
.dev_id = 'p',
.de... |
#include <stdio.h>
#include <stdlib.h>
#include "src/replication/rep.h"
#define SMALL_BUF_SIZE 10
#define SLEEP_TIME 2
float *big_buffer;
float *small_buffer;
float *reduce_result;
// Move this to header file
extern int __pass_sender_cont_add;
extern int __pass_receiver_cont_add;
extern Node node;
void assign_data... |
#include "stride.h"
void BetaTurn(CHAIN **Chain, int Cn)
{
register int i;
RESIDUE **r;
TURN *t;
int CA1, CA4, Tn;
float Phi2, Phi3, Psi2, Psi3, Range1 = 30.0, Range2 = 45.0;
char TurnType;
for( i=0; i<Chain[Cn]->NRes-4; i++ ) {
r = &Chain[Cn]->Rsd[i];
if( r[1]->Prop->Asn == 'H' || r[... |
/*
* LIBOIL - Library of Optimized Inner Loops
* Copyright (c) 2004 <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... |
/**************************************************************************
*
* Copyright (C) 2009 <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... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* <NAME>
* CSCD 240
* /dev/null is a bad input file
*/
#define ROW 10
#define COL ROW
#define DLEN 16
#define MODE "r"
#define FILENAME "input.txt"
#define false 1
#define true 0
//Posix standards don't like filenames over 256 chars
#define FNAME 256
... |
/*
* $Id: coolmenu_interface2.h,v 1.1 2005/06/13 20:50:52 murrayma Exp $
*
* Author: <NAME> <<EMAIL>>
*
* Copyright (c) 1996 <NAME>
* All rights reserved
*
* Created: Mon Sep 16 23:02:01 1996 fingon
* Last modified: Sat Jun 6 19:48:06 1998 fingon
*
*/
/* Functions for toggling / changing values / c... |
/*------------------------------------------------------------------*-
PC_IO.C (v1.01)
------------------------------------------------------------------
Core files for simple PC link library for 8051 family
Uses the USART, and Pins 3.1 (Tx) and 3.0 (Rx)
See text for details (Chapter 18).
... |
/*
* VRT RULES
*
* Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved.
* Copyright (C) 2005-2013 Sourcefire, Inc.
*
* This file is autogenerated via rules2c, by <NAME> <<EMAIL>>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "sf_snort_plugin_api.h"
#include "sf_snort_packet.... |
void
usage (int status)
{
if (status != EXIT_SUCCESS)
emit_try_help ();
else
{
printf (_("\
Usage: %s [OPTION]... [FILE]\n\
Base%d encode or decode FILE, or standard input, to standard output.\n\
"), program_name, BASE_TYPE);
emit_stdin_note ();
emit_mandatory_arg_note ();
fputs (_... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <sched.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <asm/... |
/*
* Copyright (c) 2015-2018 Nexenta Systems, inc.
*
* This file is part of EdgeFS Project
* (see https://github.com/Nexenta/edgefs).
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informat... |
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*
* The process-shared attribute shall be set to PTHREAD_PROCESS_SHARED
* to permit a read-wri... |
/*
* This file is part of udisks-glue.
*
* © 2010 <NAME>
* © 2011 <NAME>
*
* Refer to the LICENSE file for licensing information.
*
*/
#include <dbus/dbus-glib.h>
#include <sys/types.h>
#include <confuse.h>
#include <getopt.h>
#include <glib.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#includ... |
//
// Created by paula on 16.10.20.
//
#include "inputOutput.h"
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
void format_time(char *output){
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
sprintf(ou... |
/*
** Copyright 2014-2016 The Earlham Institute
**
** 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... |
/******************************************************************************
Copyright (c) 2017-2019 Analog Devices, Inc. All Rights Reserved.
This software is proprietary to Analog Devices, Inc. and its licensors.
By using this software you agree to the terms of the associated
Analog Devices Software License Agree... |
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx.h"
#include "Serial2.h"
#define BUFFER_SIZE 100
uint8_t receive2Buffer[BUFFER_SIZE];
uint16_t buffer2WritePos = 0;
uint16_t buffer2ReadPos = 0;
void Serial2_Init(void)
{
USART_InitTypeDef USART_InitStructure;
Seria... |
#define _GNU_SOURCE
#include <stdint.h>
#include <stdlib.h> // malloc
#include <string.h> // memset
#include "fradix16-64.h"
// plan
// - use 16 bit shifts, in 2 passes
// - compute all histograms in one pass
// - call repeatedly for additional keys, vs. building it into the API
// - allow reuse of allocated buffer... |
/*
* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in ... |
/**
* @file isc.c
* @author <NAME> <EMAIL>
* @date 04 August 2020
* @version 0.1
* @brief isc.c is the implementation of the Inter SoC Communication (ISC) framework.
*
* These are the implemented functionalities in isc.c:
* - isc_run is the main entry point for running the isc. This function starts
* t... |
/*
* 题意
* ====
* 给定 a, b, c, d, k ,求 sum_(x=a)^b sum_(y=c)^d [gcd(x, y) = k]
* (x, y) 和 (y, x) 被认为是一种。
*
* a = 1, c = 1
*
* 令 b < d
*
* 设 g(x) = sum_(i=2)^(x) phi(i)
* s = sum_(i=1)^b sum_(j=i)^d [gcd(i, j) = k]
* = sum_(i=1)^(b/k) sum_(j=i)^(d/k) [gcd(i, j) = 1]
* = sum_(i=1)^(b/k) sum_(j=1)^(d/k) [gcd(i,... |
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <getopt.h>
#include "pdf.h"
static int show_help;
static struct option const long_options[] =
{
{"help", no_argument, &show_help, 1},
{0, 0, 0, 0}
};
static... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "queue.h"
node *make_table(FILE *in);
node *encode(node *table);
void trim_leaves(node *root);
void gen_dictionary(node *root, char *code, char **dictionary);
void inorder(node *root)
{
if (!root) return;
inorder(root->le... |
#include "simulation.h"
Chunk *new_chunk() {
Chunk *chunkp = malloc(sizeof(Chunk));
int i;
for (i = 0; i < CHUNK_SIZE; i++) {
chunkp->data[i].reaction = -1;
chunkp->data[i].time = 0.0;
}
chunkp->next_free_index = 0;
chunkp->next_chunk = NULL;
return chunkp;
}
SimulationHistory *new_simulation_hi... |
/*
* CDMA_Paging_Channel_Message
*/
#include "consts.h"
#include "log_packet.h"
#include "log_packet_helper.h"
const Fmt CdmaPagingChannelMsg_Fmt [] = {
{UINT, "Message Length", 1},
{UINT, "Message ID", 1},
};
const Fmt CdmaPagingChannelMsg_SystemParameters [] = {
// pilot_pn: 9 bits
// config_msg_... |
#include "tom_shelleck.h"
/**
* path_finder - appends the correct directory to the first command string
* @args: address to array of argument strings
*/
void path_finder(char **args)
{
int i, cwdi;
char **path_tkn;
char *tmp;
/* create a token array for PATH value */
tmp = _getenv("PATH");
/* if an empty PATH ... |
#include "Notification.h"
#include "../includes.h"
//area for toast notification
const GUI_RECT toastRect = {START_X + TITLE_END_Y - (TOAST_Y_PAD * 2), TOAST_Y_PAD, BTT_LCD_WIDTH - START_X, TITLE_END_Y - TOAST_Y_PAD};
const GUI_RECT toastIconRect = {START_X, TOAST_Y_PAD, START_X + TITLE_END_Y - (TOAST_Y_PAD * 2), TITL... |
/* vi: set sw=4 ts=4: */
/*
* Mini more implementation for busybox
*
* Copyright (C) 1995, 1996 by <NAME> <<EMAIL>>.
* Copyright (C) 1999-2004 by <NAME> <<EMAIL>>
*
* Latest version blended together by <NAME> <<EMAIL>>,
* based on the original more implementation by Bruce, and code from the
* Debian boot-floppi... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int min_fun(int a, int b) {
return (a <= b) ? a : b;
}
//pseudo-polynomial time knapsack algorithm
void ppKnapsack(int n, int *w, int *v, int V, int **m, char **items) {
//initialization
m[0][0] = 0;
for (int i = 1; i <= V; i... |
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <dirent.h> /* 디렉터리 조작 함수를 위한 헤더 파일 */
#include <pwd.h> /* getpwuid( ) 함수 : uid를 이용해서 사용자의 이름 구하기 */
#include <grp.h> /* getgrgid( ) 함수 : gid를 이용해서 그룹의 이름 구하기 */
#include <time.h> /* localtime( ) 함수 */
#include <sys/stat.h>
#i... |
#include <stdint.h>
#include <naiveConsole.h>
#include <lib.h>
void outb(uint16_t port, uint8_t value);
void outd(uint16_t port, uint16_t value);
void outq(uint16_t port, uint32_t value);
uint8_t inb(uint16_t port);
uint16_t ind(uint16_t port);
uint32_t inq(uint16_t port);
void syscaller(uint16_t interrupt... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
//takes a char array str and returns a char array with chars reversed
char *strrev(char *str){//string reverse
int i = strlen(str) - 1, j = 0;
char ch;
while (i > j)
{
ch = str[i];
str[i] = str... |
/*
Copyright (c) 2022 CrazedoutSoft / <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, dist... |
/*
* computeFiniteDifferences.c
*
* Code generation for function 'computeFiniteDifferences'
*
*/
/* Include files */
#include "computeFiniteDifferences.h"
#include "finDiffEvalAndChkErr.h"
#include "mwmathutil.h"
#include "rt_nonfinite.h"
#include "runOpt.h"
/* Variable Definitions */
static emlrtRSInfo wc_emlrt... |
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define MAX 100//Tamanho máximo da mensagem
#define TRUE 1
#define FALSE 0
/*
Ler a messagem armazenada no arquivo binário e a armazena na varivel
passada por parâmetro.
*/
void openmessage(char* message, char *file_name)
{
FILE * arquivo = fopen(file_name, ... |
#include <HAL/Drivers/x86/Paging/paging.h>
#include <Memory/kmalloc_nfree.h>
#include <Memory/kmalloc.h>
#include <gcc-lib-funcs/gcc-lib-funcs.h>
#include <Utility/Utility.h>
/*static int ceil_i(int n, int d) {
int res = 0;
if (n % d) {
res++;
}
res = res + (n / d);
return res;
}*/
page_ta... |
/*
This file if part of Nasix.
Copyright (c) 2020, <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 cond... |
#include "standardDefinitions.h"
#include "expandKeys.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
void SubRoundKey(unsigned char * state, unsigned char * roundKey) {
for (int i = 0; i < 16; i++) {
state[i] ^= roundKey[i];
}
}
/* InverseMixColumns uses mul9, mul11, mul13, mul14 look-up tables
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.