BRONZE
BRONZE 등급의 판매자 자료

[C언어][자료구조]UNIX FMT 구현

UNIX의 FMT를 구현한 프로그램 입니다. 텍스트파일을 읽어와서 일정한 룰을 적용한 텍스트파일로 변환합니다. 이 프로그램의 기본 동작을 설명하기 위해 예제를 먼저 입력하자면 INPUT-------------------------------------------------------- Unix fmt The unix fmt program reads lines of text, combining and breaking lines so as to create an output file with lines as close to without exceeding 72 characters long as possible. The rules for combining and breaking lines are as follows. 1. A new line may be started anywhere there is a space in the input. If a new line is started, there will be no trailing blanks at the end of the previous line or at the beginning of the new line. 2. A line break in the input may be eliminated in the output, provided it is not followed by a space or another line break. If a line break is eliminated, it is replaced by a space. OUTPUT-------------------------------------------------------------- Unix fmt The unix fmt program reads lines of text, combining and breaking lines so as to create an output file with lines as close to without exceeding 72 characters long as possible. The rules for combining and breaking lines are as follows. 1. A new line may be started anywhere there is a space in the input. If a new line is started, there will be no trailing blanks at the end of the previous line or at the beginning of the new line. 2. A line break in the input may be eliminated in the output, provided it is not followed by a space or another line break. If a line break is eliminated, it is replaced by a space. -------------------------------------------------------------------------- 법칙들- 1. 한둘의 길이는 공백을 포함해서 최대 72자이며, 이를 넘어갈 경우 단어 단위로 다음줄로 내린다. 만약 72자가 안되며, 다음줄의 단어들을 포함해서도 72자가 넘지 않으면 넘기 직전까지 계속 단어를 위로 끌어 올린다. 2. 연속된 줄바꿈은 원칙적으로 보존한다. 3. 단어의 앞부분에 있는 연속된 space또한 유지한다. 4. 단어를 올리거나 내릴때에는 space와 줄바꿈은 1개의 space로 대체될수 있다. 프로그램된 방법은, 단어를 인식하기 위해서 2개의 character 를 읽어와서 그것이 단어의 중간에 있는 2글자인지, 단어의 끝을 포함하는지, 단어의 시작인지, 로 크게 분류하여 처리합니다. ps. 만드는데 상당히 힘들었습니다..
압축파일
최초등록일 2007.07.30 최종저작일 2007.01
[C언어][자료구조]UNIX FMT 구현
  • 미리보기

    소개

    UNIX의 FMT를 구현한 프로그램 입니다.

    텍스트파일을 읽어와서 일정한 룰을 적용한 텍스트파일로 변환합니다.

    이 프로그램의 기본 동작을 설명하기 위해 예제를 먼저 입력하자면
    INPUT--------------------------------------------------------
    Unix fmt

    The unix fmt program reads lines of text, combining
    and breaking lines so as to create an
    output file with lines as close to without exceeding
    72 characters long as possible. The rules for combining and breaking
    lines are as follows.

    1. A new line may be started anywhere there is a space in the input.
    If a new line is started, there will be no trailing blanks at the
    end of the previous line or at the beginning of the new line.

    2. A line break in the input may be eliminated in the output, provided
    it is not followed by a space or another line break. If a line
    break is eliminated, it is replaced by a space.
    OUTPUT--------------------------------------------------------------
    Unix fmt

    The unix fmt program reads lines of text, combining and breaking lines so
    as to create an output file with lines as close to without exceeding 72
    characters long as possible. The rules for combining and breaking lines
    are as follows.

    1. A new line may be started anywhere there is a space in the input.
    If a new line is started, there will be no trailing blanks at the end of
    the previous line or at the beginning of the new line.

    2. A line break in the input may be eliminated in the output,
    provided it is not followed by a space or another line break. If a line
    break is eliminated, it is replaced by a space.
    --------------------------------------------------------------------------

    법칙들-
    1. 한둘의 길이는 공백을 포함해서 최대 72자이며, 이를 넘어갈 경우 단어 단위로 다음줄로
    내린다. 만약 72자가 안되며, 다음줄의 단어들을 포함해서도 72자가 넘지 않으면 넘기
    직전까지 계속 단어를 위로 끌어 올린다.
    2. 연속된 줄바꿈은 원칙적으로 보존한다.
    3. 단어의 앞부분에 있는 연속된 space또한 유지한다.
    4. 단어를 올리거나 내릴때에는 space와 줄바꿈은 1개의 space로 대체될수 있다.

    프로그램된 방법은, 단어를 인식하기 위해서 2개의 character 를 읽어와서
    그것이 단어의 중간에 있는 2글자인지, 단어의 끝을 포함하는지, 단어의 시작인지,
    로 크게 분류하여 처리합니다.

    ps. 만드는데 상당히 힘들었습니다..

    컴파일 실행환경

    비쥬얼 스튜디오 2003
    윈도우 XP 32비트

    소스파일, 프로젝트파일, DEBUG모드로 컴파일된 실행파일 포함.

    참고자료

    · 없음
  • 자료후기

      Ai 리뷰
      지식판매자의 이 자료 덕분에 ,복잡했던 과제를 체계적으로 정리하고, 실질적인 결과를 얻을 수 있었습니다. 완벽한 자료였습니다. 매우 추천합니다.
    • 자주묻는질문의 답변을 확인해 주세요

      해피캠퍼스 FAQ 더보기

      꼭 알아주세요

      • 자료의 정보 및 내용의 진실성에 대하여 해피캠퍼스는 보증하지 않으며, 해당 정보 및 게시물 저작권과 기타 법적 책임은 자료 등록자에게 있습니다.
        자료 및 게시물 내용의 불법적 이용, 무단 전재∙배포는 금지되어 있습니다.
        저작권침해, 명예훼손 등 분쟁 요소 발견 시 고객센터의 저작권침해 신고센터를 이용해 주시기 바랍니다.
      • 해피캠퍼스는 구매자와 판매자 모두가 만족하는 서비스가 되도록 노력하고 있으며, 아래의 4가지 자료환불 조건을 꼭 확인해주시기 바랍니다.
        파일오류 중복자료 저작권 없음 설명과 실제 내용 불일치
        파일의 다운로드가 제대로 되지 않거나 파일형식에 맞는 프로그램으로 정상 작동하지 않는 경우 다른 자료와 70% 이상 내용이 일치하는 경우 (중복임을 확인할 수 있는 근거 필요함) 인터넷의 다른 사이트, 연구기관, 학교, 서적 등의 자료를 도용한 경우 자료의 설명과 실제 자료의 내용이 일치하지 않는 경우
    문서 초안을 생성해주는 EasyAI
    안녕하세요. 해피캠퍼스의 방대한 자료 중에서 선별하여 당신만의 초안을 만들어주는 EasyAI 입니다.
    저는 아래와 같이 작업을 도와드립니다.
    - 주제만 입력하면 목차부터 본문내용까지 자동 생성해 드립니다.
    - 장문의 콘텐츠를 쉽고 빠르게 작성해 드립니다.
    - 스토어에서 무료 캐시를 계정별로 1회 발급 받을 수 있습니다. 지금 바로 체험해 보세요!
    이런 주제들을 입력해 보세요.
    - 유아에게 적합한 문학작품의 기준과 특성
    - 한국인의 가치관 중에서 정신적 가치관을 이루는 것들을 문화적 문법으로 정리하고, 현대한국사회에서 일어나는 사건과 사고를 비교하여 자신의 의견으로 기술하세요
    - 작별인사 독후감
    해캠 AI 챗봇과 대화하기
    챗봇으로 간편하게 상담해보세요.
    2025년 08월 08일 금요일
    AI 챗봇
    안녕하세요. 해피캠퍼스 AI 챗봇입니다. 무엇이 궁금하신가요?
    12:04 오전