source: rtems/cpukit/libmisc/shell/main_alias.c @ f68401e

4.115
Last change on this file since f68401e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on May 3, 2012 at 3:09:24 PM

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  ALIAS Shell Command Implmentation
3 *
4 *  Author: Fernando RUIZ CASAS
5 *  Work: fernando.ruiz@ctv.es
6 *  Home: correo@fernando-ruiz.com
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 */
12
13#ifdef HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <stdio.h>
18
19#include <rtems.h>
20#include <rtems/shell.h>
21#include "internal.h"
22
23static int rtems_shell_rtems_main_alias(int argc, char **argv)
24{
25  if (argc<3) {
26    fprintf(stderr,"too few arguments\n");
27    return 1;
28  }
29
30  if (!rtems_shell_alias_cmd(argv[1],argv[2])) {
31    fprintf(stderr,"unable to make an alias(%s,%s)\n",argv[1],argv[2]);
32  }
33  return 0;
34}
35
36rtems_shell_cmd_t rtems_shell_ALIAS_Command = {
37  "alias",                                /* name */
38  "alias old new",                        /* usage */
39  "misc",                                 /* topic */
40  rtems_shell_rtems_main_alias,           /* command */
41  NULL,                                   /* alias */
42  NULL                                    /* next */
43};
Note: See TracBrowser for help on using the repository browser.