Skip to content

Instantly share code, notes, and snippets.

View funkaoshi's full-sized avatar
🏠
Working from home

Ramanan Sivaranjan funkaoshi

🏠
Working from home
View GitHub Profile
@funkaoshi
funkaoshi / gist:145786
Created July 12, 2009 20:30
TTC Subway/RT Travel Times
/* Stations on the Yonge/Spadina/Sheppard Subway Line */
static const char* stationNamesYongeSpadinaSheppard =
[
"Bayview", "Bessarion", "BloorYonge", "College", "Davisville", "DonMills",
"Downsview", "Dundas", "Dupont", "Eglinton", "EglintonWest", "Finch",
"Glencairn", "King", "Lawrence", "LawrenceWest", "Leslie", "Museum",
"NorthYorkCentre", "Osgoode", "Queen", "Queen'sPark", "Rosedale",
"SheppardYonge", "Spadina", "StAndrew", "StClair", "StClairWest",
"StGeorge", "StPatrick", "Summerhill", "Union", "Wellesley", "Wilson",
"YorkMills", "Yorkdale"
#include "unistd.h"
#include "stdio.h"
/* Reads one line of data and produces the LRC of all the bytes read. */
int main ( int argc, char* argv[] )
{
char buf[1];
int n, lrc = 0;
while ( n = read(0, buf, 1) > 0 ) /* read one byte from std::in */
{