This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define __crc_h_ | |
#include <stdint.h> | |
#define CRC32_POLY 0x04C11DB7 | |
#define CRC32_INIT_REM 0xFFFFFFFF | |
#define CRC32_FINAL_XOR 0xFFFFFFFF | |
#define CRC32R_POLY 0xEDB88320 | |
#define CRC32R_INIT_REM 0xFFFFFFFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<class name="reportDia1" extends="modaldialog"> | |
<simplelayout axis="y" spacing="10"/> | |
<vbox spacing="12"> | |
<datapath xpath="ds_report_init:/report/params"/> | |
<hbox spacing="15" datapath="param"> | |
<text width="100" datapath="text()"/> | |
<edittext width="200" datapath="@value" with="formfield" | |
fieldtype="$path{'@type'}" | |
fieldname="$path{'@key'}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NanoVM, a tiny java VM for the Atmel AVR family | |
// Copyright (C) 2005 by Till Harbaum <Till@Harbaum.org> | |
// | |
// 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 version. | |
// | |
// This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* VM BEGIN */ | |
#ifdef BEEPVM_JMP_INTERPETER | |
JUMP(0); | |
#endif | |
/* VM END */ | |
OPCODES_BEGIN | |
OP(NOP) { | |
NEXT(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initPort p fd = do | |
tattr' <- getTerminalAttributes fd | |
let init = [ (`withInputSpeed` B9600) | |
,(`withOutputSpeed` B9600) | |
,(`withoutMode` EnableParity) | |
,(`withoutMode` TwoStopBits) | |
,(`withoutMode` ProcessOutput) | |
,(`withoutMode` ProcessInput) | |
,(`withoutMode` KeyboardInterrupts) | |
,(`withoutMode` EnableEcho) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let port opts = | |
let fd = openfile opts.opt_port [O_RDWR] 0 | |
in let ta = tcgetattr fd | |
in let ta' = { ta with | |
c_obaud = opts.opt_baudrate; | |
c_ibaud = opts.opt_baudrate; | |
c_istrip = false; | |
c_inlcr = false; | |
c_igncr = false; | |
c_icrnl = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************** | |
($ foreign "display" display ((:string) :unit) $) | |
($ foreign "newline" newline ((:unit) :unit) $) | |
($ foreign "sleep" sleep ((:int) :unit ) $) | |
(define (pysh s) (display s)) | |
($ typeof main ((:unit) :unit) $) | |
(define (main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
($ foreign "display" display ((:string) :unit) $) | |
($ foreign "newline" newline ((:unit) :unit) $) | |
($ foreign "sleep" sleep ((:int) :unit ) $) | |
(define (pysh s) (display s)) | |
($ typeof main ((:unit) :unit) $) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
($ foreign "display" display ((:string) :unit) $) | |
($ foreign "newline" newline ((:unit) :int) $) | |
($ foreign "sleep" sleep ((:int) :) $) | |
(define (pysh s) (display s)) | |
($ typeof main ((:unit) :unit) $) | |
(define (main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmz@slim:~/hop$ cat t/hof2.hop | |
;; ($ foreign "display" display ((:string) :unit) $) | |
#lang scheme | |
(define (fa) "A") | |
(define (fb) "B") | |
(define (func1) (let ((s (fa)) (s1 (fb))) | |
(lambda (x) (let ((z "qqq")) | |
(begin (display s) |