<commit_before>#include <stdlib.h> 
#include <stdint.h>   /* Standard types */
#include <string.h>   /* String function definitions */

#ifndef WINDOWS
#include <unistd.h>   /* UNIX standard function definitions */
#include <fcntl.h>    /* File control definitions */
//#include <errno.h>    /* Error number definitions */
#include <termios.h>  /* POSIX terminal control definitions */
#include <sys/ioctl.h>
//#include <getopt.h>
#endif

#include "csdl.h"
//#include "csound.h"

/* **************************************************
   As far as I can tell his should work on Windows
   as well using "COM1" etc
   ************************************************** */


/*****************************************************
 
			CSOUND SERIAL PORT OPCODES
			  ma++ ingalls, 2011/9/4
 
 * based on "Arduino-serial"
 * Copyleft (c) 2006, <NAME>, <EMAIL>
 * http://todbot.com/blog/
 

open a port.  baudRate defaults to 9600
	iPort  serialBegin         SPortName [, baudRate ]
 
close a port
			serialEnd           iPort

write byte(s) to the port, at i or k rate
			serialWrite_i       iPort, iByte
			serialWrite_i       iPort, kByte
			serialWrite_i       iPort, Sbytes
			serialWrite         iPort, iByte
			serialWrite         iPort, kByte<commit_msg>licence information for seril.c<commit_after>/*****************************************************
 
			CSOUND SERIAL PORT OPCODES
			  ma++ ingalls, 2011/9/4
 
 * based on "Arduino-serial"
 * Copyright (c) 2006, <NAME>, <EMAIL>
 * http://todbot.com/blog/

    Copyright (C) 2011 <NAME> 
    based on "Arduino-serial", Copyright (c) 2006, <NAME>, <EMAIL>
    http://todbot.com/blog/ and licenced LGPL to csound

    This file is part of Csound.

    The Csound 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 option) any later version.

    Csound is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with Csound; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA
*/
 
#include <stdlib.h> 
#include <stdint.h>   /* Standard types */
#include <string.h>   /* String function definitions */

#ifndef WINDOWS
#include <unistd.h>   /* UNIX standard function definitions */
#include <fcntl.h>    /* File control definitions */
#include <termios.h>  /* POSIX terminal control definitions */
#include <sys/ioctl.h>
#endif

#include "csdl.h"

/* **************************************************
   As far as I can tell his should work on Windows
   as well using "COM1" etc
   ************************************************** */


/*****************************************************

open a port.  baudRate defaults to 9600
	iPort  serialBegin         SPortName [, baudRate ]
 
close a port
			serialEnd           iPort

write byte(s) to the port, at i or k rate
			serialWrite_i       iPort, iByte
			serialWrite_i       iPort, kByte
			serialWrite_i       iPort, Sbytes
			serialWrite         iPort, iByte
			serialWrite         iPort, kByte
{'fraction_non_alphanumeric': 0.1850336159017831, 'fraction_numerical': 0.015784858228588133, 'mean_word_length': 3.2142857142857144, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5238656', 'n_tokens_mistral': 1080, 'n_tokens_neox': 970, 'n_words': 367}