The official text
Old and new, side by side
Code of Criminal Procedure, 1973
Section 333 When accused appears to have been of sound mind
When the accused appears to be of sound mind at the time of inquiry or trial, and the Magistrate is satisfied from the evidence given before him that there is reason to believe that the accused committed an act, which, if he had been of sound mind, would have been an offence, and that he was, at the time when the act was committed, by reason of unsoundness of mind, incapable of knowing the nature of the act or that it was wrong or contrary to law, the Magistrate shall proceed with the case, and, if the accused ought to be tried by the Court of Session, commit him for trial before the Court of Session.
Bharatiya Nagarik Suraksha Sanhita, 2023
Section 372 When accused appears to have been of sound mind
When the accused appears to be of sound mind at the time of inquiry or trial, and the Magistrate is satisfied from the evidence given before him that there is reason to believe that the accused committed an act, which, if he had been of sound mind, would have been an offence, and that he was, at the time when the act was committed, by reason of unsoundness of mind, incapable of knowing the nature of the act or that it was wrong or contrary to law, the Magistrate shall proceed with the case, and, if the accused ought to be tried by the Court of Session, commit him for trial before the Court of Session.
The texts are India Code’s. The amendment markers and footnotes of the official print are left out, so the old section reads as it stood when it was repealed; State amendments are not shown. The PDFs linked below carry the full history.