⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prettypr.c

📁 自己写的关于编译原理的实验报告的源代码
💻 C
字号:
/**********************************************************
**   PRETTYPR.C
**   Coco/R C Taste Example.
**   Adapted to C++ by Frankie Arzu <farzu@uvg.edu.gt>
**      from Moessenboeck's (1990) Oberon example
**
**   May 24, 1996  Version 1.06
**   Oct 11, 1997  Version 1.07 (No change)
**   Mar 31, 1998  Version 1.08 (No change)
**********************************************************/

#include "prettypr.h"
#include <stdio.h>

static int Indentation = 0;

void Append (char String[])
{  
  printf("%s",String);
}

void NewLine()
{
  int i = 1;
  printf("\n");
  while (i <= Indentation) { printf(" "); i++; }
}

void IndentNextLine()
{ 
  Indentation += 2;
  NewLine();
}

void ExdentNextLine()
{  
  Indentation -= 2;
  NewLine();
}

void Indent()
{ 
  Indentation += 2;
}

void Exdent()
{ 
  Indentation -= 2;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -