v18i082: smiley - smiley faces generator, Part01/01
DaviD W. Sanderson
dws at cs.wisc.edu
Sat Apr 27 11:21:30 AEST 1991
Submitted-by: DaviD W. Sanderson <dws at cs.wisc.edu>
Posting-number: Volume 18, Issue 082
Archive-name: smiley/part01
Supersedes: smiley: Volume 17, Issue 41
smiley(1) is a "smiley server" I wrote for my own pleasure.
Its list of smileys is more comprehensive than any other I have seen;
it subsumes all the smiley lists I have ever seen posted to the net.
This version has more smileys, faster smiley lookup, and some other
minor tweaks. Keep those smileys coming!
DaviD W. Sanderson (dws at cs.wisc.edu)
-------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: README Makefile other faces.in smiley.1 bsearch.c getopt.c
# smiley.c mkfaces.c patchlevel.h smiley.h
# Wrapped by dws at margay on Tue Apr 23 21:10:48 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(2279 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
Xsmiley server, version 2
X
XThis version has more smileys, faster smiley lookup, and some other
Xminor tweaks.
X
XDESCRIPTION
X
Xsmiley(1) is a "smiley server" I wrote for my own pleasure. It can
Xexplain any smiley it knows, or print one it knows at random. I use
Xit to generate a random prompt when there is a status line available
Xto hold the information I would otherwise put into my prompt. Hence
Xsmiley(1) does not contain the invisible smiley or any multi-line
Xsmileys.
X
XThe list of smileys in faces.in is more comprehensive than I have seen
Xanywhere else, largely because it is a superset of all the smiley lists
XI have ever seen posted on the net. I have lost some of the original
Xattributions; the articles whose headers I have retained are these:
X
X Message-ID: <76 at icus.UUCP>
X Message-ID: <1990Sep11.102411.8537 at diku.dk>
X Message-ID: <39917 at cci632.UUCP>
X Message-ID: <1990Sep14.122955.558 at diku.dk>
X Message-ID: <9366 at uhccux.uhcc.Hawaii.Edu>
X Message-ID: <2005 at unsvax.NEVADA.EDU>
X Message-ID: <1991Mar18.212208.27911 at odin.corp.sgi.com>
X
X From: csh068 at uk.ac.cov.cck (Smiley)
X Message-ID: <$V5&&|$@cck.cov.ac.uk>
X Date: 17 Apr 91 08:45:26 GMT
X
XIn the interest of completeness and to the best of my knowledge (I
Xstarted this collection several years ago) I have not "censored" the
Xsmileys, so there may be smileys you find offensive. I certainly find
Xsome of them offensive!
X
XThe smileys are processed by mkfaces and deliberately embedded in the
Xexecutable - it does not have to locate and parse an external data
Xfile. In order to minimize the size of the executable, smiley.c does
Xnot use standard I/O. Complaints about this will be ignored; I do not
Xanticipate ever using this on a non-UNIX system.
X
XI happened to take the included getopt.c from the rkive sources; it was
Xoriginally posted to comp.sources.unix in volume3. It is preferable to
Xthe getopt() provided on some systems as it does not use standard I/O.
X
XThe bsearch.c is from emx.utexas.edu:pub/mnt/src/lib/libposix, obtained
XTue Mar 19 14:18:28 CST 1991
X
XTERMS
X
XThis package (excluding getopt.c and bsearch.c) is
X
X(C) Copyright 1991 by DaviD W. Sanderson.
X
XYou may copy it and use it for your own enjoyment.
XYou may not represent it as your own work or sell it.
X
XAUTHOR
X
XDaviD W. Sanderson (dws at cs.wisc.edu)
END_OF_FILE
if test 2279 -ne `wc -c <'README'`; then
echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(1098 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X#-------
X# M a k e f i l e
X#
X# DaviD W. Sanderson
X#-------
X
X# some versions of make(1) care about this
XSHELL = /bin/sh
X
XOTHER = README \
X Makefile \
X other \
X faces.in
X
XMANUAL = smiley.1
X
XSOURCES = bsearch.c \
X getopt.c \
X smiley.c \
X mkfaces.c
X
XHEADERS = patchlevel.h \
X smiley.h
X
XTARGET = smiley
X
XOBJECTS = bsearch.o faces.o getopt.o smiley.o
X
XCFLAGS = -O
X
XLDFLAGS = -s
X
Xall: $(TARGET)
X
X$(TARGET): $(OBJECTS)
X $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS)
X
Xsmiley.o: smiley.c smiley.h patchlevel.h
X $(CC) $(CFLAGS) -c smiley.c
X
Xfaces.o: faces.c smiley.h
X $(CC) $(CFLAGS) -c faces.c
X
X#OLD ./mkfaces < faces.in > faces.c
X# play it safe and make sure the list is sorted,
X# since it is searched by bsearch(3):
Xfaces.c: mkfaces faces.in
X < faces.in sort | ./mkfaces > faces.c
X
Xmkfaces: mkfaces.c
X $(CC) $(CFLAGS) -o mkfaces mkfaces.c
X
Xclean:
X rm -f $(OBJECTS) mkfaces faces.c smiley.shar
X
Xclobber: clean
X rm -f $(TARGET)
X
Xsmiley.shar: $(OTHER) $(MANUAL) $(SOURCES) $(HEADERS)
X shar $(OTHER) $(MANUAL) $(SOURCES) $(HEADERS) > $@
END_OF_FILE
if test 1098 -ne `wc -c <'Makefile'`; then
echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'other' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'other'\"
else
echo shar: Extracting \"'other'\" \(1561 characters\)
sed "s/^X//" >'other' <<'END_OF_FILE'
X#-------
X# These are smileys that I do not consider suitable for use as a prompt.
X# Either they don't show up or are multiline pictures - stretching
X# the boundaries of smileys.
X#
X# DaviD W. Sanderson
X#-------
X
X smiley invisible man
X
X<\\ cat
X: *>
X<//
X
X### Bon Jovi
X#:-)
X###
X
X# Ed Koch
X:-)
X#
X
X### Bozo the Clown
X:o)
X###
X
X ___
X / \
X| RIP |
X|_____| recently deceased
X
X=|;()***<=====| <---laughing monocled man in tux and cummerbund
X sideways -- this is the basic figure
X
X=};()****<=====| laughing monocled man in tux and cummerbund,
X F holding a gun
X
X=};()****<====| laughing monocled man in tux and cummerbund,
X =] carrying bedtray w/ glass of milk
X
X=};()****<^===| lauging monocled man in tux and cummerbund,
X w/ erection
X
X=};()****<====| laughing monocled man in tux and cummerbund,
X P carrying klaxon or posthorn
X
X /_
X /
X=}8()****<=====| laughing monocled man in tux and cummerbund,
X \ _ and opera cape and mask
X \
X
X=};()****<=====| laughing monocled man in tux and cummerbund,
X o0 carrying a large puffin
X v
X
X=};()****<=====| laughing monocled man in tux and cummerbund,
X <)___)= oooo and Jetson jet-pack
X
X=};()****<=====| laughing monocled man in tux and cummerbund,
X -- - - O dropping a bowling ball or pumpkin
X
X=};()****<=====| laughing monocled man in tux and cummerbund,
X =o and pet rabbit, noticeably fatigued
X G
X
X v
X |
X=};()****<=====| laughing monocled man in tux and cummerbund,
X | and unusually long Steve Martin
X V arrow-through-head trick
END_OF_FILE
if test 1561 -ne `wc -c <'other'`; then
echo shar: \"'other'\" unpacked with wrong size!
fi
# end of 'other'
fi
if test -f 'faces.in' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'faces.in'\"
else
echo shar: Extracting \"'faces.in'\" \(14380 characters\)
sed "s/^X//" >'faces.in' <<'END_OF_FILE'
X :-) Willie Shoemaker
X!-( black eye
X!.'v (profile) flat top
X#-) partied all night
X#:-) smiley done by someone with matted hair
X#:-o smiley done by someone with matted hair
X#:o+= Betty Boop
X$-) Alex P. Keaton (from "Family Ties")
X$-) won big at Las Vegas
X$-) won the lottery
X$-) yuppie
X%') after drinking a fifth for lunch
X%*@:-( hung over
X%-(I) laughing out loud
X%-) Elephant man
X%-) after staring at the terminal for 36 hours
X%-) broken glasses
X%-) cross-eyed
X%-) long bangs
X%-6 braindead
X%-<I> drunk with laughter
X%-| been working all night
X%-~ Picasso
X%\v Picasso
X&-| tearful
X&.(.. crying
X&:-) curly hair
X'-) one eyed man
X'-) only has a left eye, which is closed
X'-) wink
X':-) one eyebrow
X'~;E unspecified 4-legged critter
X(-) needs a haircut
X(-: Australian
X(-: Don Ellis from Tektronix
X(-: left-handed
X(-::-) Siamese twins
X(-_-) secret smile
X(-o-) Imperial Tie Fighter ("Star Wars")
X(8-) wears glasses
X(8-o Mr. Bill
X(8-{)} glasses, moustache and a beard
X(: (=| wearing a ghost costume
X(:)-) scuba diving
X(:+) big nose
X(:-# said something he shouldn't have
X(:-$ ill
X(:-& angry
X(:-( frowning
X(:-( unsmiley frowning
X(:-) big-face
X(:-) no hair
X(:-) surprised
X(:-) wearing bicycle helmet
X(:-* kissing
X(:-... heart-broken
X(:-D blabber mouth
X(:-I egghead
X(:-\ VERY sad
X(:-{~ bearded
X(:-|K- formally attired
X(:<) blabber mouth
X(:=) TWO noses (?)
X(:>-< thief: hands up!
X(:I egghead
X(:^( broken nose
X(@ @) You're kidding!
X(O--< fishy
X(V)=| pacman champion
X) Cheshire cat
X)8-) scuba smiley big-face
X):-( unsmiley big-face
X):-) smiley big-face
X*!#*!^*&:-) a schizophrenic
X*-( Cyclops got poked in the eye
X*-) shot dead
X*8-) Beaker (the Muppet lab assistant) (from James Cameron)
X*:* fuzzy
X*:** fuzzy with a fuzzy mustache
X*:o) Bozo the Clown
X*<.'v (profile) wearing snow cap
X*<:-) Santa Claus
X*<|:-) Santa Claus (Ho Ho Ho)
X*<|:-)) Santa Claus
X+-(:-) Religious leader
X+-(:-) the Pope
X+-:-) priest
X+:-) priest
X+<.'v (profile) knight
X+<:-| monk/nun
X+<||-) knight
X+O:-) the Pope
X,-) User only has one eye...but he's winking
X,-) other eyed man
X,-} wry and winking
X,.'v (profile) has short hair
X,:-) User shaved his left eyebrow off this morning
X- Helen Keller
X- @= messages about nuclear war
X- -:-( punk rocker (real punk rockers don't smile) (alternate version)
X- -:-) punk rocker (alternate version)
X-) Jose Feliciano
X---... S.O.S. (variant)
X---...--- SOS (really OSO, but retained anyway)
X-:-( punk rocker (real punk rockers don't smile)
X-:-) has mohawk
X-:-) punk rocker
X-= a doused candle (to end a flame)
X-=#:-) wizard
X.'! (profile) grim
X.'" (profile) pursing lips
X.'J (profile) smiling
X.'P (profile) sticking tongue out
X.'T (profile) keeping a straight face
X.'U (profile) yawning
X.'V (profile) shouting
X.'Y (profile) whistling
X.'\ (profile) frowning
X.'r (profile) sticking tongue out
X.'v (profile) talking
X.'w (profile) speaking with forked tongue
X.-) Sammy Davis, Jr.
X.-) one eye
X.-] one eye
X...---... SOS
X.^v (profile) pointy nose
X._) suffering from Lorentz contraction (they're coming every ten minutes now)
X._) suffering from Lorentz contractions
X/8^{~ hair line, glasses, moustache, and goatee (from James Revell)
X/:-| Mr. Spock
X0-( scuba diver with a broken mask
X0-) Cyclops
X0-) arc-welder
X0-) scuba diver
X2B|^2B message about Shakespeare
X3:*> Rudolph the reindeer
X3:-o cow
X3:[ mean pet smiley
X3:] pet smiley
X3:o[ net.pets
X4:-) George Washington
X5:-) Elvis Presley
X6\/) elephant
X7:) Ronald Reagan
X7:-) Fred Flintstone
X7:^] Ronald Reagan
X8 infinity
X8 :-) wizard
X8 :-I net.unix-wizards
X8(:-) Mousketeer
X8(:-) Walt Disney
X8) frog
X8-# death
X8-) excited
X8-) glasses
X8-) sunglasses
X8-) swimmer
X8-O "Omigod!!" (done after "rm -rf *" ?)
X8-O took too many nodoz to work on thesis
X8-] "wow, maaan"
X8-o Mr. Bill
X8-| eyes wide with surprise
X8-| suspense
X8:-) glasses on forehead
X8:-) little girl
X8:] gorilla
X8=:-) Galloping Gourmet
X8=:-) chef
X8===> dickhead
X8P bullfrog in mating season
X8b bullfrog in mating season
X: ) leper
X:###) Jimmy Durante
X:$) Donald Trump
X:%) an accountant
X:%)% has acne
X:'-( crying
X:'-) crying with happiness
X:( sad
X:) cheshire cat smile
X:) happy
X:) midget smiley
X:) salamander
X:* kisses
X:*) Ed McMahon
X:*) Everyman
X:*) drunk
X:+( punched nose, hurt
X:+) Carl Friedrich Gauss
X:,( crying
X:- male
X:-! bland face
X:-" heavy smoker
X:-" pursing lips
X:-# braces
X:-# my lips are sealed
X:-# punched in the mouth
X:-#| bushy mustache
X:-#| smiley face with bushy mustache
X:-$ mouth wired shut
X:-% banker
X:-% bearded
X:-% talking out of both sides of mouth
X:-& tongue-tied
X:-' smoker
X:-'| has a cold
X:-( Drama
X:-( frowning
X:-( mad
X:-( sad
X:-( un-smiley
X:-( ) You backed your car over my toe
X:-( ) You stepped on my toe
X:-() I stubbed my toe
X:-(*) sick of netnews articles, about to vomit
X:-(0) yelling
X:-(=) big teeth
X:-(O) yelling
X:-) Comedy
X:-) Your basic smiley. This smiley is used to inflect a sarcastic or joking statement since we can't hear voice inflection over Unix.
X:-) happy
X:-) humorous
X:-) smiley standard
X:-) smiling
X:-) , outie belly button
X:-) . innie belly button
X:-) 8 Dolly Parton
X:-) < slut
X:-) < ... :-) < ... :-) < ... nymphomaniac
X:-) > celibate
X:-) )-: masking theatrical comments
X:-) --- John Holmes
X:-) ... :-( ... :-) ... :-( ... manic depressive
X:-) :-) :-) loud guffaw
X:-)!!! Sam Kinnison
X:-)' drooling
X:-)) double chin
X:-))) William Conrad
X:-))) very overweight
X:-)-- 98-pound weakling
X:-)-8 big girl
X:-)-O smiling doctor with stethoscope
X:-)-{8 big girl
X:-)-}8 big girl
X:-)8 man with bowtie
X:-)8 well dressed
X:-)== Arnold Schwarzenegger
X:-)X wearing a bowtie
X:-)} has goatee/beard
X:-)~ drooling
X:-* after eating something bitter or sour
X:-* oops!
X:-, "Hmmmm."
X:-, smirking
X:--) Jamie Farr (Klinger from M*A*S*H)
X:-/ lefty undecided smiley
X:-/ skeptical
X:-0 No Yelling! (Quiet Lab)
X:-0 orator
X:-1 bland face
X:-6 after eating something sour
X:-7 smokes a pipe
X:-7 talking out of side of mouth
X:-7 wry face
X:-8 talking out both sides of your mouth
X:-8( condescending stare
X:-9 licking its lips
X:-: mutant
X:-: toothless
X:-< frowning
X:-< moustache
X:-< real sad
X:-=) Adolph Hitler
X:-=) older smiley with mustache
X:-> biting sarcastic face
X:-> deformed lips
X:-> happy
X:-? smoking a pipe
X:-@ "I swear"
X:-@ beard has permanent wave *or* was drawn by Picasso.
X:-@ extremely angry
X:-@ screaming
X:-B drooling
X:-C just totally unbelieving
X:-C really bummed out
X:-D Said with a smile
X:-D User is laughing (at you!)
X:-D big smile
X:-D talking too much
X:-E bucktoothed vampire
X:-E has major dental problems
X:-F bucktoothed vampire with one tooth missing
X:-G- smoking cigarettes
X:-I hmm
X:-I indifferent
X:-I thinking
X:-J tongue-in-cheek comments
X:-M speaking no evil
X:-O Mr. Bill
X:-O birth
X:-O ohh, big mouth, Mick Jagger
X:-O uh oh
X:-O>-o smiley American tourist (note big mouth and camera)
X:-P Nyahhhh!
X:-P has a secret to tell you
X:-P nyah nyah
X:-P sticking out tongue
X:-P telling secrets
X:-P tongue hanging out in anticipation
X:-Q smoker
X:-Q~ smoking
X:-R has the flu
X:-S User just made an incoherent statement
X:-T keeping a straight face
X:-V shouting
X:-W speak with forked tongue
X:-X A big wet kiss!
X:-X bow tie
X:-X my lips are sealed
X:-Y a quiet aside
X:-[ biting criticism
X:-[ blockhead
X:-[ pouting
X:-[ sarcastic
X:-[ un-smiley blockhead
X:-[ vampire
X:-\ Popeye
X:-\ undecided smiley
X:-] biting sarcasm
X:-] blockhead
X:-] sarcastic
X:-` spitting out chewing tobacco
X:-a lefty smilely touching tongue to nose
X:-b left-pointing tongue
X:-b left-pointing tongue smiley
X:-c bummed out
X:-c real unhappy
X:-d lefty smiley razzing you
X:-d~ smokes heavily
X:-e disappointed
X:-f sticking tongue out
X:-i semi-smiley
X:-j left smiling
X:-k beats me, looks like something, though
X:-l y.a.s.
X:-l yet another smiley
X:-o Mr. Bill
X:-o Uh oh!
X:-o Wow!
X:-o shocked
X:-o singing national anthem
X:-o surprise
X:-o yawn
X:-p smiley sticking its tongue out (at you!)
X:-p~ smokes heavily
X:-q trying to touch tongue to nose
X:-r sticking tongue out
X:-s after a BIZARRE comment
X:-t cross smiley
X:-v speaking
X:-w speak with forked tongue
X:-x "my lips are sealed"
X:-x kiss kiss
X:-x not telling any secrets
X:-y said with a smile
X:-z y.a.s.
X:-z yet another cross smiley
X:-{ mustache
X:-{#} messages teasing people about their braces
X:-{) moustache
X:-{} heavy lipstick
X:-{~ has read too many of the toilet paper articles previous to lunch
X:-| "have an ordinary day"
X:-| grim
X:-| no expression
X:-|| angry
X:-} "Thish wine tashted pretty good"
X:-} beard
X:-} lipstick
X:-} pretty lips
X:-~) has a cold
X:/) not funny
X:/7) Cyrano de Bergerac
X:/i no smoking
X:3-< dog
X:8) pig
X::-) wears glasses
X:< midget unsmiley
X:< what pretences!
X:<() African tribesman
X:<) from an Ivy League School
X:<)= for those with beards too
X:<= walrus
X:<| attends an Ivy League school
X:= | baboon
X:=) has two noses
X:=8) baboon
X:> hmm, let me think...
X:> midget smiley
X:>) big nose
X:?) philosopher
X:@ what?
X:@) pig
X:C what?
X:D laughter
X:I Hmmm, not funny!
X:O yelling
X:Q what?
X:Q) John Q. Public
X:Ui smoking
X:Uj smoking (and smiling)
X:V woodpecker
X:V) woodpecker
X:X) hearing no evil
X:[ real downer
X:] Gleep...a friendly midget smiley who will gladly be your friend
X:^) broken nose
X:^) smiley with pointy nose (righty)
X:^D "Great! I like it!"
X:^{ for those with moustaches
X:^{)> moustache and beard
X:_) User's nose is sliding off of his face
X:n) funny-looking right nose
X:u) funny-looking left nose
X:v) left-pointing broken nose
X:v) left-pointing nose
X:{ oh boy, the headmaster!...
X:} What should we call these? (what?)
X:~( nose put out of joint
X:~) Peter Ubberoth
X:~) needs a nosejob
X:~) pointy nose (righty)
X:~) ugly nose
X;( crying
X;-( beaten up
X;-( crying
X;-) beaten up
X;-) crying with happiness
X;-) getting fresh
X;-) sardonic incredulity
X;-) winking
X;-\ Popeye beaten up
X;-| beaten up but silent
X;^? punched out
X<&&> message concerning rubber chickens
X<:-( disappointed
X<:-( dunce
X<:-) Vietnamese peasant
X<:-) dumb questions
X<:-)<<| in a space rocket
X<:-I dunce
X<:-O Eeek!
X<:>== a turkey emoticon
X<:I dunce
X<<<<(:-) hat salesman
X<I==I) on four wheels
X<{:-)} in a bottle
X<|-( Chinese and doesn't like these kind of jokes
X<|-(= Chinese and unhappy
X<|-) Chinese
X<|-)= Chinese
X=) Variation on a theme...
X=):-) Uncle Sam
X=.'v (profile) has mohawk
X=0== Mexican on a railroad!
X=:-#} punk rocker with a mustache
X=:-( punk rocker (real punk rockers don't smile)
X=:-) hosehead
X=:-) punk rocker
X=:-H football player
X===:[OO']>:=== has been railroaded
X=====:} snake
X=t== Mexican run over by train
X=|:-) Abe Lincoln
X=|:-)= Abe Lincoln
X>- female
X>-< absolutely livid!!
X>-> china man
X>-^);> fish
X>:) a little devil
X>:*) Bozo the Clown
X>:-( mad, annoyed
X>:-( sick and tired of reading this nonsense
X>:-< mad
X>:-> devilish
X>:-I net.startrek
X>:-b left-pointing tongue smiley
X>:^( headhunter (Amazon style)
X>;-> Winky and devil combined. A very lewd remark was just made.
X>< >< about/to someone wearing argyle socks
X>>-O-> General Custer
X>|-> Chinese
X?-( about people with a black eye
X?-( has black eye
X@%&$%& You know what that means...
X@%&$%&$\&*@%$#@ you know what that means...
X at -) Cyclops
X at .'v (profile) has curly hair
X@:-) Indian (East)
X@:-) User is wearing a turban
X@:-) wavy hair
X@:I turban
X@= User is pro-nuclear war
X@>--->---- a rose
XB) frog wearing sunglasses
XB-(8 Sir Robin Day (a British BBC TV presenter, famed for his grumpy countenance, and who wears glasses and a bow tie)
XB-) Batman
XB-) glasses
XB-) horn-rimmed glasses
XB-) sunglasses
XB-)-[< sunglasses and swimming trunk
XB-D "Serves you right, dummy!!"
XB-| cheap sunglasses
XB:-) sunglasses on head
XB^) hornrimmed glasses
XC:# football player
XC:-) large brain capacity
XC=:-) Galloping Gourmet
XC=:-) chef
XC=}>;*{)) Mega-Smiley... A drunk, devilish chef with a toupee in an updraft, a mustache, and a double chin
XC=}>;*{O) Mega-Smiley... A drunk, devilish chef with a toupee in an updraft, a mustache, and a double chin
XC|:-= Charlie Chaplin
XE-:-) User is a Ham radio operator
XE-:-I net.ham-radio
XK:P User is a little kid with a propeller beanie
XL:-) just graduated
XM-) sees no evil
XM-),:X),:-M sees no evil, hears no evil, speaks no evil
XM:-) saluting
XO :-) User is an angel (at heart, at least)
XO |-) net.religion
XO-&-< doing nothing
XO-(==< chastised and/or chagrined, or is merely asleep.
XO-) Megaton Man On Patrol! (or else, user is a scuba diver)
XO-) cyclops
XO-G-< pointing to self
XO-S-< in a hurry
XO-Z-< in a big hurry
XO:-) acting very innocent (halo)
XO:-) with halo
XO>-<|= of interest to women
XOO headlights on msg
XP-) Colonel Klink (Hogan's Heroes)
XP-) getting fresh
XQ:-) new graduate
XR-) broken glasses
XX-( User just died
XX-( net.suicide
X[:-) User is wearing a walkman
X[:-) listening to walkman
X[:-) wearing a walkman
X[:-] square head
X[:] User is a robot
X[:|] robot (or other AI project)
X[] Hugs
X\/\/\/\,8-O really should fix frayed line cord on terminal
X\:-) french hat
X\:^) gumby smiley
X]:-) The Devil
X_:^) American Indian
X__. properly chastised and/or chagrined, or is merely asleep
X__/~`-'~\_/ line of thought isn't quite a line
X__Q~`__ cat
X`:-) User shaved his right eyebrow off this morning
Xd.'v (profile) wearing hard hat
Xd8= Your pet beaver is wearing goggles and a hard hat
Xg-) smiley with pince-nez glasses
Xg-) wearing ponce-nez glasses
Xi-=<*** __. CAUTION: has flame thrower and uses it!
Xi-=<****** o-(==< CAUTION: has flame thrower and uses it!
Xi-=<***i CAUTION: has flame thrower
Xo-) Cyclops
Xo= a burning candle (for flames)
Xo>8<|= messages about interesting women
Xoo somebody's head-lights are on
Xoo- puzzled, confused
Xpp# cow
Xpq`#' bull
X{ Alfred Hitchcock
X{(:-) wearing toupee
X{0-) Cyclops
X{:-) hair parted in the middle
X{:-) new hair style
X{:-) wearing a toupee
X{:-{)} new hair style, mustache and beard
X{:^=( Hitler
X{{-}}} refugee from the '60's
X{} 'no comment'
X|) salamander
X|-( late at night
X|-) Chinese
X|-) asleep (boredom)
X|-) hee hee
X|-D ho ho
X|-I sleeping
X|-O birth
X|-O bored
X|-O yawning/snoring
X|-P yuk
X|-{ "Good Grief!" (Charlie Brown?)
X|:-) heavy eyebrows
X|:-| excessively rigid
X|:[' Groucho Marx
X|I asleep
X|^o snoring
X||*( handshake offered
X||*) handshake accepted
X|~( "Someone just busted my nose".
X}(:-( wearing toupee in wind
X}:-( bull headed
X}:-( toupee in an updraft
X}:-) hair parted in the middle in an updraft
X}:-< cat
X}:^#}) mega-smiley: updrafted bushy-mustached pointy nosed smiley with a double-chin
X}:~#}) mega-smiley: updrafted bushy-mustached pointy nosed smiley with a double-chin
X~ :-( particularly angry
X~'v (profile) has long bangs
X~M`'~ camel
X~~:-( net.flame
X~~~\8-O zapped by frayed cord on terminal
X~~~~~8} snake
END_OF_FILE
if test 14380 -ne `wc -c <'faces.in'`; then
echo shar: \"'faces.in'\" unpacked with wrong size!
fi
# end of 'faces.in'
fi
if test -f 'smiley.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'smiley.1'\"
else
echo shar: Extracting \"'smiley.1'\" \(2262 characters\)
sed "s/^X//" >'smiley.1' <<'END_OF_FILE'
X.\"-------
X.\" s m i l e y . 1
X.\"
X.\" DaviD W. Sanderson
X.\"-------
X.hy 0
X.TH SMILEY 1 "April 1, 1991"
X.SH NAME
Xsmiley \- print or explain smileys
X.SH SYNOPSIS
X.B smiley
X.RB [ \-V ]
X.RB [ \-e ]
X.RB [ \-l ]
X.RB [ \-f ]
X.RI [ smiley... ]
X.br
X.SH DESCRIPTION
X.I Smiley
Xis a program for smiley junkies
Xwho like to have all the smileys at their fingertips.
X.PP
XThe options have the following meaning:
X.TP
X.B \-V
XPrint the version of the program.
X.TP
X.B \-e
XExplain the face found in the environment variable
X.BR SMILEY .
X.TP
X.B \-l
XPrint a listing of all the known smileys, with explanations.
X.TP
X.B \-f
XPrint a random smiley, face only.
X.TP
X.I smiley
XExplain the given smiley.
X.PP
XWhen invoked with no arguments,
X.I smiley
Xprints a random smiley with an explanation.
X.SH EXAMPLE
XHere are some
X.IR ksh (1)
Xfunctions that put a smiley into your prompt.
X.TP
X.BR ps1sed (\|)
XTransform the standard input so that it will display properly
Xwhen it is made part of
X.B PS1
Xin
X.IR ksh .
X(That is, quote \0!\0$\0\e\0 if they appear.)
XThese are the transformations:
X.sp
X.\" ! \(-> \e\|!\|\e\|!
X ! \(-> !\|!
X.br
X $ \(-> \e\|$
X.br
X \e \(-> \e\|\e
X.br
X.IP
XNote that a \0!\0
Xmust be doubled instead of quoted with \0\e\0
Xin order to display.
X.RS
X.nf
X.ta .5i +\w'sed \''u
X.sp
X.ne 5
Xps1sed\|(\|)
X{
X.\" sed 's/!/&&/g
X.\"# s/\\/&&/g
X.\"# s/[!$]/\\&/g'
X.\" s/[!$\\]/\\&/g'
X.\"
X.\" sed \'s/\^!/&&/g
X.\" s/[!$\|\e\|\e\|]/\|\e\|\e\|&/g\'
X.\"
X sed \'s/\^!/&&/g
X s/[$\|\e\|\e\|]/\|\e\|\e\|&/g\'
X}
X.sp
X.DT
X.fi
X.RE
X.TP
X.BR ps1 (\|)
XPut a new smiley into
X.BR PS1 .
XUse
X.I ps1sed
Xto make sure
Xany characters in the smiley
Xthat are special to the shell
Xare quoted appropriately.
X.RS
X.nf
X.sp
X.ne 5
Xps1\|(\|)
X{
X.\" export SMILEY="`smiley -f`"
X.\" PS1=`print -r - "$SMILEY" | ps1sed`" "
X export SMILEY="`smiley \-f\|`"
X PS1=`print \-r \- "$SMILEY" | ps1sed\|`" "
X}
X.fi
X.RE
X.SH CAVEATS
XThe list of smileys is the personal collection of the author,
Xso there are bound to be some missing.
X.PP
XMultiline smileys and the ``invisible smiley'' are absent from
X.I smiley
Xbecause the author does not want a multiline or invisible prompt.
X.SH AUTHOR
XDaviD W. Sanderson (dws\|@cs.wisc.edu)
X.SH COPYRIGHT
X\&
X.br
X.if n (C)
X.if t \s+8\v'+2p'\fB\(co\fR\v'-2p'\s0
X\s+2Copyright 1991 by DaviD W. Sanderson\s0
END_OF_FILE
if test 2262 -ne `wc -c <'smiley.1'`; then
echo shar: \"'smiley.1'\" unpacked with wrong size!
fi
# end of 'smiley.1'
fi
if test -f 'bsearch.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'bsearch.c'\"
else
echo shar: Extracting \"'bsearch.c'\" \(897 characters\)
sed "s/^X//" >'bsearch.c' <<'END_OF_FILE'
X/*
X * A binary search generalized from Knuth (6.2.1) Algorithm B just
X * like the AT&T man page says...
X *
X * Written by reading the System V Interface Definition, not the code.
X *
X * Totally public domain.
X */
X/*LINTLIBRARY*/
X
Xchar *bsearch(key, base, nel, width, compar)
Xchar *key; /* Key to be located */
Xchar *base; /* Beginning of table */
Xunsigned nel; /* Number of elements in the table */
Xunsigned width; /* Width of an element (bytes) */
Xint (*compar)(); /* Comparison function */
X{
X int doublewidth = width + width;
X
X char *last = base + width * (nel - 1);
X
X while (last >= base)
X {
X register char *p = base + width * ((last - base)/doublewidth);
X register int cmp = (*compar)(key, p);
X
X if (cmp == 0)
X return (p); /* aha, we found it! */
X if (cmp < 0)
X last = p - width;
X else
X base = p + width;
X }
X return ((char *) 0); /* didn't find it */
X}
END_OF_FILE
if test 897 -ne `wc -c <'bsearch.c'`; then
echo shar: \"'bsearch.c'\" unpacked with wrong size!
fi
# end of 'bsearch.c'
fi
if test -f 'getopt.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'getopt.c'\"
else
echo shar: Extracting \"'getopt.c'\" \(1799 characters\)
sed "s/^X//" >'getopt.c' <<'END_OF_FILE'
X#define ERR(s, c) if(opterr){\
X extern int strlen(), write();\
X char errbuf[2];\
X errbuf[0] = c; errbuf[1] = '\n';\
X (void) write(2, argv[0], (unsigned)strlen(argv[0]));\
X (void) write(2, s, (unsigned)strlen(s));\
X (void) write(2, errbuf, 2);}
X
Xextern int strcmp();
Xextern char *strchr();
X
Xint opterr = 1;
Xint optind = 1;
Xint optopt;
Xchar *optarg;
X
Xint
Xgetopt(argc, argv, opts)
Xint argc;
Xchar **argv, *opts;
X{
X static int sp = 1;
X register int c;
X register char *cp;
X
X if(sp == 1)
X if(optind >= argc ||
X argv[optind][0] != '-' || argv[optind][1] == '\0')
X return(-1);
X else if(strcmp(argv[optind], "--") == 0) {
X optind++;
X return(-1);
X }
X optopt = c = argv[optind][sp];
X if(c == ':' || (cp=strchr(opts, c)) == 0) {
X ERR(": illegal option -- ", c);
X if(argv[optind][++sp] == '\0') {
X optind++;
X sp = 1;
X }
X return('?');
X }
X if(*++cp == ':') {
X if(argv[optind][sp+1] != '\0')
X optarg = &argv[optind++][sp+1];
X else if(++optind >= argc) {
X ERR(": option requires an argument -- ", c);
X sp = 1;
X return('?');
X } else
X optarg = argv[optind++];
X sp = 1;
X } else {
X if(argv[optind][++sp] == '\0') {
X sp = 1;
X optind++;
X }
X optarg = 0;
X }
X return(c);
X}
END_OF_FILE
if test 1799 -ne `wc -c <'getopt.c'`; then
echo shar: \"'getopt.c'\" unpacked with wrong size!
fi
# end of 'getopt.c'
fi
if test -f 'smiley.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'smiley.c'\"
else
echo shar: Extracting \"'smiley.c'\" \(4920 characters\)
sed "s/^X//" >'smiley.c' <<'END_OF_FILE'
X/*
X * s m i l e y . c
X *
X * DaviD W. Sanderson is to blame for this.
X */
X
X#include "smiley.h"
X#include "patchlevel.h"
X
X/*
X * macros
X */
X
X/*
X * swrite() - write() a "string variable" (char *)
X */
X
X#define swrite(fd, s) (void) write((fd), (s), strlen(s))
X
X/*
X * lwrite() - write() a "string literal" (char [])
X */
X
X#define lwrite(fd, lit) (void) write((fd), (lit), sizeof(lit)-1)
X
X/*
X * PUTFACE() - write() a smiley and its description
X */
X
X#define PUTFACE(fd, i) swrite((fd), faces[i].face); \
X lwrite((fd), tab); \
X swrite((fd), faces[i].desc); \
X lwrite((fd), newline)
X
X/*
X * FD - file descriptor to which to write the output
X */
X
X#define FD 1
X
X/*
X * declarations
X */
X
Xextern int write();
Xextern int strlen();
Xextern char *bsearch();
X
X/*
X * definitions
X */
X
Xstatic char ENVAR[] = "SMILEY";
Xstatic char tab[] = "\t";
Xstatic char newline[] = "\n";
X
X/*
X * facecmp() - comparison routine for using bsearch()
X */
Xint
Xfacecmp(f1, f2)
X struct smiley *f1;
X struct smiley *f2;
X{
X return strcmp(f1->face, f2->face);
X}
X
X/*
X * fsearch() - return index of face, or -1 on failure
X *
X * Note that this assumes that there will be at most one entry in
X * faces[] for a particular smiley. It also assumes that faces[] is
X * sorted in ascending order.
X */
Xint
Xfsearch(s)
X char *s;
X{
X struct smiley f;
X struct smiley *ans;
X
X f.face = s;
X ans = (struct smiley *) bsearch(
X (char *) &f,
X (char *) faces, (unsigned) nfaces, sizeof faces[0],
X facecmp);
X
X if (ans)
X return ans - faces;
X else
X return -1;
X}
X
X/*
X * explain() - look through the list of smileys for the given face.
X *
X * If it is found, then print out the description.
X *
X * The return value is zero if the face is not found, nonzero otherwise.
X */
Xstatic int
Xexplain(s)
X char *s;
X{
X int i;
X
X if((i = fsearch(s)) == -1)
X return 0;
X
X PUTFACE(FD, i);
X return 1;
X#if 0
X int found = 0;
X
X for (i = 0; i < nfaces; i++)
X {
X extern int strcmp();
X
X if (strcmp(s, faces[i].face) == 0)
X {
X found = 1;
X PUTFACE(FD, i);
X }
X }
X return found;
X#endif
X}
X
X/*
X * main() - main program
X */
X
Xmain(ac, av)
X int ac;
X char **av;
X{
X extern char *optarg;
X extern int optind;
X extern int opterr;
X
X char *args = "Velf";
X int Vflag = 0;
X int eflag = 0;
X int lflag = 0;
X int fflag = 0;
X int errflag = 0;
X int c;
X
X /*
X * process command-line options
X */
X while ((c = getopt(ac, av, args)) != -1)
X {
X switch (c)
X {
X case 'V': /* version */
X Vflag = 1;
X break;
X case 'e': /* environment */
X eflag = 1;
X break;
X case 'l': /* list */
X lflag = 1;
X break;
X case 'f': /* face only */
X fflag = 1;
X break;
X case '?':
X errflag = 1;
X break;
X }
X }
X if (errflag)
X {
X static char msg0[] = "usage: ";
X static char *msg1[] =
X {
X " [-V] [-e] [-l] [-f] [smiley ...]\n",
X "where:\t-V\tprint program version\n",
X "\t-e\texplain the face in $",
X (char *) 0
X };
X static char *msg2[] =
X {
X "\n",
X "\t-l\tlist all the smileys\n",
X "\t-f\tprint a random smiley, face only\n",
X "\tsmiley\texplain the given smileys\n",
X "(no args)\tprint a random smiley\n",
X (char *) 0
X };
X
X char **p;
X
X lwrite(FD, msg0);
X swrite(FD, av[0]);
X
X for (p = msg1; *p; p++)
X swrite(FD, *p);
X
X lwrite(FD, ENVAR);
X
X for (p = msg2; *p; p++)
X swrite(FD, *p);
X
X return 1;
X }
X
X /*
X * perform command-line options
X */
X
X /*
X * Vflag - print version information
X */
X if (Vflag)
X {
X swrite(FD, av[0]);
X lwrite(FD, version);
X return 0;
X }
X
X /*
X * eflag - explain $SMILEY
X */
X if (eflag)
X {
X extern char *getenv();
X int unknown = 1;
X char *str;
X
X if ((str = getenv(ENVAR)) != (char *)0)
X {
X if(explain(str) != 0)
X unknown = 0;
X }
X else
X {
X static char notset[] = " not set\n";
X
X lwrite(FD, ENVAR);
X lwrite(FD, notset);
X }
X return unknown;
X }
X
X /*
X * lflag - list smileys
X */
X if (lflag)
X {
X int i;
X
X for (i = 0; i < nfaces; i++)
X {
X PUTFACE(FD, i);
X }
X return 0;
X }
X
X /*
X * literal smileys - try to explain them
X *
X * In this case the exit status is the number of smileys
X * that were not found.
X */
X if (optind < ac)
X {
X int unknown = 0;
X
X for (; optind < ac; optind++)
X {
X if(!explain(av[optind]))
X unknown++;
X }
X
X return unknown;
X }
X
X /*
X * otherwise - generate a random smiley
X */
X {
X extern int rand();
X extern void srand();
X extern long time();
X extern int getpid();
X
X char *f;
X
X /*
X * seed with the current time + the pid. (The pid
X * prevents smileys started at identical times from
X * getting the same random seed)
X */
X srand((unsigned) time((long *)0) + (unsigned) getpid());
X f = faces[rand() % nfaces].face;
X
X if (fflag)
X {
X swrite(FD, f);
X lwrite(FD, newline);
X }
X else
X {
X (void) explain(f);
X }
X }
X return 0;
X}
END_OF_FILE
if test 4920 -ne `wc -c <'smiley.c'`; then
echo shar: \"'smiley.c'\" unpacked with wrong size!
fi
# end of 'smiley.c'
fi
if test -f 'mkfaces.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'mkfaces.c'\"
else
echo shar: Extracting \"'mkfaces.c'\" \(1945 characters\)
sed "s/^X//" >'mkfaces.c' <<'END_OF_FILE'
X/*
X * m k f a c e s . c
X *
X * This program reads the file with the list of smileys and writes
X * out an initialized data structure containing the smileys.
X *
X * It assumes the smileys are each on one line, followed by a tab,
X * followed by some description.
X *
X * DaviD W. Sanderson
X */
X
X#include <stdio.h>
X
X/* avoid the possible <string.h> vs <strings.h> dilemma */
X
Xextern int
X strcmp();
Xextern char *
X strcpy();
X
X/* turn string into C string initialization */
X
Xstatic char *
Xenquote(s)
X char *s;
X{
X static char ar[1024];
X char *t = ar;
X
X for (; *s; s++)
X {
X switch (*s)
X {
X case '\\':
X case '\"':
X *t++ = '\\';
X }
X *t++ = *s;
X }
X *t = '\0';
X return ar;
X}
X
Xint
Xmain()
X{
X char prev[1024]; /* previous face */
X char face[1024]; /* current face */
X char desc[1024]; /* current description */
X int lineno = 0; /* number of current line */
X
X /* prologue */
X
X (void) printf("#include \"smiley.h\"\n");
X (void) printf("struct smiley faces[] = {\n");
X
X /* process each smiley line */
X
X prev[0] = 0; /* initialize prev to null string */
X
X while (scanf("%[^\t]\t%[^\n]\n", face, desc) == 2)
X {
X if (strcmp(prev, face))
X {
X
X /*
X * Since this face differs from the last one,
X * prepare to start a new entry.
X *
X * Complete the previous entry if there was one.
X */
X if (lineno > 0)
X {
X (void) fputs("\"},\n", stdout);
X }
X
X (void) printf("{\"%s\",\"", enquote(face));
X }
X else
X {
X
X /*
X * Since this face is the same as the last
X * one, simply continue the description.
X */
X (void) fputs("\\n\\t", stdout);
X }
X
X /* write the current description line */
X (void) fputs(enquote(desc), stdout);
X
X lineno++;
X (void) strcpy(prev, face);
X }
X
X (void) fputs("\"}\n", stdout); /* complete the last entry */
X
X /* epilogue */
X
X (void) printf("};\n");
X (void) printf("int nfaces = sizeof(faces)/sizeof(struct smiley);\n");
X
X return 0;
X}
END_OF_FILE
if test 1945 -ne `wc -c <'mkfaces.c'`; then
echo shar: \"'mkfaces.c'\" unpacked with wrong size!
fi
# end of 'mkfaces.c'
fi
if test -f 'patchlevel.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patchlevel.h'\"
else
echo shar: Extracting \"'patchlevel.h'\" \(1861 characters\)
sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
X/*
X * p a t c h l e v e l . h
X *
X * This header is included in only one place, so it causes no problems
X * to allocate storage for the version string here.
X *
X * DaviD W. Sanderson
X *
X * 23 Apr 91 version 2 at 0 sent to comp.sources.misc
X *
X * 23 Apr 91 Added about thirty (!) new smileys to faces.in from
X * a new smiley list I found in rec.humor.d.
X *
X * 05 Apr 91 Used archie to locate ftp-able smiley lists;
X * found these:
X *
X * tolsun.oulu.fi
X * /pub/misc/smiley.lzh (unable to access)
X * mrcnext.cso.uiuc.edu
X * /ux1/doc/misc/smiley
X * lut.fi
X * /misc/smileys
X * ux1.cso.uiuc.edu
X * /doc/misc/smiley
X * fionavar.mit.edu
X * /pub/jokes/smiley_face
X * sachiko.acc.stolaf.edu
X * /home/sachiko/cdr/Doc/Fun/ai-humor/smiley_face.Z
X * vax.ftp.com
X * /hobbit/flamage/silly/smiley.faces
X * mc.lcs.mit.edu
X * /its/ai/humor/smiley.face.Z
X *
X * There was a lot of redundancy (as I expected) but there
X * were two new smileys for faces.in.
X * Corrected some spelling errors in faces.in.
X *
X * 19 Mar 91 Eliminated a couple of duplicate smileys from faces.in.
X * Updated faces.in and "others" with smileys from a recent
X * posting to rec.humor.d.
X * Modified smiley.c to exit with nonzero status if the
X * search for a smiley fails.
X * Obtained bsearch.c and modified smiley.c to use
X * bsearch() to look for a smiley in the smiley table.
X * Modified Makefile to sort faces.in when feeding it to
X * mkfaces. I keep faces.in sorted anyway, but it does not
X * hurt to play it safe.
X *
X * 16 Mar 91 Fixed example of ps1sed() in smiley.1 not to \-quote
X * the doubled !. The extra quoting hurts nothing, but it
X * is superfluous.
X *
X * 15 Mar 91 Eliminated #include of <string.h> in mkfaces.c for
X * greater portability.
X *
X * 14 Mar 91 version 1 at 0 sent to comp.sources.misc
X */
X
Xstatic char version[] = " version 2 patchlevel 0\n";
END_OF_FILE
if test 1861 -ne `wc -c <'patchlevel.h'`; then
echo shar: \"'patchlevel.h'\" unpacked with wrong size!
fi
# end of 'patchlevel.h'
fi
if test -f 'smiley.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'smiley.h'\"
else
echo shar: Extracting \"'smiley.h'\" \(359 characters\)
sed "s/^X//" >'smiley.h' <<'END_OF_FILE'
X/*
X * s m i l e y . h
X *
X * DaviD W. Sanderson
X */
X
X/*
X * Each smiley has a face and a description.
X */
X
Xstruct smiley
X{
X char *face;
X char *desc;
X};
X
X/*
X * faces[] is the array of smileys, nfaces is the number of elements
X * in faces.
X *
X * Definitions for these are generated by mkfaces from faces.in.
X */
X
Xextern struct smiley faces[];
Xextern int nfaces;
END_OF_FILE
if test 359 -ne `wc -c <'smiley.h'`; then
echo shar: \"'smiley.h'\" unpacked with wrong size!
fi
# end of 'smiley.h'
fi
echo shar: End of shell archive.
exit 0
exit 0 # Just in case...
--
Kent Landfield INTERNET: kent at sparky.IMD.Sterling.COM
Sterling Software, IMD UUCP: uunet!sparky!kent
Phone: (402) 291-8300 FAX: (402) 291-4362
Please send comp.sources.misc-related mail to kent at uunet.uu.net.
More information about the Comp.sources.misc
mailing list