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

libclear

Name: Anonymous 2007-07-12 2:51 ID:cZxqU9rw

This library is a must for every unix C programmer.
seriously.

libclear.c->

#include <stdlib.h>

clear(void)
{
      (void)system("clear");
}

clear_version(void)
{
      (void)clear();
      (void)system("echo Libclear version 1.00 by Michael Freeman\n");
      (void)system("echo Press Control-D to continue\n");
      (void)system("cat");
      (void)clear();
}


get it->
http://www.ibiblio.org/pub/Linux/libs/libclear-1.00.tgz

lastly, don't forget to donate!

Description:    libclear lets you clear the screen in ANY unix/linux application!  Developed especially for linux though! Libclear is NOT freeware!! You are encouraged to send $5 to the author!

srsly.(?)

Name: Anonymous 2007-07-12 3:08 ID:6DHEv6MQ

Judging from the makefile and readme, it's quite obvious it's a joke, I still lol'd though

Name: Anonymous 2007-07-12 4:39 ID:txeVX2i6


#include <stdio>
using namespace std;

void clear(int number_Of_Lines_In_Display)
{
 for (int i = 1; i = number_Of_Lines_In_Display; i++)
 {
  cout << endl;
 }
}

Name: Anonymous 2007-07-12 4:45 ID:PfUKll65

I think I understand the author's motivation for doing this, and it makes me very sad to think about.

But, on the surface, much lolz are induced.

Name: Anonymous 2007-07-12 5:09 ID:OAcBy2JU

I'm kinda tempted to package it and try to get it into a couple major distros.
win or fail?

Name: Anonymous 2007-07-12 5:16 ID:Heaven

>>5
I think you should begin by writing a Wikipedia entry for it.

Name: Anonymous 2007-07-12 5:43 ID:kQoEfWL0

>>1
Good irony of current state of Linux libraries. Every faggot writes a stupid library for everything, and you end up with a million libraries you need to install to do anything. They think their library is so important and useful it deserves a separate package, project, and of course, Wikipedia entry.

Name: Anonymous 2007-07-12 5:57 ID:cZxqU9rw

en.wikipedia.org/wiki/Libclear

Name: Anonymous 2007-07-12 6:32 ID:kQoEfWL0

>>8
You win

Name: Anonymous 2007-07-12 6:45 ID:J0XWTwRK

>>8

I lol'd. Very good sir.

Name: Anonymous 2007-07-12 10:34 ID:m620+Q3S

In Soviet Russia wikipedia is writing YOU!

http://ru.wikipedia.org/wiki/Libclear

Name: Anonymous 2007-07-12 11:09 ID:J0XWTwRK

Of course, the C2009 standard includes a library for advanced multiplatform terminal output, thus negating the need for this library.

Name: Anonymous 2007-07-12 11:34 ID:Heaven

>>1
#include <stdio.h>
void clear(){
 fputs("\033[2J\033[1;1H",stdout);
}

void clear_version(){
 clear();
 puts("OH SHI-\nPress Control-D to continue");
 for(getchar();!feof(stdin);getchar());
 clear();
}

Name: Anonymous 2007-07-12 11:40 ID:Heaven

>>13

Fails on non-VT100 (and compatible) terminals

Name: Anonymous 2007-07-12 12:21 ID:ON+xAo8Y

clear(void)
{
#ifdef WIN32
      #define CLEAR_CMD "cls"
#else
      #define CLEAR_CMD "clear"
#endif
      (void)system(CLEAR_CMD);
#undef CLEAR_CMD
}


I PORTED IT TO WINDOWS

Name: Anonymous 2007-07-12 13:03 ID:Heaven

>>15

WIN

Name: Anonymous 2007-07-12 13:08 ID:Heaven

why the irrelevant casts to void?

Name: Anonymous 2007-07-12 13:13 ID:9R4d9KtN

>>17
EXPERT PROGRAMMER best practices.

Name: Anonymous 2007-07-12 13:56 ID:UY8QsEfi

>>13
your code. awful.
for(; getchar()!=EOF; (void)clear();); /* EXPERT PROGRAMMER */
and as >>14 stated, it's not portable.
However libclear is.
libclear > you

Name: Anonymous 2007-07-12 14:03 ID:K2g6VRzC

>>19
>>13 works on DOS. libclear doesn't.

Name: Anonymous 2007-07-12 14:21 ID:UY8QsEfi

>>20
BUT LIBCLEAR HAS THOSE CASTS TO VOID WHICH GIVE A HUGE BOOST TO PERFORMANCE!111111!111111one

Name: Anonymous 2007-07-12 18:44 ID:ON+xAo8Y

>>11
lol wut

Name: Anonymous 2007-07-12 18:45 ID:ON+xAo8Y

>>20
MEET
>>15
NOW LEAVE

Name: Anonymous 2007-07-12 18:59 ID:nCntaATS

>>23
MEET
>>25
NOW TRAVEL IN TIME

Name: Anonymous 2007-07-12 19:44 ID:ON+xAo8Y

>>23
OMG I AM TEH FUTURES

Name: Anonymous 2007-07-12 21:53 ID:WF9kr36m

>>11
strange, the russian wikipedia has rounded corners, whereas the english one does not.

Name: Anonymous 2007-07-12 22:39 ID:Z5VJgxrr

>>26
I noticed that too. Do you know why, Anon?

Name: Anonymous 2007-07-12 23:32 ID:FQPq4Bgj

In soviet wikipedia, corners round you!

Name: Anonymous 2007-07-12 23:33 ID:gWG4x5Xv

I don't like this joke. It is not funny.

Name: Anonymous 2007-07-12 23:42 ID:Heaven

>>23
DOS != WIN32

Name: Anonymous 2007-07-13 1:54 ID:Kz1SVIGD

I just realized, all what's missing is a SourceForge page, then it can be a truly complete library.

Name: Anonymous 2007-07-13 4:18 ID:Heaven

sourceforge pages are only for freeware projects

Name: Anonymous 2007-07-13 16:19 ID:Heaven

>>32
INCORRECT. ANY OPEN SOURCE PROJECT MAY REGISTER WITH SOURCEFORGE REGARDLESS OF COST OF USE.

Name: Anonymous 2007-07-14 17:10 ID:Heaven

123

Name: Anonymous 2007-07-14 17:11 ID:Heaven

0123

Name: Anonymous 2007-07-14 17:13 ID:Heaven

123321

Name: Anonymous 2007-07-14 21:04 ID:DQ5OYivh

hay guise i have an idea let's make libclear into a full-time project so we can submit it to sourceforge too

It will consist only of a clear() and clear_version() but with it will be coded by EXPERT PROGRAMMERS

what does anonymous think? wikipedia is already trolled (the article isn't removed yet and i don't think they will remove it)

Name: Anonymous 2007-07-15 4:33 ID:pWZqLQbq

>>33
Libclear is not an open source project per the OSI definition (let alone Free Software according to GNU). Someone should rewrite it and release it under a MIT or BSD license. Should we start project freeclear?

Name: Anonymous 2007-07-15 5:20 ID:PamYvA1v

>>38
Agreed. It should be free as in freedom and beer... and stuff.

Name: Anonymous 2007-07-15 5:26 ID:uNcxH1lT

>>38
I don't understand, why not? The source of the code is available, hence ``open source''

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