Back to index

lightning-sunbird  0.9+nobinonly
Functions
teststream.c File Reference
#include <stdio.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[] 
)

Definition at line 6 of file teststream.c.

                                 {
  char* cookie;

  cookie = getenv("LTERM_COOKIE");  /* Get security cookie */
  if (cookie == NULL)
    cookie = "";

  if (argc < 2) {
    fprintf(stderr, "Usage: %s <data-string> [<terminator-string>]\n",argv[0]);
    return 1;
  }

  if (argc > 2) {
    /* NOT IMPLEMENTED YET */
    fprintf(stdout, "\033{T%s\n%s%s", argv[2], argv[1], argv[2]);

  } else {
    fprintf(stdout, "\033{S%s\n%s%c", cookie, argv[1], '\0');
  }

  return 0;
}

Here is the call graph for this function: