Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 New Codeblock tag available

views
     
TSnexus-
post May 7 2006, 06:58 PM, updated 20y ago

The intrepid coward
Group Icon
VIP
3,744 posts

Joined: Jan 2003
From: Sydney, Australia



The tag codeblock has been implemented, this is an extension from the code tag that includes a scroller. The main purpose of this tag is to shorten long code (such as config files, hijackthis logs and other source codes) from taking over the entire page.

Credits to Hydrogenaudio for the inline CSS.
Code
#include <rpc/rpc.h>
#include <rpcsvc/rusers.h>
#include <stdio.h>

/*
* a program that calls the
* rusers() service
*/

main(int argc,char **argv)

{
int num;
if (argc != 2) {
fprintf(stderr, "usage: %s hostname\n",
argv[0]);
exit(1);
}

if ((num = rnusers(argv[1])) < 0) {
fprintf(stderr, "error: rusers\n");
exit(1);
}

fprintf(stderr, "%d users on %s\n", num, argv[1] );
exit(0);
}



Usage:

CODE
[codeblock]
text
[/codeblock]


This post has been edited by fariz: May 7 2006, 07:09 PM

 

Change to:
| Lo-Fi Version
0.0142sec    0.66    6 queries    GZIP Disabled
Time is now: 25th November 2025 - 01:52 PM