-1

I'm sorry it's such a stupid question, but special characters are so hard to search about on google.

I'm trying to understand this hacky looking code as so:

#define DEFUN(funcname, cmdname, cmdstr, helpstr) \
  static int funcname (struct cmd_element *, struct vty *, int, char **); \
  static struct cmd_element cmdname = \
  { \
    cmdstr, \
    funcname, \
    helpstr \
  }; \
  static int funcname \
  (struct cmd_element *self, struct vty *vty, int argc, char **argv)
CuriousKimchi
  • 205
  • 2
  • 10

2 Answers2

1

It lets you continue your statement on the next line

See: What does a backslash in C++ mean?

Community
  • 1
  • 1
Henningsson
  • 1,275
  • 1
  • 16
  • 23
1

In this context it specifies that the macro definition is continued on the next line. Without it, you'd have to write everything in a single line.

StoryTeller - Unslander Monica
  • 165,132
  • 21
  • 377
  • 458