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

📄 dev_createpatch.html

📁 软件是使用VC70
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Creating patches</title>
  <meta content="text/html; charset=us-ascii" http-equiv="content-type">
  <link type="text/css" rel="stylesheet" href="office11.css">
</head>
<body>
<h1>Creating patches</h1>
<br>
<dl>
  <dt>Using <a
 href="http://www.gnu.org/software/diffutils/diffutils.html%20target="
 _blank="" class="external">GNU Diff</a> <img title="External Link"
 src="external.png" border="0" height="10" width="10">
  </dt>
  <dd>1. Download and install <a
 href="http://www.gnu.org/software/diffutils/diffutils.html%20target="
 _blank="" class="external">GNU Diff</a> <img title="External Link"
 src="external.png" border="0" height="10" width="10">.</dd>
  <dd>2. Type <i>cmd</i> in Run and navigate your way to where GNU
Diff is installed.</dd>
  <dd>3. Write <i>diff -[parameter(s)] &lt;path to the untouched file
or folder&gt; &lt;path to the changed file or folder&gt; &gt;
my-diff.diff</i></dd>
  <dd>4. A file, my-diff.diff, will now be created in the directory
which GNU Diff is placed. Other extensions for the patch (such as .txt)
are acceptable, there is no standard.</dd>
  <dd><br>
Example: <i>C:\Program Files\GNU Diff&gt;diff -uNr dcplusplus_orig
dcplusplus_chan &gt; my-diff.diff</i> <br>
C:\Program Files\GNU Diff is where GNU Diff is installed.<br>
The parameter <i style="font-weight: bold;">u</i> means the diff will
be unified. <i style="font-weight: bold;">N</i> means that GNU Diff
will show output even if a file doesn't exist in one of the two
folders.
    <i style="font-weight: bold;">r</i> means that GNU Diff will go
through subdirectories and give output on which directory and file
differ.
    <br>
    <i>dcplusplus_orig</i> is the folder that is untouched and what the
changes is going to differ against.
    <br>
    <i>dcplusplus_chan</i> is the folder where changes has occured.
    <br>
The actual diff is <i>my-diff.diff</i>.
    <p>Parameters and more information on how to use GNU Diff can be
found in the documentation for GNU Diff which should have come included
with GNU Diff. Otherwise, the manual can be found at the <a
 href="http://www.gnu.org/software/diffutils/manual/diff.html"
 target="_blank" class="external">GNU Diff manual</a> <img
 title="External Link" src="external.png" border="0" height="10"
 width="10"></p>
  </dd>
  <dt>Interpreting the diff</dt>
  <dd>
    <pre>diff -uNr dcplusplus_orig/client/file.cpp dcplusplus_chan/client/file.cpp<br>--- dcplusplus_orig/client/file.cpp	Tue Nov 30 00:21:30 2004<br>+++ dcplusplus_chan/client/file.cpp	Wed Dec  1 13:59:59 2004<br>@@ -336,7 +336,7 @@<br>// text<br>        // text<br>        int a = 0;<br>-       int b;<br>+       int c;<br>        double pi;<br>        string helpfile;<br>        string dcplusplus;</pre>
  </dd>
  <dd>Lines starting with <b>-</b> (minus sign) are going to be
removed. <br>
Lines starting with <b>+</b> (plus sign) are going to be added.</dd>
</dl>
</body>
</html>

⌨️ 快捷键说明

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