Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

hide.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.


Functions

int main (int argc, char *argv[])

Function Documentation

int main int    argc,
char *    argv[]
 

\** File : SUMA.c

Author:
: Ziad Saad Date : Thu Dec 27 16:21:01 EST 2001
Purpose :

Input paramters :

Parameters:
param  Usage : SUMA ( )
Returns :
Returns:
Support :
See also:
OpenGL prog. Guide 3rd edition , varray.c from book's sample code
Side effects :

Definition at line 5 of file hide.c.

References argc, key, and putchar.

00006 {
00007    int nkey , ikey ;
00008    unsigned char *key ;
00009    int chin , chout ;
00010 
00011    if( argc < 2 || strncmp(argv[1],"-help",5) == 0 ){
00012       fprintf(stderr,"Usage: hide key < input > output\n") ;
00013       exit(1) ;
00014    }
00015 
00016    key = (unsigned char *) argv[1] ; nkey = strlen(argv[1]) ;
00017    if( nkey < 1 ){ fprintf(stderr,"Illegal key\n") ; exit(1) ; }
00018 
00019    ikey = 0 ;
00020    do{
00021       chin = getchar() ; if( chin == EOF ) break ;
00022       chout = ((unsigned char)chin) ^ key[ikey++] ;
00023       putchar(chout) ;
00024       ikey = ikey % nkey ;
00025    } while(1) ;
00026 
00027    exit(0) ;
00028 }
 

Powered by Plone

This site conforms to the following standards: