thanks, I caught that before I saw your reply.I think the bottom one is going to -Vcc not +Vcc.
This is the way . . .D1 and D2 clamp the signal in between the respective voltages.
Typical use is to protect the input of digital chips from voltages below 0V and above +5V.
Often you see Schottky diodes (BAT42 e.g) instead of 1N4148 due to their lower voltage drop.
What are these diodes really 'clamping'?