<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
<title>Leavescan</title>
<link rel="StyleSheet" href="../../../book.css" type="text/css"/>
</head>
<body bgcolor="#FFFFFF">
<h2>Run Leavescan</h2>
<p>Symbian OS has a standard convention for functions that may Leave. Therefore, any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in L. Leavescan verifies that your code satisfies this convention. LeaveScan ignores calls in trapped functions, commented out code, ( // and /* and */). It also checks for calls to LD, LC and LX functions as well as normal L functions. It also checks for <span class="code">User::Leave()</span>, <span class="code">ELeave</span>, and <span class="code">User::LeaveIfError()</span>. </p>
<p>To start, define where the path to the <span class="code">leavescan.exe</span> program using the <a href="../leavescan_pref.html">Leavescan preference panel</a>.</p>
<p>Next, to run Leavescan:</p>
<ul>
<li><b>on a source file</b> — right-click a .cpp source file in the C/C++ Projects or Symbian Project Navigator view and select <b>Run Leavescan</b></li>
<li><b>on all source files in the Active Build Configuration</b> — right-click a .mmp file and select <b>Run Leavescan on Project MMP</b>. The source statements in the .mmp file are scanned to obtain a list of source files to be processed by leavescan.</li>
<li><b>from the command line</b> — scan whole directories and output to a file. For example,</li>
</ul>
<blockquote>
<p class="code">for /R %i in (*.cpp) do leavescan %i >> leavescan.out</p>
<p>This will scan all cpp files in or below the current directory, placing the result in <span class="code">leavescan.out</span>.</p>
</blockquote>
<p align="center"><img src="../images/leavescan_menu.png" width="384" height="326" /></p>
<p align="center" class="figure">Figure 1. Invoking Run Leavescan on a single source file</p>
<h5>Other references</h5>
<ul>
<li><a href="menus.htm">Carbide Menus</a></li>
<li><a href="../leavescan_pref.html">Leavescan Preferences</a><br />
</li>
</ul>
<div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
</body>
</html>