Accepting request 125452 from home:etamPL:branches:devel:languages:misc
- added license-clarification.txt (bnc#761551) and updated license tag - updated bff4.c - renamed arg.patch -> bff4-arg.patch and added patch info - improved and cleaned-up spec file OBS-URL: https://build.opensuse.org/request/show/125452 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/bff4?expand=0&rev=7
This commit is contained in:
parent
947fa72c34
commit
ece0964847
12
bff4.c
12
bff4.c
@ -6,11 +6,11 @@
|
|||||||
program have to be separated with ! e.g. ",.!a" prints 'a'
|
program have to be separated with ! e.g. ",.!a" prints 'a'
|
||||||
To use it in interactive mode paste your program as input.
|
To use it in interactive mode paste your program as input.
|
||||||
|
|
||||||
This program can be compiled with LNR macro defined.
|
This program can be compiled with NOLNR macro defined.
|
||||||
LNR is another optimization of linear loops (where '<>' balanced), e.g. [->+>++<<].
|
NOLNR disables optimization of linear loops (where '<>' balanced), e.g. [->+>++<<].
|
||||||
Linear loop is then executed in one step.
|
Linear loop is then executed in one step.
|
||||||
|
|
||||||
Oleg Mazonka 4.12.06 http://mazonka.com/
|
Oleg Mazonka 4 Dec 2006 http://mazonka.com/
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ int main()
|
|||||||
if( a==']' )
|
if( a==']' )
|
||||||
{
|
{
|
||||||
int l=1, i=sz;
|
int l=1, i=sz;
|
||||||
while(l&&i>=0){ i--;l+=(o[i].c==']')-(o[i].c=='['); }
|
while(l&&i>=0) if(i--) l+=(o[i].c==']')-(o[i].c=='[');
|
||||||
if( i<0 ){ printf("unbalanced ']'\n"); exit(1); }
|
if( i<0 ){ printf("unbalanced ']'\n"); exit(1); }
|
||||||
o[i].igo = sz;
|
o[i].igo = sz;
|
||||||
o[sz].igo = i;
|
o[sz].igo = i;
|
||||||
@ -145,7 +145,7 @@ int main()
|
|||||||
for( i=0;i<sz;i++ )
|
for( i=0;i<sz;i++ )
|
||||||
{
|
{
|
||||||
o[i].go = &o[o[i].igo];
|
o[i].go = &o[o[i].igo];
|
||||||
#ifdef LNR
|
#ifndef NOLNR
|
||||||
if( o[i].c == '[' && o[i].igo == i+1 && o[i].shift==0 && o[i].off <= 0 )
|
if( o[i].c == '[' && o[i].igo == i+1 && o[i].shift==0 && o[i].off <= 0 )
|
||||||
{
|
{
|
||||||
o[i].linear = -o[i].d[-o[i].off];
|
o[i].linear = -o[i].d[-o[i].off];
|
||||||
@ -198,7 +198,7 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef LNR
|
#ifndef NOLNR
|
||||||
if( z->linear )
|
if( z->linear )
|
||||||
{
|
{
|
||||||
int del = m[mp]/z->linear;
|
int del = m[mp]/z->linear;
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 19 12:31:02 UTC 2012 - adam@mizerski.pl
|
||||||
|
|
||||||
|
- added license-clarification.txt (bnc#761551) and updated
|
||||||
|
license tag
|
||||||
|
- updated bff4.c
|
||||||
|
- renamed arg.patch -> bff4-arg.patch and added patch info
|
||||||
|
- improved and cleaned-up spec file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 17 19:28:53 UTC 2011 - jengelh@medozas.de
|
Sat Sep 17 19:28:53 UTC 2011 - jengelh@medozas.de
|
||||||
|
|
||||||
|
29
bff4.spec
29
bff4.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package bff4
|
# spec file for package bff4
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,17 +16,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: bff4
|
Name: bff4
|
||||||
Version: 1
|
Version: 1
|
||||||
Release: 1
|
Release: 0
|
||||||
License: OSI_COMPLIANT_FREE(Public domain)
|
|
||||||
Source0: %{name}.c
|
|
||||||
Patch0: arg.patch
|
|
||||||
Group: Development/Languages/Other
|
|
||||||
Summary: Fast Brainfuck interpreter
|
Summary: Fast Brainfuck interpreter
|
||||||
|
License: SUSE-Public-Domain
|
||||||
|
Group: Development/Languages/Other
|
||||||
Url: http://mazonka.com/brainf/
|
Url: http://mazonka.com/brainf/
|
||||||
|
Source0: %{name}.c
|
||||||
|
# bnc#761551
|
||||||
|
Source1: license-clarification.txt
|
||||||
|
# PATCH-FEATURE-OPENSUSE bff4-arg.patch adam@mizerski.pl -- add option to pass input file as command line argument
|
||||||
|
Patch0: %{name}-arg.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -34,25 +35,23 @@ Optimizing brainfuck implementation of dialect based on Daniel's dbfi (see "A ve
|
|||||||
|
|
||||||
This interpreter has only one input: program and input to the program have to be separated with ! e.g. ",.!a" prints 'a' To use it in interactive mode paste your program as input.
|
This interpreter has only one input: program and input to the program have to be separated with ! e.g. ",.!a" prints 'a' To use it in interactive mode paste your program as input.
|
||||||
|
|
||||||
This program can be compiled with LNR macro defined. LNR is another optimization of linear loops (where '<>' balanced), e.g. [->+>++<<]. Linear loop is then executed in one step.
|
This program is compiled with optimization of linear loops (where '<>' balanced), e.g. [->+>++<<]. Linear loop is then executed in one step.
|
||||||
|
|
||||||
Oleg Mazonka 4.12.06 http://mazonka.com/
|
Oleg Mazonka 4.12.06 http://mazonka.com/
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%__cp %{SOURCE0} .
|
cp %{SOURCE0} %{SOURCE1} .
|
||||||
%patch0
|
%patch0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gcc %{SOURCE0} -o %{name} %optflags
|
gcc %{name}.c -o %{name} %{optflags}
|
||||||
gcc %{SOURCE0} -DLNR -o %{name}lnr %optflags
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%__install -D -m 755 %{name} %buildroot%{_bindir}/%{name}
|
install -D -m 755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||||
%__install -D -m 755 %{name}lnr %buildroot%{_bindir}/%{name}lnr
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/%{name}lnr
|
%doc license-clarification.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
25
license-clarification.txt
Normal file
25
license-clarification.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Hi Adam,
|
||||||
|
|
||||||
|
You can use 'public domain' or another the least restrictive license.
|
||||||
|
|
||||||
|
Cheers,
|
||||||
|
- Oleg
|
||||||
|
|
||||||
|
-----Original Message-----
|
||||||
|
From: Adam Mizerski [mailto:adam@mizerski.pl]
|
||||||
|
Sent: Sunday, 24 January 2010 7:35 AM
|
||||||
|
To: mazonka@gmail.com
|
||||||
|
Subject: question about bff4
|
||||||
|
|
||||||
|
Hi.
|
||||||
|
Your brainfuck interpreter is pretty cool, and I wanted to build it on
|
||||||
|
openSuSE Build Service (http://en.opensuse.org/Build_Service). My
|
||||||
|
question is:
|
||||||
|
Under which license is source code of bff4 released?
|
||||||
|
(GPL, BSD, or maybe something else...)
|
||||||
|
|
||||||
|
It's needed to be written in package specification and I don't want to
|
||||||
|
leave it blank, or to choose by myself.
|
||||||
|
|
||||||
|
--
|
||||||
|
Adam Mizerski
|
Loading…
x
Reference in New Issue
Block a user