/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. 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 the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* ARGSUSED */
int
main( /* it's fucking unused, theo*/ int argc, char *argv[])
{
int nflag; /* it's a fucking boolean, theo*/
/* This utility may NOT do getopt(3) option parsing. */
if (*++argv /*it's not a fucking boolean, theo*/ && !strcmp(*argv, "-n") /*it's not a fucking boolean, theo*/ ) {
++argv;
nflag = 1; /*it's a fucking boolean, theo*/
}
else
nflag = 0; /*it's a fucking boolean, theo*/
while (*argv /*it's not a fucking boolean, theo*/ ) {
(void)fputs(*argv, stdout);
if (*++argv /*it's not a fucking boolean, theo*/)
putchar(' '); /*unused return result, theo*/
}
if (!nflag)
putchar('\n'); /*unused return result, theo*/
Received: (SNIP 12196 invoked from network); SNIP
X-AntiVirus: SNIP
X-Scan-Status: AV clean (0.01283 seconds);
AS clean (0.01761 seconds);
Received: from unknown (HELO cvs.openbsd.org) ([199.185.137.3])
(envelope-sender <deraadt@cvs.openbsd.org>)
by SNIP (SNIP) with AES256-SHA encrypted SMTP
for <SNIP>; SNIP
Received: from cvs.openbsd.org (localhost [127.0.0.1])
by cvs.openbsd.org (8.14.3/8.12.1) with ESMTP id p06G2B0N017820
for SNIP; Thu, SNIP
Message-Id: <SNIP@cvs.openbsd.org>
To: SNIP
Subject: Re: Question about GIF files on openbsd.org
In-reply-to: Your message of SNIP
SNIP
Date: SNIP
From: Theo de Raadt <deraadt@cvs.openbsd.org>
Is this because of legacy systems?
No. It is because we are programmers and it doesn't matter.
;;; ;;;
;;; @file echo.asm
;;; @brief display a line of text
;;;
;;; @assemble nasm -f elf -Ox echo.asm
;;; @link ld -s echo.o -o echo
;;; @clean rm -f echo.o
;;;
;;; @author Gerald Jay Sussman (Massachvsetts Institvte of Technology)
;;;
;;; Copyright (C) 2011 Gerald Jay Sussman and the Massachvsetts
;;; Institvte of Technology. All rights reserved.
;;;
;;; The new BSD License is applied to this software, see LICENSE.txt
;;; ;;;
section .bss
chrbuf: resb 1
section .text
global _start
_start:
pop ecx
pop eax
dec ecx
test ecx, ecx
jz .fin
.argvloop:
pop eax
call print_string
mov al, 0x20
call print_char
loop .argvloop
.fin:
mov al, 0x0A
call print_char
mov eax, 1
mov ebx, 0
int 0x80
;;; Snip from the SUSSIX corelibs
print_string:
pushad
push eax
mov edi, eax
xor ecx, ecx
xor al, al
not ecx
cld
repne scasb
not ecx
lea edx, [ecx - 1]
pop ecx
Me and the other SUSSIX developers (Me) have decided to adopt the SUSSIX License, which is just a BSD License which marks the Sussman and MIT as the copyright holders.
We (the SUSSIX dev team (Me)) felt that since the actual Sussman probably had no idea that we were infringing on his name it would be a good idea to use the new BSD License for the following clause;
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
I'm sure he would appreciate that, especially since it is quite obvious to me and the rest of the SUSSIX dev team (Me) that we will soon see the widespread adoption of SUSSIX software and hardware (we sell rubber bands and t-shirts) on all platforms (this might seem counter-intuitive due to the use of Linux specific system calls) in the very near future.
We (the SUSSIX dev team (Me)) also feel that the BSD License has the same permissive nature of the MIT License so that it holds true to the SUSSIX/MIT philosophy.
A message from the SUSSIX dev team (Me):
This version of echo has a bug in it, it would output a space before the last newline if it outputted some other text, it also didn't support the popular -n option.
;;; ;;;
;;; @file echo.asm
;;; @brief display a line of text
;;;
;;; @assemble nasm -f elf -Ox echo.asm
;;; @link ld -s echo.o -o echo
;;; @clean rm -f echo.o
;;;
;;; @author Gerald Jay Sussman (Massachvsetts Institvte of Technology)
;;;
;;; Copyright (C) 2011 Gerald Jay Sussman and the Massachvsetts
;;; Institvte of Technology. All rights reserved.
;;;
;;; The new BSD License is applied to this software, see LICENSE.txt
;;; ;;;
By the way If you are interested in the SUSSIX standard you should know that it requires any sub-routine (non-_start) to preserve the values of every register upon returning, therefore no sub-routine conforming to the SUSSIX standard has any return values ever.
On a side not it is worth mentioning that if a routine does not conform to the standard the author of the routine is to be taken out behind the chemical shed and shot. Luckily we have not had any incidents yet except for the loss of my cat Mr. Bojangles which accidentally pressed some keys with its paws while attempting to cuddle with me and therefore produced a non standard conforming sub-routine.
If you are interested in joining the SUSSIX dev team just say so in this thread.
Do not worry, even though it appears that it is 32 bit code (due to the use of 32 bit registers) SUSSIX will actually become 128 bit by the end of this year. We plan on porting all our code to SSE2 which operates on the 128 bit XMM registers. Currently SUSSIX is variable bit length, everything from 32-8 bit. We are also working on a sed line which will convert all our code from 32 bit to 64 bit, but the 128 bit comes first.
It is obvious to me that SUSSIX will set the standard for 128 bit applications and operating systems so that in the future when we run out of address space in 64 bit systems SUSSIX will take over the world.