Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

BBUNTU

Name: Anonymous 2008-05-09 7:47

BROTHERS AND SISTERS

i say we come together as one, and -under the cover of dark- unite to give birth the most awesome force ever seen on the face of this planet. i am talking of course about ...

BBuntu.

we're all just sitting here doing nothing, why don't we all do something useful with our time and create a linux distro for anon! we need to have automatic porn downloading, integrated program for visiting the chan. to keep the code clean i say we drop all language support: english is good enough!

what does anon think?


UNITED AS ONE
DIVIDED BY ZERO
F T W !!!!!

in b4 you can't do this: i have 5 YEARS EXPERIENCE WITH UBUNTU AND WE JUST BASE SOURCE ON THAT MKAY?

tl;dr pllleeeeeeeeeaaaaaaaaaassssssssseeeeeee read my post

Name: Anonymous 2008-05-10 11:44

>>40
shoutz to cudder

Name: Anonymous 2008-05-10 13:35

>>38
Ah, finally I'll get to see the code these faggots wrote.
Time to ridicule:
anoncoreutils/cat.c:
line 5: dereferencing NULL pointer
line 9: no check of the return value
line 22: never closing the file stream
Three problems in a 40 lines code. I'm surprised; I was expecting more.
Alas, the real problem is that you claim to have implemented the cat described by POSIX; a false claim.
Regardless, let us look further other code.

anoncoreutils/sync.c:
line 2: void main() is not valid.

But some real FAIL bugs:
anoncoreutils/sleep.c
sleep m1
^ FAIL
sleep x1
^ FAIL

Name: Anonymous 2008-05-10 14:04

>>42
I believe they are for a single system configuration.  Thus portability is not an issue.

Name: Anonymous 2008-05-10 14:53

>>43
Nonsense. These are real bugs, not "portabily" bugs. (whatever that is supposed to mean)

Name: Anonymous 2008-05-10 15:13

>>44
It means that if they run as they are they do not need to be changed.  (Actually, I didn't read your post at all, I just saw the keywords ``void main'' and ``POSIX.'')

Name: Anonymous 2008-05-10 16:21

>>45
It means that if they run as they are they do not need to be changed.
No, they don't.

Name: Anonymous 2008-05-10 18:34

>>42
The false POSIX claims make me RAGE.  Is it supposed to be some kind of joke or what?

Name: Anonymous 2008-05-10 20:02

LULZNIZ

Name: Anonymous 2008-05-10 20:07

>>47
I think they're just some excited college kids. You know the kind.
Fucking ignoramus

Name: Anonymous 2008-05-10 22:48

>>42
- argv is guaranteed to not be null. short-circuit evaluation will skip second dereference if first one was
- return value doesn't need to be checked -- if buffering can't be turned off then it can't, ``no use crying over spilled milk''.
- all open files are closed when it exits

Name: Anonymous 2008-05-11 1:16

>>42 is even worse than anoncoreutils people

Name: Anonymous 2008-05-11 3:10

What the fuck is Anoncoreutils supposed to be?

Name: Anonymous 2008-05-11 3:15

>>52
It's where you write broken versions of the simplest GNU tools so that your Linux system (the only thing it can run on) will be only 99% GPL.

Name: Anonymous 2008-05-11 3:57

>>52
Lurk moar.

Name: Anonymous 2008-05-11 4:03

>>50
- all open files are closed when it exits
Irrelevant.  It will need to open an arbitrary number of files before that time, and it could easily run out of descriptors.

Also,
[code]$ for i in *.c; do cc -o /dev/null $i -ansi -pedantic; done
cat.c: In function ‘main’:
cat.c:43: warning: ISO C90 forbids mixed declarations and code
chgrp.c:15: error: syntax error before ‘do_chgrp’
chown.c:18: error: syntax error before ‘do_chown’
md5sum.c:2: warning: ISO C90 does not support ‘long long’
md5sum.c:110: error: syntax error before ‘/’ token
md5sum.c:110:28: error: too many decimal points in number
md5sum.c:117: error: missing terminating ' character
md5sum.c:120: error: syntax error before numeric constant
md5sum.c:120: error: conflicting types for ‘memset’
md5sum.c:120: warning: data definition has no type or storage class
md5sum.c:124: error: conflicting types for ‘W’
md5sum.c:22: error: previous declaration of ‘W’ was here
md5sum.c:124: error: invalid initializer
md5sum.c:124: warning: data definition has no type or storage class
md5sum.c:125: error: conflicting types for ‘W’
md5sum.c:22: error: previous declaration of ‘W’ was here
md5sum.c:125: error: invalid initializer
md5sum.c:125: warning: data definition has no type or storage class
md5sum.c:126: error: conflicting types for ‘md5round’
md5sum.c:33: error: previous definition of ‘md5round’ was here
md5sum.c:126: warning: data definition has no type or storage class
md5sum.c:126: error: syntax error before ‘/’ token
mkdir.c: In function ‘main’:
mkdir.c:62: warning: comparison is always false due to limited range of data type
mkfifo.c: In function ‘main’:
mkfifo.c:39: warning: comparison is always false due to limited range of data type
rmdir.c: In function ‘main’:
rmdir.c:30: error: ‘verbose’ undeclared (first use in this function)
rmdir.c:30: error: (Each undeclared identifier is reported only once
rmdir.c:30: error: for each function it appears in.)
sha1sum.c:2: warning: ISO C90 does not support ‘long long’
sha1sum.c:65: error: syntax error before ‘/’ token
sha1sum.c:65:28: error: too many decimal points in number
sha1sum.c:72: error: missing terminating ' character
sha1sum.c:75: error: syntax error before numeric constant
sha1sum.c:75: error: conflicting types for ‘memset’
sha1sum.c:75: warning: data definition has no type or storage class
sha1sum.c:79: error: conflicting types for ‘W’
sha1sum.c:15: error: previous declaration of ‘W’ was here
sha1sum.c:79: error: invalid initializer
sha1sum.c:79: warning: data definition has no type or storage class
sha1sum.c:80: error: conflicting types for ‘W’
sha1sum.c:15: error: previous declaration of ‘W’ was here
sha1sum.c:80: error: invalid initializer
sha1sum.c:80: warning: data definition has no type or storage class
sha1sum.c:81: error: conflicting types for ‘sha1round’
sha1sum.c:33: error: previous definition of ‘sha1round’ was here
sha1sum.c:81: warning: data definition has no type or storage class
sha1sum.c:81: error: syntax error before ‘/’ token
sync.c: In function ‘main’:
sync.c:2: warning: return type of ‘main’ is not ‘int’
touch.c: In function ‘main’:
touch.c:108: warning: initializer element is not computable at load time
touch.c:108: warning: initializer element is not computable at load time
tty.c: In function ‘main’:
tty.c:8: warning: ISO C forbids omitting the middle term of a ?: expression
whoami.c: In function ‘main’:
whoami.c:5: warning: return type of ‘main’ is not ‘int’
[/code[

Name: Anonymous 2008-05-11 4:11

>>53
Made me laugh at the failure that is Lulznix/Anonix/Whatever.

>>54
Needs to suck less cock.

Name: Anonymous 2008-05-11 5:42

Name: Anonymous 2008-05-11 7:00

>>55
/* @cat.c */
/* NOTE: GNU's cat will not cat a file into itself. Should we check for this?
   Possibility of infinite loop here. POSIX doesn't specify what happens if
   standard input happens to be standard output (cat to temp. file and then
   write that to the output? don't write what was already written?) */
#include <errno.h>
#include <stdio.h>
#include <string.h>

#define CATBUF_SIZE 65536 /* increase this if you want OMG MOAR SPEED! */

char catbuf[CATBUF_SIZE];                                                 

int main(int argc, char** argv) {
 int uflag = 0, retval = 0, i = 1;
 FILE *input;

 if(argc>1 && !strcmp(*argv,"-u")) {
  uflag=1;
  retval=setvbuf(stdout,NULL,_IONBF,0);
  i++;
 }
 if(i>=argc) { /* catting stdin */
  input=stdin;
  goto cat_stdin;
 }
 while(argv[i]) {
  int l;
  if(strcmp(argv[i],"-")) {
   if(!(input=fopen(argv[i++],"rb"))) {
    fprintf(stderr,"%s: could not open %s: %s\n",argv[0],argv[i-1],strerror(errno));
    retval=1;
    continue;
   }
  } else {
   input=stdin;
   i++;
  }
 cat_stdin:
  if(uflag)
   retval|=setvbuf(input, NULL, _IONBF, 0);
  while(l=fread(catbuf,1,CATBUF_SIZE,input)) {
   if(fwrite(catbuf,1,l,stdout)!=l) {
    fprintf(stderr,"%s: error writing to stdout: %s\n",argv[0],strerror(errno));
    retval=1;
   }
  }
  if(ferror(input))
   fprintf(stderr,"%s: error reading %s: %s\n",argv[0],argv[i-1],strerror(errno));
  if(input!=stdin)
   retval|=fclose(input);
 }
 return retval;
}

Name: Anonymous 2008-05-11 8:42

>>50
- argv is guaranteed to not be null. short-circuit evaluation will skip second dereference if first one was
Presumably you meant argv[0], which is not correct.
argv[0] is guaranteed to be NULL when argc is 0.
From ISO 9899:1999 5.1.2.2.1:
- The value of argc shall be nonnegative.
- argv[argc] shall be a null pointer.

- return value doesn't need to be checked -- if buffering can't be turned off then it can't, ``no use crying over spilled milk''.
Can you guess in which situation buffering is not possible to be turned off?
- all open files are closed when it exits
cat a b c d e f g h i g k l m n o p q r t u v w x y z slow-device
See my point?

Name: Anonymous 2008-05-11 10:09

Presumably you meant argv[0], which is not correct.
Dude what.  Read it again.

Name: Anonymous 2008-05-11 10:12

>>57
Different people, just as pointless.

Name: Anonymous 2008-05-11 10:25

>>60
argv is of course guaranteed not to be a null pointer.
It's a pointer to pointers to char.
argv[0] may or may not be a null pointer, depending on the value of argc.
I suggest you learn some C, god damn retard.

Name: Anonymous 2008-05-11 10:53

>>62
unending facepalm

Name: Anonymous 2008-05-11 14:07

Name: Anonymous 2008-05-11 14:26

Name: Anonymous 2008-05-11 14:29

Name: Anonymous 2008-05-11 14:44

>>66
Hey, I got the GUI page as a first random page!

Name: Anonymous 2008-05-11 23:39

>>58
I'd like to see you fags complain about THIS cat.

Name: I am a gay tuna fish 2008-05-12 2:13

(USER IS A COMPLETE IDIOT FOR POSTING THIS)

Name: Anonymous 2008-05-12 5:43

>>68
this one is better:
#!/bin/sh

catstdin=true
ddcmd=dd

args=`getopt u $*`
if [ $? -ne 0 ]
then
 echo 'Usage: cat [-u] [file ...]'
 exit 2
fi
set -- $args
for i
do
 case "$i" in
  -u) ddcmd="dd bs=1";;
  --) break;;
 esac
 shift
done
shift

for file
do
 $ddcmd if=$file 2>/dev/null
 catstdin=false
done

if $catstdin
then
 $ddcmd 2>/dev/null
fi

Name: Anonymous 2008-05-12 7:48

>>70
I came.

Name: sage 2008-05-12 7:57

~ $ cat /dev/sage

Name: Anonymous 2008-05-12 15:10

>>58
  if(i>=argc) { /* catting stdin */

While there is such a verb "to cat", it is not applicable to "stdin", as the meanings are of nautical origin:

  - to flog with a cat-o'-nine-tails
  - to hoist (an anchor) and secure to a cathead

Also note that the Unix "cat" is an abbreviation of "concatenate".

Name: Anonymous 2008-05-12 15:43

Also note that the Unix "cat" is an abbreviation of "concatenate".
It is short for "catenate", fool.

Name: Anonymous 2008-05-12 15:46

>>74
No it's not. See POSIX Vol II, Chapter 4:3.

Name: Anonymous 2008-05-12 15:48

>>74
$ man cat
CAT(1)                           User Commands                          CAT(1)

NAME
       cat -
concatenate files and print on the standard output

SYNOPSIS
       cat [OPTION] [FILE]...

DESCRIPTION
Concatenate FILE(s), or standard input, to standard output.

Name: Anonymous 2008-05-12 15:56

>>74
Good Sir, I salute you!

>>75,76
YHBT

Name: Anonymous 2008-05-12 16:01

lol, dipshits

catenate and concatenate means the same fucking thing

Name: Anonymous 2008-05-12 20:19

>>73
it's a metaphor. cat is flogging stdin to get the bytes out of it.

Name: Anonymous 2008-05-14 8:11

HAX MY ANUS

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List