OpenGL header gl.h as well as many other headers contains function definitions spread over many lines. Here is an example :
GLAPI void glCopyTexSubImage2D( GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height );
I would like to come up with a regular expression that I could use with sed to align them. The previous example would then become:
GLAPI void glCopyTexSubImage2D( GLenum target, GLint level,GLint xoffset, GLint yoffset, GLint x, GLint y,GLsizei width, GLsizei height );
The GLAPI token is specific to OpenGL, so I’d rather ignore it so that the solution could be used in more contexts.
A Simple
sedone-liner will work for you –Test: