Imposing Line Numbers automatically in the C code
Is it possible to impose line numbers automatically while writing C Code in Linux using "vi editor"...my requirement is the whenver I put a DEBUG message, I can say where exactly the control has reached.
Please let me know the way to implement the same or else if Linux already supports any such command or function which can tell me exact line number whenever I call that.
#define DEBUG(arg...) \
//at line number 20
DEBUG("I am in Line number : %d\n", Line Number()); // and it gives me the output as "I am in Line number : 20
//similarly at line number 30
DEBUG("I am in Line number : %d\n", Line Number()); // and it gives me the output as "I am in Line number : 30