\documentstyle[lslide,a4wide]{harticle}

\addtolength{\textheight}{-0.5in}
\verttop
\shadowframe

\begin{document}

\title{UNIX È¯°æ¿¡¼­ÀÇ C ÇÁ·Î±×·¡¹Ö}
\author{±Ç ¹ü ÁØ}
\organization{SPARCS} 
\date{1993³â 7¿ù 7ÀÏ}
\titlepage

\begin{slide}
\subsection{ÇÁ·Î±×·¥ È¯°æ°úÀÇ Á¢ÃË}
\begin{itemize}

\item{Accessing Command Line Arguments}
\begin{large}
\begin{verbatim}
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
    {
    int arg_count;

    for (arg_count = 1; arg_count < argc; arg_count++)
        printf("%s%c", argv[arg_count],
            (arg_count<argc-1)? ' ' : '\n');
    exit(0);
    }
\end{verbatim}
\end{large}
\vspace{1cm}

\item{Accessing Environment Variables}
\begin{large}
\begin{verbatim}
#include <stdio.h>

main(argc, argv, envp)
int argc;
char *argv[];
char *envp[];
    {
    int env_count = 0;

    while (envp[env_count] != NULL)
        {
        printf("%s\n", envp[env_count]);
        env_count++;
        }
        exit(0);
    }
\end{verbatim}
\end{large}
\vspace{1cm}

\item{Accessing Environment Variables Using {\tt getenv()}}
\end{itemize}
\end{slide}

\begin{slide}
\subsection{ÇÁ·Î¼¼½º}
\begin{itemize}

\item{The {\tt system()} Function}
\begin{large}
\begin{verbatim}
main()
    {
    int stat;

    stat = system("date");
    }
\end{verbatim}
\end{large}
\vspace{1cm}

\item{Low-Level Process Creation --- {\tt execl()} and {\tt execv()}}
\begin{large}
\begin{verbatim}
main()
    {
    execl("/bin/date", "date", NULL);
    execl("/usr/bin/date", "date", NULL);
    fprintf(stderr, "Someone stole 'date'\n");
    }
\end{verbatim}
\end{large}
\vspace{1cm}

\item{Process Control --- {\tt fork()} and {\tt wait()}}
\begin{large}
\begin{verbatim}
int status;

if (fork() == 0)
    execl(...);
wait(&status);
\end{verbatim}
\end{large}
\vspace{1cm}

\item{Pipes}
\begin{large}
\begin{verbatim}
int fd[2];

stat = pipe(fd);
if (stat == -1)
    /* there was an error ... */
\end{verbatim}
\end{large}
\end{itemize}
\end{slide}

\begin{slide}
\subsection{½Ã±×³Î}
\begin{itemize}

\item{Signals}
    \begin{itemize}
    \item{interrupt, quit --- keyboard}
    \item{hangup --- hanging up the phone on dialup lines}
    \item{terminate --- kill command}
    \end{itemize}
\begin{footnotesize}
\begin{verbatim}
          SIGHUP    1    hangup
          SIGINT    2    interrupt
          SIGQUIT   3*   quit
          SIGILL    4*   illegal instruction
          SIGTRAP   5*   trace trap
          SIGABRT   6*   abort (generated by abort(3) routine)
          SIGEMT    7*   emulator trap
          SIGFPE    8*   arithmetic exception
          SIGKILL   9    kill (cannot be caught, blocked, or ignored)
          SIGBUS    10*  bus error
          SIGSEGV   11*  segmentation violation
          SIGSYS    12*  bad argument to system call
          SIGPIPE   13   write on a pipe or other socket with no one to read it
          SIGALRM   14   alarm clock
          SIGTERM   15   software termination signal
          SIGURG    16@  urgent condition present on socket
          SIGSTOP   17+  stop (cannot be caught, blocked, or ignored)
          SIGTSTP   18+  stop signal generated from keyboard
          SIGCONT   19@  continue after stop
          SIGCHLD   20@  child status has changed
          SIGTTIN   21+  background read attempted from control terminal
          SIGTTOU   22+  background write attempted to control terminal
          SIGIO     23@  I/O is possible on a descriptor (see fcntl(2V))
          SIGXCPU   24   cpu time limit exceeded (see getrlimit(2))
          SIGXFSZ   25   file size limit exceeded (see getrlimit(2))
          SIGVTALRM 26   virtual time alarm (see getitimer(2))
          SIGPROF   27   profiling timer alarm (see getitimer(2))
          SIGWINCH  28@  window changed (see termio(4) and win(4S))
          SIGLOST   29*  resource lost (see lockd(8C))
          SIGUSR1   30   user-defined signal 1
          SIGUSR2   31   user-defined signal 2
\end{verbatim}
\end{footnotesize}

\item{Altar the Default Action --- {\tt signal()}}
\begin{large}
\begin{verbatim}
#include <signal.h>
...
signal(SIGINT, SIG_IGN);
signal(SIGINT, SIG_DFL);
signal(SIGINT, function);
\end{verbatim}
\end{large}
\end{itemize}
\end{slide}

\begin{slide}
\subsection{Ç¥ÁØ ÀÔÃâ·Â}
\begin{itemize}
\item{The Standard I/O Library --- {\tt stdio.h}}
    \begin{itemize}
    \item{\tt stdin}
    \item{\tt stdout}
    \item{\tt stderr}
    \item{\tt EOF}
    \item{\tt NULL}
    \item{\tt FILE}
    \item{\tt BUFSIZ}
    \end{itemize}
\vspace{1cm}

\item{Standard Input and Standard Output}
\vspace{1cm}

\item{Error Handling --- {\tt stderr} and {\tt exit()}}
\vspace{1cm}

\item{Miscellaneous I/O Functions}
    \begin{itemize}
    \item{\tt getc(), getchar()}
    \item{\tt putc(), putchar()}
    \item{\tt feof(), ferror(), fileno()}
    \item{\tt printf(), fprintf(), sprintf()}
    \item{\tt scanf(), fscanf(), sscanf()}
    \item{\tt gets(), fgets(), ungetc()}
    \end{itemize}
\end{itemize}
\end{slide}

\begin{slide}
\subsection{È­ÀÏ ÀÔÃâ·Â}
\begin{itemize}

\item{Open a File --- {\tt fopen()}}
\begin{small}
\begin{verbatim}
FILE *fopen(filename, type)
    char *filename;
    char *type;
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Reopen a File --- {\tt freopen()}}
\begin{small}
\begin{verbatim}
FILE *freopen(filename, type, ioptr)
    char *filename;
    char *type;
    FILE *ioptr;
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Flush Stream Buffer --- {\tt fflush()}}
\begin{small}
\begin{verbatim}
ffcluse(ioptr)
    FILE *ioptr;
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Close a File --- {\tt fclose()}}
\begin{small}
\begin{verbatim}
fclose(ioptr)
    FILE *ioptr
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Set Buffer for File I/O --- {\tt setbuf()}}
\begin{small}
\begin{verbatim}
setbuf(ioptr, buf)
    FILE *ioptr;
    char *buf;
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Obtain File Descriptor --- {\tt fileno()}}
\begin{small}
\begin{verbatim}
int fileno(ioptr)
    FILE *ioptr;
\end{verbatim}
\end{small}
\vspace{5mm}

\item{Rewind a Stream --- {\tt rewind()}}
\begin{small}
\begin{verbatim}
rewind(ioptr)
    FILE *ioptr;
\end{verbatim}
\end{small}
\vspace{5mm}
\end{itemize}
\end{slide}

\begin{slide}
\subsection{¹®ÀÚ ÀÔÃâ·Â}
\begin{Large}
\begin{itemize}
\item{{\tt getc()} Macro --- {\large Get a Character from a File}}
\item{{\tt fgetc()} Function}
\item{{\tt getchar()} Macro --- {\large Get a Char. from Standard Input}}
\item{{\tt fgets()} --- {\large Read a String from a File}}
\item{{\tt ungetc()} --- {\large Push a Character Back on a Stream}}
\item{{\tt putc()} Macro --- {\large Put a Character to a File}}
\item{{\tt fputc()} Function --- {\large Put a Character to a File}}
\item{{\tt putchar()} Macro --- {\large Put a Character to Standard Output}}
\item{{\tt fputs()} --- {\large Put a String to a File}}
\item{{\tt feof()} --- {\large Test for End of File}}
\vspace{5mm}

\item{Formatted Input and Output}
	\begin{large}
    \begin{itemize}
    \item{Conversion Specifications}
		\begin{itemize}
        \item{{\tt d} --- Decimal Conversion}
        \item{{\tt o} --- Octal Conversion}
        \item{{\tt x} --- Hexadecimal Conversion}
        \item{{\tt h} --- Short Conversion}
        \item{{\tt u} --- Unsigned Decimal Conversion}
        \item{{\tt c} --- Character Conversion}
        \item{{\tt s} --- String Conversion}
        \item{{\tt e} --- Exponential Floating Conversion}
        \item{{\tt f} --- Fractional Floating Conversion}
        \item{{\tt g} --- Adaptable Floating Conversion}
		\item{Literal Character Output}
		\end{itemize}
	\item{Optional Format Modifiers}
		\begin{itemize}
		\item{Left Justify Field}
		\item{Minimum Field Width and Precision Specificaions}
		\end{itemize}
    \end{itemize}
	\end{large}
\end{itemize}
\end{Large}
\end{slide}

\end {document}
